我正在尝试从在Python3上运行Raspbian的Raspberry Pi发送自定义的whatsapp消息。我在Geek for Geeks https://www.geeksforgeeks.org/whatsapp-using-python/
上找到了代码Whatsapp Web在Chromium上运行良好。我使用网站的exacct代码。硒已安装。
Traceback (most recent call last):
File "/home/pi/Documents/whatsapp.py", line 11, in <module>
driver = webdriver.Chrome('/home/pi/Downloads/chromedriver')
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
self.service.start()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
OSError: [Errno 8] Exec format error
输出应为whatsapp消息:“使用Python发送的消息!!!”
我想将此代码放入正在使用的另一个模块中。我需要将来自该模块的结果作为字符串发送到whatsapp消息中。