请教 Python 问题,实在搞不明白了,请教各位老哥!

224 天前
 pipixiarwksb

selenium ide 本地运行都是成功的 nuitka 打包后运行就出现这个问题 python3.9 selenium4.11 requests 2.31 urllib32.2.1

File "C:\Users\wang\Desktop\ai\v1\V00~1.1\threading.py", line 917, in run self._tstate_lock.acquire() File "C:\Users\wang\Desktop\ai\v1\V00~1.1\dt.py", line 526, in chromeiumD File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\selenium\webdriver\remote\webdriver.py", line 354, in get self.execute(Command.GET, {"url": url}) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\selenium\webdriver\remote\webdriver.py", line 343, in execute response = self.command_executor.execute(driver_command, params) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\selenium\webdriver\remote\remote_connection.py", line 291, in execute return self._request(command_info[0], url, body=data) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\selenium\webdriver\remote\remote_connection.py", line 312, in _request response = self._conn.request(method, url, body=body, headers=headers) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\request.py", line 78, in request return self.request_encode_body( File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\request.py", line 170, in request_encode_body return self.urlopen(method, url, **extra_kw) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, **kw) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\connectionpool.py", line 703, in urlopen conn = self._get_conn(timeout=pool_timeout) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\connectionpool.py", line 289, in _get_conn if conn and is_connection_dropped(conn): File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\util\connection.py", line 28, in is_connection_dropped return wait_for_read(sock, timeout=0.0) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\util\wait.py", line 145, in wait_for_read return wait_for_socket(sock, read=True, timeout=timeout) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\util\wait.py", line 138, in wait_for_socket return wait_for_socket(*args, **kwargs) File "C:\Users\wang\Desktop\ai\v1\v.0.0.1\urllib3\util\wait.py", line 85, in select_wait_for_socket rready, wready, xready = _retry_on_intr(fn, timeout) TypeError: cannot unpack non-iterable NoneType object

selenium headless 关闭后 页面可以打开,但是 url 是 data:

1869 次点击
所在节点    Python
5 条回复
NoOneNoBody
224 天前
打包是国际难题
jianchang512
224 天前
nuitka 打包问题很多,还是 pyinstaller 靠谱点
pipixiarwksb
224 天前
@NoOneNoBody 是的啊
@jianchang512 nuitka 打包也挺好用的 ,主要网上文档少
macaodoll
224 天前
为何想不开跑去打包 selenium 。。。。。
pipixiarwksb
224 天前
@macaodoll 实在搞不了了 换了 不还是看这玩意名气大吗,能少走坑,没想到坑这么大

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1039934

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX