我正在运行一个简单的分裂(使用硒)脚本
浏览器访问(网址)
在我的 Windows 机器上,python 脚本运行良好。但是,在我的 linux 服务器上,脚本不会运行。它立即停在上面并崩溃。
File "<stdin>", line 1, in <module>
File "test.py", line 57, in run
browser.visit(url)
File "/usr/local/lib/python2.7/dist-packages/splinter/driver/webdriver/__init__.py", line 53, in visit
self.connect(url)
File "/usr/local/lib/python2.7/dist-packages/splinter/request_handler/request_handler.py", line 23, in connect
self._create_connection()
File "/usr/local/lib/python2.7/dist-packages/splinter/request_handler/request_handler.py", line 48, in _create_connection
self.conn = http_client.HTTPConnection(self.host, self.port)
File "/usr/lib/python2.7/httplib.py", line 693, in __init__
self._set_hostport(host, port)
File "/usr/lib/python2.7/httplib.py", line 712, in _set_hostport
i = host.rfind(':')
AttributeError: 'NoneType' object has no attribute 'rfind'