mirror of
https://github.com/brentvollebregt/auto-py-to-exe.git
synced 2026-04-25 19:55:49 +03:00
[GH-ISSUE #145] I can't start auto-py-to-exe because of UnicodeDecodeError #138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @abcvav on GitHub (Dec 6, 2020).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/145
When I start py2exe in cmd, this will always occur to me. Does anyone knows how to solve it?

I use python3.8.0, the Eel version is 0.12.4, the pyinstaller version is 4.1
@brentvollebregt commented on GitHub (Dec 6, 2020):
What version of
geventis installed in the environment you are using?@abcvav commented on GitHub (Dec 7, 2020):
gevent 20.9.0
gevent-websocket 0.10.1
@brentvollebregt commented on GitHub (Dec 7, 2020):
If you try downgrading gevent to something like 20.6.2, do you still get this issue?
@abcvav commented on GitHub (Dec 7, 2020):
I uninstalled the gevent 20.9.0,


and installed 20.6.2,
but the result turned out to be the same.
@abcvav commented on GitHub (Dec 7, 2020):
C:\Windows\system32>auto-py-to-exe :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject Traceback (most recent call last): File "d:\myapps\python38\lib\site-packages\gevent\threadpool.py", line 142, in __run_task thread_result.set(func(*args, **kwargs)) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte 2020-12-07T05:13:51Z (>, ) failed with UnicodeDecodeError Traceback (most recent call last): File "d:\myapps\python38\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "d:\myapps\python38\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\MyApps\Python38\Scripts\auto-py-to-exe.exe\__main__.py", line 7, in File "d:\myapps\python38\lib\site-packages\auto_py_to_exe\__main__.py", line 99, in run start_ui(logging_level) File "d:\myapps\python38\lib\site-packages\auto_py_to_exe\__main__.py", line 22, in start_ui ui.start(config.ui_open_mode) File "d:\myapps\python38\lib\site-packages\auto_py_to_exe\ui.py", line 142, in start eel.start('index.html', size=(650, 650), port=0, mode='user default') File "d:\myapps\python38\lib\site-packages\eel\__init__.py", line 164, in start run_lambda() File "d:\myapps\python38\lib\site-packages\eel\__init__.py", line 155, in run_lambda return btl.run( File "d:\myapps\python38\lib\site-packages\bottle.py", line 3137, in run server.run(app) File "d:\myapps\python38\lib\site-packages\bottle_websocket\server.py", line 17, in run server.serve_forever() File "d:\myapps\python38\lib\site-packages\gevent\baseserver.py", line 398, in serve_forever self.start() File "d:\myapps\python38\lib\site-packages\gevent\baseserver.py", line 336, in start self.init_socket() File "d:\myapps\python38\lib\site-packages\gevent\pywsgi.py", line 1501, in init_socket self.update_environ() File "d:\myapps\python38\lib\site-packages\gevent\pywsgi.py", line 1513, in update_environ name = socket.getfqdn(address[0]) File "d:\myapps\python38\lib\site-packages\gevent\_socketcommon.py", line 287, in getfqdn hostname, aliases, _ = gethostbyaddr(name) File "d:\myapps\python38\lib\site-packages\gevent\_socketcommon.py", line 259, in gethostbyaddr return get_hub().resolver.gethostbyaddr(ip_address) File "d:\myapps\python38\lib\site-packages\gevent\resolver\thread.py", line 66, in gethostbyaddr return self.pool.apply(_socket.gethostbyaddr, args, kwargs) File "d:\myapps\python38\lib\site-packages\gevent\pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() File "src\\gevent\\event.py", line 305, in gevent._gevent_cevent.AsyncResult.get File "src\\gevent\\event.py", line 335, in gevent._gevent_cevent.AsyncResult.get File "src\\gevent\\event.py", line 323, in gevent._gevent_cevent.AsyncResult.get File "src\\gevent\\event.py", line 303, in gevent._gevent_cevent.AsyncResult._raise_exception File "d:\myapps\python38\lib\site-packages\gevent\_compat.py", line 65, in reraise raise value.with_traceback(tb) File "d:\myapps\python38\lib\site-packages\gevent\threadpool.py", line 142, in __run_task thread_result.set(func(*args, **kwargs)) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte@brentvollebregt commented on GitHub (Dec 7, 2020):
I see. This is definitely an Eel/gevent issue which are dependencies of auto-py-to-exe (gevent is a dependency of Eel).
Which version of greenlet do you have installed? Have you tried creating a virtual environment and installing the tool in there to see if anything else is conflicting?
@abcvav commented on GitHub (Dec 7, 2020):
the version of greenlet is 0.4.17.
I created a new virtual environment using virtualenv and only use pip to install the auto-py-to-exe just now, and there is still an UnicodeDecodeError.
Here are the grevent's and greenlet's version
gevent 20.9.0
greenlet 0.4.17
the traceback is here
@abcvav commented on GitHub (Dec 7, 2020):
then i installed gevent 20.6.2,
but there is still no use,
here is the tracebacke after i installed gevent 20.6.2 in the virtual enviroment.
(ENV) D:\MyApps\pyvirtual\ENV\Scripts>auto-py-to-exe :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject :219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144 from C header, got 152 from PyObject Traceback (most recent call last): File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\threadpool.py", line 142, in __run_task thread_result.set(func(*args, **kwargs)) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte 2020-12-07T06:16:29Z (>, ) failed with UnicodeDecodeErrorTraceback (most recent call last):
File "d:\myapps\python38\lib\runpy.py", line 192, in run_module_as_main
return run_code(code, main_globals, None,
File "d:\myapps\python38\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\MyApps\pyvirtual\ENV\Scripts\auto-py-to-exe.exe_main.py", line 7, in
File "d:\myapps\pyvirtual\env\lib\site-packages\auto_py_to_exe_main.py", line 99, in run
start_ui(logging_level)
File "d:\myapps\pyvirtual\env\lib\site-packages\auto_py_to_exe_main.py", line 22, in start_ui
ui.start(config.ui_open_mode)
File "d:\myapps\pyvirtual\env\lib\site-packages\auto_py_to_exe\ui.py", line 142, in start
eel.start('index.html', size=(650, 650), port=0, mode='user default')
File "d:\myapps\pyvirtual\env\lib\site-packages\eel_init_.py", line 164, in start
run_lambda()
File "d:\myapps\pyvirtual\env\lib\site-packages\eel_init_.py", line 155, in run_lambda
return btl.run(
File "d:\myapps\pyvirtual\env\lib\site-packages\bottle.py", line 3137, in run
server.run(app)
File "d:\myapps\pyvirtual\env\lib\site-packages\bottle_websocket\server.py", line 17, in run
server.serve_forever()
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\baseserver.py", line 398, in serve_forever
self.start()
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\baseserver.py", line 336, in start
self.init_socket()
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\pywsgi.py", line 1501, in init_socket
self.update_environ()
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\pywsgi.py", line 1513, in update_environ
name = socket.getfqdn(address[0])
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent_socketcommon.py", line 287, in getfqdn
hostname, aliases, _ = gethostbyaddr(name)
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent_socketcommon.py", line 259, in gethostbyaddr
return get_hub().resolver.gethostbyaddr(ip_address)
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\resolver\thread.py", line 66, in gethostbyaddr
return self.pool.apply(_socket.gethostbyaddr, args, kwargs)
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\pool.py", line 161, in apply
return self.spawn(func, *args, **kwds).get()
File "src\gevent\event.py", line 305, in gevent._gevent_cevent.AsyncResult.get
File "src\gevent\event.py", line 335, in gevent._gevent_cevent.AsyncResult.get
File "src\gevent\event.py", line 323, in gevent._gevent_cevent.AsyncResult.get
File "src\gevent\event.py", line 303, in gevent._gevent_cevent.AsyncResult._raise_exception
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent_compat.py", line 65, in reraise
raise value.with_traceback(tb)
File "d:\myapps\pyvirtual\env\lib\site-packages\gevent\threadpool.py", line 142, in __run_task
thread_result.set(func(*args, **kwargs))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 0: invalid continuation byte
@brentvollebregt commented on GitHub (Dec 8, 2020):
python-greenlet/greenlet#178 is definitely related to this however it was said:
which you are doing already.
How did you install gevent? Might pay to try installing the pre-build binaries from PyPI:
@abcvav commented on GitHub (Dec 9, 2020):
I used pip to install it......Does the pip cause the problem?
@brentvollebregt commented on GitHub (Dec 10, 2020):
When you use pip, it will build gevent on your machine. I'm curious if the pre-build binaries from the sites I linked solve your issue.
Uninstall gevent and greenlet and then install the correct whl files from those links.
@abcvav commented on GitHub (Dec 10, 2020):
I downloaded these files in the link
At first I use
And it doesn't help.
Then I used
But the UnicodeDecodeError still exists.😭😭😭
I want use it so much.😭😭😭😭
@abcvav commented on GitHub (Dec 10, 2020):
By the way, when I reinstall the gevent,
the pip downloaded some other package automatically.
Shold I install these package with .whl files too?
F:\Downloads>pip install --force-reinstall gevent-20.9.0-cp38-cp38-win_amd64.whl Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Processing f:\downloads\gevent-20.9.0-cp38-cp38-win_amd64.whl Collecting cffi>=1.12.2 Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f6/d4/bf5516922cc914174a936e7094d5f136ee4178b3509069dd3da8e3040a1a/cffi-1.14.4-cp38-cp38-win_amd64.whl (179 kB) |████████████████████████████████| 179 kB 6.4 MB/s Collecting greenlet>=0.4.17 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cd/59/251e02f8f3b248bb0fd731ae93488e1d72eabb0af21f13e7561d743af4ce/greenlet-0.4.17-cp38-cp38-win_amd64.whl (19 kB) Collecting pycparser Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112 kB) |████████████████████████████████| 112 kB 3.3 MB/s Collecting setuptools Using cached https://pypi.tuna.tsinghua.edu.cn/packages/3d/f2/1489d3b6c72d68bf79cd0fba6b6c7497df4ebf7d40970e2d7eceb8d0ea9c/setuptools-51.0.0-py3-none-any.whl (785 kB) Collecting zope.event Downloading https://pypi.tuna.tsinghua.edu.cn/packages/9e/85/b45408c64f3b888976f1d5b37eed8d746b8d5729a66a49ec846fda27d371/zope.event-4.5.0-py2.py3-none-any.whl (6.8 kB) Collecting zope.interface Downloading https://pypi.tuna.tsinghua.edu.cn/packages/77/9d/0919a05c0c3cb988ebdf085cd9d565326e741b1562df10d4eadd405b3aac/zope.interface-5.2.0-cp38-cp38-win_amd64.whl (196 kB) |████████████████████████████████| 196 kB 1.7 MB/s Installing collected packages: setuptools, pycparser, zope.interface, zope.event, greenlet, cffi, gevent Attempting uninstall: setuptools Found existing installation: setuptools 41.2.0 Uninstalling setuptools-41.2.0: Successfully uninstalled setuptools-41.2.0 Attempting uninstall: pycparser Found existing installation: pycparser 2.20 Uninstalling pycparser-2.20: Successfully uninstalled pycparser-2.20 Attempting uninstall: zope.interface Found existing installation: zope.interface 5.2.0 Uninstalling zope.interface-5.2.0: Successfully uninstalled zope.interface-5.2.0 Attempting uninstall: zope.event Found existing installation: zope.event 4.5.0 Uninstalling zope.event-4.5.0: Successfully uninstalled zope.event-4.5.0 Attempting uninstall: greenlet Found existing installation: greenlet 0.4.17 Uninstalling greenlet-0.4.17: Successfully uninstalled greenlet-0.4.17 Attempting uninstall: cffi Found existing installation: cffi 1.14.3 Uninstalling cffi-1.14.3: Successfully uninstalled cffi-1.14.3 Attempting uninstall: gevent Found existing installation: gevent 20.9.0 Uninstalling gevent-20.9.0: Successfully uninstalled gevent-20.9.0 Successfully installed cffi-1.14.4 gevent-20.9.0 greenlet-0.4.17 pycparser-2.20 setuptools-51.0.0 zope.event-4.5.0 zope.interface-5.2.0@brentvollebregt commented on GitHub (Dec 11, 2020):
Hmm, there aren't many other helpful recommendations I am seeing in gevent's issues.
My last attempt would be to try using Python 3.7?
@abcvav commented on GitHub (Dec 14, 2020):
ok....I'll try
@github-actions[bot] commented on GitHub (Feb 13, 2021):
This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
@github-actions[bot] commented on GitHub (Feb 18, 2021):
Closing issue due to no activity in more than 60 days.
@2197808908a commented on GitHub (May 21, 2024):
这个问题我也遇到了,重新安装和降版本都不行,之前最开始装起还能用,作者注意一下
Windows
Python 3.7
greenlet-3.0.3
gevent-22.10.2