generator already executing
See original GitHub issueDescribe the bug
ValueError: generator already executing
To Reproduce Make a lot of conversion maybe?
Expected behavior No error
Desktop (please complete the following information):
- OS: Docker python:3.7-stretch
- Version 1.11.0
Code:
Where pdf
var is a typing.IO[bytes]
stream
pdf_content = pdf.read()
images = convert_from_bytes(pdf_content)
Output:
File "/usr/local/lib/python3.7/site-packages/****, line ****, in ****
images = convert_from_bytes(pdf_content)
File "/usr/local/lib/python3.7/site-packages/pdf2image/pdf2image.py", line 269, in convert_from_bytes
paths_only=paths_only,
File "/usr/local/lib/python3.7/site-packages/pdf2image/pdf2image.py", line 144, in convert_from_path
thread_output_file = next(output_file)
ValueError: generator already executing
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
python - builtins.ValueError: generator already executing
This happens because your distinct generator refers to itself inside of its body: if not variable in distinct . ... In other words,...
Read more >Python - generator already executing - Neo4j - 40421
ValueError: generator already executing is raised when multiple threads try to consume from one generator. Note that the driver object is thread ...
Read more >Value error generator already executing · Issue #14 - GitHub
I am using this code where I can display multiple streams using urls like localhost:5000/1 and localhost:5000/2 I used this repository for ...
Read more >"generator already executing" when operating on a stream
I am writing a custom ner.make-gold recipe. I am replacing the stream = split_sentences(stream) call with my own segment_documents() ...
Read more >generator docs should mention already-executing exception
I think the generator.__next__() documentation should say that it raises an exception if the generator is already executing: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The timeout is a good idea, if the problem is reported again I will consider adding one by default or at least making it a parameter.
It came from this project https://github.com/algoo/preview-generator/blob/develop/preview_generator/preview/builder/pdf__pypdf2.py#L56
On top of that I have a multithreaded webserver.