我们正在尝试运行一个php页面,它将使用splinter运行python脚本。 虽然python脚本正在运行并打开浏览器抛出终端,但php页面使用以下命令启动脚本:
$output = shell_exec('/usr/bin/python2.7 script.py ' . '2>&1');
Traceback (most recent call last):
File "script.py", line 5, in with Browser() as browser:
File "build/bdist.linux-x86_64/egg/splinter/browser.py", line 63, in Browser
File "build/bdist.linux-x86_64/egg/splinter/driver/webdriver/firefox.py", line 47, in __init__
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 77, in __init__ self.binary, timeout),
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__ self.profile.add_extension()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 91, in add_extension self._install_extension(extension)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 269, in _install_extension addon_details = self._addon_details(addon)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 369, in _addon_details raise AddonFormatError(str(e), sys.exc_info()[2]) selenium.webdriver.firefox.firefox_profile.AddonFormatError: ('/usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so: undefined symbol: XML_SetHashSalt', ) "
但它不会打开浏览器。我们该如何解决? 感谢。