Comments (5)
When i keyboard interrupt in the middle, the function appears to be stuck within what appears to be a timeout.
^CTraceback (most recent call last):
File "test.py", line 11, in <module>
html_to_image("result.html", "result.jpg")
File "test.py", line 6, in html_to_image
imgkit.from_file(html_filename, image_filename, options={"width": 660, "disable-smart-width": ""})
File "/home/smi/.local/lib/python3.8/site-packages/imgkit/api.py", line 64, in from_file
return rtn.to_img(output_path)
File "/home/smi/.local/lib/python3.8/site-packages/imgkit/imgkit.py", line 225, in to_img
stdout, stderr = result.communicate(input=string)
File "/usr/local/lib/python3.8/subprocess.py", line 1024, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/usr/local/lib/python3.8/subprocess.py", line 1866, in _communicate
ready = selector.select(timeout)
File "/usr/local/lib/python3.8/selectors.py", line 415, in select
fd_event_list = self._selector.poll(timeout)
from imgkit.
How about the time duration for other sites?
from imgkit.
So I just opened a new issue and it might be related to this:
The conversation finally completed but I have no idea how long it took due to leaving it over night. I attached the .html to issue 77. I think if we had a timeout flag for embedded URLs in the HTML may fix our issues but idk.
from imgkit.
Okay so I found my issue. It ended up being an IPS doing TCP-DROP instead of TCP-REST. In my opinion a flag to declare a timeout for specific TCP connection would be a good idea to prevent slow servers failing to respond to hold up the code. I would imagine that this would be a pretty big feature request though. Going to close out #77
from imgkit.
Any updates? I got the same issues..
from imgkit.
Related Issues (20)
- from_string() got an unexpected keyword argument 'config' HOT 1
- Encoding character bug in .from_string HOT 2
- UnicodeDecodeError on using "quiet" option HOT 4
- How to display the emojis from the html file? HOT 3
- How to load from a local image file? HOT 1
- Fail to support UTF-8 text (Chinese Characters)? HOT 4
- No wkhtmltoimage executable found error on google colab HOT 1
- Proposing a PR to fix a few small typos HOT 1
- Converting a html file to jpg freezes/does nothing HOT 1
- Image output is different than the html/css when rendered in browser
- Not significant difference in output image while using crop options HOT 1
- can execute bash command with imgkit.from_url and config
- utf-8' codec can't decode byte 0xff in position 0: invalid start byte HOT 1
- @font-palette-values CSS apparently not supported
- IMGKit.to_img crashes when setting mode to quiet and receiving the image in-memory
- OSError: wkhtmltoimage exited with non-zero code 1. error: Unknown long argument --no-background HOT 2
- How to set options for wkhtmltopdf in imgkit options? HOT 1
- I use python imgkit . sometimes i found html to image result is blank. HOT 4
- Delay before page screenshot
- Is still updated this proyect? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgkit.