我试图让我的RP成为一些web自动化任务的服务器,所以我安装了python 3.7
和{a1}(Googlel的puppeter的Python版本)。问题是,在OSX上运行顺利的代码在PI上出现以下错误:
Traceback (most recent call last):
File "main.py", line 45, in <module>
asyncio.get_event_loop().run_until_complete(main())
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 568, in run_until_complete
return future.result()
File "main.py", line 16, in main
browser = await launch(headless=True)
File "/usr/local/lib/python3.7/site-packages/pyppeteer/launcher.py", line 311, in launch
return await Launcher(options, **kwargs).launch()
File "/usr/local/lib/python3.7/site-packages/pyppeteer/launcher.py", line 169, in launch
**options,
File "/usr/local/lib/python3.7/subprocess.py", line 756, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.7/subprocess.py", line 1499, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/home/pi/.local/share/pyppeteer/local-chromium/575458/chrome-linux/chrome'
代码仅在无头模式下启动铬:
^{pr2}$我试图安装来自here的所有Debian依赖项,并使pypputeer
像第一次一样重新安装chromium。但似乎没有什么能解决这个错误。还有一个似乎没有帮助的this Github post。有人知道能做什么吗?在
显然,解决方案是将代码中的chromium路径重定向到您知道正在工作的chromium的某个版本。 所以
然后:
^{pr2}$相关问题 更多 >
编程相关推荐