Open alidaoudi1 opened 5 years ago
I just released fbs 0.6.7. Does the problem still occur for you with this version?
I presume it doesn't - closing this issue. Feel free to re-open @alidaoudi1.
If your virtualenv install zope package, and then running "fbs freeze --debug", the result will output:
File "/Users/bb/.virtualenvs/vv/bin/pyinstaller", line 10, in <module>
sys.exit(run())
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 791, in build
exec(code, spec_namespace)
File "/Users/bb/Public/japan_shenyuan/target/PyInstaller/vv.spec", line 17, in <module>
noarchive=True)
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 243, in __init__
self.__postinit__()
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
self.assemble()
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 597, in assemble
for name, path, typecode in compile_py_files(new_toc, CONF['workpath']):
File "/Users/bb/.virtualenvs/vv/lib/python3.6/site-packages/PyInstaller/utils/misc.py", line 157, in compile_py_files
with open(obj_fnm, 'rb') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '-'
Debug PyInstaller source code(filename: PyInstaller/utils.misc.py linenumber: 150), exist a invalid list element: ('zope.pyc', '-', 'PYMODULE')
@unlessbamboo I cannot reproduce this. Here's what I tried on macOS (like you) with Python 3.6.7:
python3 -m venv venv
source venv/bin/activate
pip install fbs PyQt5==5.9.2 zope
fbs startproject
fbs freeze --debug
@unlessbamboo I cannot reproduce this. Here's what I tried on macOS (like you) with Python 3.6.7:
python3 -m venv venv source venv/bin/activate pip install fbs PyQt5==5.9.2 zope fbs startproject fbs freeze --debug
Thanks, My PyQt5's VERSION is 5.13.0. I had resolved this problem through modify PyInstaller source code.
filename: PyInstaller/utils/misc.py
line number: 150:
needs_compile = mtime(src_fnm) > mtime(obj_fnm)
if not needs_compile:
if not os.path.exists(obj_fnm):
continue
with open(obj_fnm, 'rb') as fh:
needs_compile = fh.read()[:4] != BYTECODE_MAGIC
Okay, so it's a version incompatibility with PyQt5 5.13.0.
I had the same problem : fbs was failing because PyInstaller was failing due to a '-' file not found. I added logging to PyInstaller\utils\misc.py:123 with
print("nm=%r, fnm=%r, typ=%r" % (nm, fnm, typ))
It showed me it was trying to compile a package whose folder had no __init__.py
in.
Just adding an empty __init__.py
file solved the issue.
I'm using windows and running fbs from the command prompt. I have an issue when freezing the app, this is what I get with the verbose mode :