V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
pipixiarwksb
V2EX  ›  Python

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

  •  
  •   pipixiarwksb · 195 天前 · 1836 次点击
    这是一个创建于 195 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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:

    5 条回复    2024-05-12 17:56:46 +08:00
    NoOneNoBody
        1
    NoOneNoBody  
       195 天前   ❤️ 1
    打包是国际难题
    jianchang512
        2
    jianchang512  
       195 天前
    nuitka 打包问题很多,还是 pyinstaller 靠谱点
    pipixiarwksb
        3
    pipixiarwksb  
    OP
       195 天前
    @NoOneNoBody 是的啊
    @jianchang512 nuitka 打包也挺好用的 ,主要网上文档少
    macaodoll
        4
    macaodoll  
       195 天前 via Android
    为何想不开跑去打包 selenium 。。。。。
    pipixiarwksb
        5
    pipixiarwksb  
    OP
       194 天前
    @macaodoll 实在搞不了了 换了 不还是看这玩意名气大吗,能少走坑,没想到坑这么大
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2924 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:11 · PVG 16:11 · LAX 00:11 · JFK 03:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.