pyppeteer / pyppeteer

Headless chrome/chromium automation library (unofficial port of puppeteer)
Other
3.62k stars 324 forks source link

BrowserError: Browser closed unexpectedly #406

Open jaan143 opened 2 years ago

jaan143 commented 2 years ago

i am trying to conver html to pdf file but getting this error i cannot find windows os solution on internet kindly help me to solve out it.

D:\pp\downloader.py:183: DeprecationWarning: There is no current event loop asyncio.get_event_loop().run_until_complete(html2pdf()) Traceback (most recent call last): File "D:\pp\downloader.py", line 183, in asyncio.get_event_loop().run_until_complete(html2pdf()) File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete return future.result() File "D:\pp\downloader.py", line 114, in html2pdf browser = await launch(options={ File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\site-packages\pyppeteer\launcher.py", line 307, in launch return await Launcher(options, **kwargs).launch() File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\site-packages\pyppeteer\launcher.py", line 168, in launch self.browserWSEndpoint = get_ws_endpoint(self.url) File "C:\Users\Hp\AppData\Local\Programs\Python\Python310\lib\site-packages\pyppeteer\launcher.py", line 227, in get_ws_endpoint raise BrowserError('Browser closed unexpectedly:\n') pyppeteer.errors.BrowserError: Browser closed unexpectedly:

PS D:\pp>

rahulbanwasi commented 1 year ago

did you got any fix for the same?

jaan143 commented 1 year ago

@rahulbanwasi yes i got fixed.