-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: cannot access local variable 'browser' where it is not associated with a value #795
Comments
I noticed this becomes an issue when using ThreadPoolExecutor. Apparently, the error comes from playright's use of asyncio. I still don't understand why it works locally but not in K8s.
|
There seems to be a recurrent issue with nested import nest_asyncio
nest_asyncio.apply() |
That didn't work for me and it doesn't make sense why it would work on my machine or in docker but not K8s. The code:
where the callable is:
resulting in the following issue:
|
@f-aguzzi I don't mean to really do it this way. I just want to run the scraper as fast as possible, using whatever supported and stable method of doing so. If you could guide me towards a way that ensures high concurrency, I would be very thankful. Edit: actually if I now add that line about nested async to my code, it will break locally the same way it does in my pod. Weird. |
Describe the bug
Whereas locally my code works on the bare machine and in a docker container, in Kubernetes, I get some very weird errors related to " cannot access local variable 'browser' where it is not associated with a value"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Whereas locally my code works on the bare machine and in a docker container, in Kubernetes, I get some very weird errors.
Desktop (please complete the following information):
Additional context
Here are logs:
The text was updated successfully, but these errors were encountered: