html2image
html2image copied to clipboard
Capture screenshot is disabled when remote debugging is enabled.
hti = Html2Image(custom_flags=['--disable-remote-debugging', '--no-sandbox'])
try:
hti.screenshot(html_file='index1.html',
save_as='Image-1.jpg',
size=(1200, 1200)
)
hti.screenshot(html_file='index2.html',
save_as='Image-2.jpg',
size=(1200, 1200)
)
except:
print(e)
return ['Image-1.jpg', 'Image-2.jpg']
Facing this issue in flask and using server as heroku
Hello, could you take a look at the issue #39 , particularly at this comment to see if it solves your problem ?
I quote aurelmegn:
Capture screenshot is disabled when remote debugging is enabled
Hey, in case someone is having this error issue with heroku, the chrome build pack enable remote debugging by default, and you need to remove the flag--remote-debugging-port=9222
in the build pack before using it.
Hello, could you take a look at the issue #39 , particularly at this comment to see if it solves your problem ?
I quote aurelmegn:
Capture screenshot is disabled when remote debugging is enabled
Hey, in case someone is having this error issue with heroku, the chrome build pack enable remote debugging by default, and you need to remove the flag--remote-debugging-port=9222
in the build pack before using it.
Thanks for the quick help it helped me And yes its an issue
This suggests we should add a version as a flag