在树莓皮上运行木偶时出错

2024-04-20 07:13:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图让我的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。有人知道能做什么吗?在


Tags: run代码inpyasynciomainlibusr