Closed tburnett closed 4 years ago
I should add that this is on linux, centos7.
The command line fails similarly:
http.client.BadStatusLine: GET /json/version HTTP/1.1
Hi! Thanks for stopping by :D
How did you resolve this? Posting that might help others who come here and look for answers to similar problems.
Sorry, pushed wrong button. I'd hoped that it would have meant something to you. I really want to use this, it is exactly what I need.
It actually hangs up in pyppeteer.launcher.py:166, this line self.browserWSEndpoint = get_ws_endpoint(self.url)
I have no idea what is going on, or why this would generate that error message. So probably nothing to do with your code, I'll try to bring it up with pyppeteer. It may be related to my linux environment, which is a remote server at SLAC.
Ah, just now, someone else has what seems to be the same pyppeteer issue, https://github.com/pyppeteer/pyppeteer/issues/111. So I'll really close this now.
This is not an issue here, except that the solution I found requires specifying "--no-sandbox" for the the headless chrome, installed by pyppeteer.
In the key functionhtml_to_pdf(html_file, pdf_file)
that does all the work, one must insert args=['--no-sandbox']
into
browser = await launch(handleSIGINT=False, handleSIGTERM=False, handleSIGHUP=False)
The version of chrome that gets installed has several libraries not in Ubuntu, which need to be added via sudo apt-get install.
(I maybe should have worried about that sandbox issue, but is completely irrelevant to my application, and I want to get back to science.)
Hi, thanks very much for this, it is just what I need for a project I'm developing to use markdown generated from code. It makes very nice notebook output, allowing text and figure captions. What it lacks is a nice way to generate a PDF. However, my first attempt to use if fails with the message from, I guess chromium:
nbconvert failed: GET /json/version HTTP/1.1
the version of json, in the latest jupyter, is 2.0.