Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

打包完成后运行报错 #21

Closed
fanweiya opened this issue Sep 14, 2021 · 7 comments
Closed

打包完成后运行报错 #21

fanweiya opened this issue Sep 14, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@fanweiya
Copy link

fanweiya commented Sep 14, 2021

在自己电脑运行debug出现:

dule>
    import paddle
ModuleNotFoundError: No module named 'paddle'

G:\detect\openvino_pyinstaller\maskcrop_out\Debug>pause


Current thread 0x00002a10 (most recent call first):

我已经安装了paddlepaddle,还是报这个错误

在别的电脑运行release出现:

C:\Users\Lenovo\Desktop\Release>"./Python/python.exe" -c "import sys;sys.path.append('./Python');sys.path.append('./Python/Lib/site-packages');sys.path.append('./Python/Scripts');import qpt.run as run"
Fatal Python error: initfsencoding: unable to load the file system codec
ValueError: source code string cannot contain null bytes

Current thread 0x00002a10 (most recent call first):
@fanweiya fanweiya added the bug Something isn't working label Sep 14, 2021
@GT-ZhangAcer
Copy link
Member

当前尚未适配中文路径,请在纯英文路径下进行打包,预计下个大版本进行适配

@fanweiya
Copy link
Author

当前尚未适配中文路径,请在纯英文路径下进行打包,预计下个大版本进行适配

我就是在英文路径下打包的

@GT-ZhangAcer
Copy link
Member

当前尚未适配中文路径,请在纯英文路径下进行打包,预计下个大版本进行适配

我就是在英文路径下打包的

C:\Users\Lenovo\Desktop\Release>
Desktop在Windows下是“桌面”,并非英文路径请悉知

@fanweiya
Copy link
Author

那是运行时,我打包是在G:\detect\openvino_pyinstaller这样的目录下打包的,而且我把Release放在D盘根目录也照样不能运行

D:\Release>"./Python/python.exe" -c "import sys;sys.path.append('./Python');sys.path.append('./Python/Lib/site-packages');sys.path.append('./Python/Scripts');import qpt.run as run"
Fatal Python error: initfsencoding: unable to load the file system codec
ValueError: source code string cannot contain null bytes

Current thread 0x000033c4 (most recent call first):

@GT-ZhangAcer
Copy link
Member

另外,ValueError: source code string cannot contain null bytes这个报错的意思是原始的py文件编码有问题,请核实是否为Python3要求的utf-8格式

@GT-ZhangAcer
Copy link
Member

这个报错为Python基础报错,与QPT无关,请自行解决谢谢

@GT-ZhangAcer
Copy link
Member

针对这个情况,请在打包时按照提示部分,检查requirements文件,与是否个人电脑安装了paddlepaddle无关,仅与requirements文件有关

在自己电脑运行debug出现:

dule>
    import paddle
ModuleNotFoundError: No module named 'paddle'

G:\detect\openvino_pyinstaller\maskcrop_out\Debug>pause


Current thread 0x00002a10 (most recent call first):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants