Open lvzhidong opened 5 years ago
hi, when I call r.html.render() , it works if use 'sudo' command, but fail if not. here is the exception log, what's wrong?
Traceback (most recent call last): File "/Users/lvzhidong 1/Desktop/local_repository/learn/learn_requsts_html.py", line 16, in r.html.render(keep_page=True) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests_html.py", line 586, in render self.browser = self.session.browser # Automatically create a event loop and browser File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests_html.py", line 730, in browser self._browser = self.loop.run_until_complete(super().browser) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete return future.result() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests_html.py", line 714, in browser self._browser = await pyppeteer.launch(ignoreHTTPSErrors=not(self.verify), headless=True, args=self.__browser_args) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyppeteer/launcher.py", line 311, in launch return await Launcher(options, **kwargs).launch() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyppeteer/launcher.py", line 189, in launch self.browserWSEndpoint = self._get_ws_endpoint() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyppeteer/launcher.py", line 233, in _get_ws_endpoint self.proc.stdout.read().decode() pyppeteer.errors.BrowserError: Browser closed unexpectedly: dlopen /Users/lvzhidong 1/Library/Application Support/pyppeteer/local-chromium/575458/chrome-mac/Chromium.app/Contents/MacOS/../Versions/69.0.3494.0/Chromium Framework.framework/Chromium Framework: dlopen(/Users/lvzhidong 1/Library/Application Support/pyppeteer/local-chromium/575458/chrome-mac/Chromium.app/Contents/MacOS/../Versions/69.0.3494.0/Chromium Framework.framework/Chromium Framework, 261): no suitable image found. Did find: /Users/lvzhidong 1/Library/Application Support/pyppeteer/local-chromium/575458/chrome-mac/Chromium.app/Contents/MacOS/../Versions/69.0.3494.0/Chromium Framework.framework/Chromium Framework: stat() failed with errno=13
@lvzhidong Can you provide additional context around this error? Preferably a snippet of code that others can run to replicate the error?
hi, when I call r.html.render() , it works if use 'sudo' command, but fail if not. here is the exception log, what's wrong?
Traceback (most recent call last): File "/Users/lvzhidong 1/Desktop/local_repository/learn/learn_requsts_html.py", line 16, in
r.html.render(keep_page=True)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests_html.py", line 586, in render
self.browser = self.session.browser # Automatically create a event loop and browser
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests_html.py", line 730, in browser
self._browser = self.loop.run_until_complete(super().browser)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests_html.py", line 714, in browser
self._browser = await pyppeteer.launch(ignoreHTTPSErrors=not(self.verify), headless=True, args=self.__browser_args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyppeteer/launcher.py", line 311, in launch
return await Launcher(options, **kwargs).launch()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyppeteer/launcher.py", line 189, in launch
self.browserWSEndpoint = self._get_ws_endpoint()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyppeteer/launcher.py", line 233, in _get_ws_endpoint
self.proc.stdout.read().decode()
pyppeteer.errors.BrowserError: Browser closed unexpectedly:
dlopen /Users/lvzhidong 1/Library/Application Support/pyppeteer/local-chromium/575458/chrome-mac/Chromium.app/Contents/MacOS/../Versions/69.0.3494.0/Chromium Framework.framework/Chromium Framework: dlopen(/Users/lvzhidong 1/Library/Application Support/pyppeteer/local-chromium/575458/chrome-mac/Chromium.app/Contents/MacOS/../Versions/69.0.3494.0/Chromium Framework.framework/Chromium Framework, 261): no suitable image found. Did find:
/Users/lvzhidong 1/Library/Application Support/pyppeteer/local-chromium/575458/chrome-mac/Chromium.app/Contents/MacOS/../Versions/69.0.3494.0/Chromium Framework.framework/Chromium Framework: stat() failed with errno=13