Coder Social home page Coder Social logo

Comments (5)

MahdeenSky avatar MahdeenSky commented on May 18, 2024

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.

jarrekk avatar jarrekk commented on May 18, 2024

How about the time duration for other sites?

from imgkit.

trae-horton avatar trae-horton commented on May 18, 2024

So I just opened a new issue and it might be related to this:

#77

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.

trae-horton avatar trae-horton commented on May 18, 2024

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.

dreamerhyde avatar dreamerhyde commented on May 18, 2024

Any updates? I got the same issues..

from imgkit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.