mherrmann / fbs-tutorial

Tutorial for creating Python/Qt GUIs with fbs
https://build-system.fman.io
GNU General Public License v3.0
1.98k stars 159 forks source link

fbs run (and freeze) fails with anaconda #24

Closed wjhuisman closed 5 years ago

wjhuisman commented 5 years ago

Hi,

On my windows installation I use anaconda with python3.6 for my GUI, which fails when trying to run fbs run, and subsequently when trying to run fbs freeze. The error messages are: fbs run: Traceback (most recent call last): File "c:\users\wouter\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\wouter\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Wouter\Anaconda3\Scripts\fbs.exe\__main__.py", line 9, in <module> File "c:\users\wouter\anaconda3\lib\site-packages\fbs\__main__.py", line 17, in _main fbs.cmdline.main() File "c:\users\wouter\anaconda3\lib\site-packages\fbs\cmdline.py", line 32, in main fn(*args) File "c:\users\wouter\anaconda3\lib\site-packages\fbs\builtin_commands\__init__.py", line 93, in run subprocess.run([sys.executable, path(SETTINGS['main_module'])], env=env) KeyError: 'main_module'

fbs freeze: Traceback (most recent call last): File "c:\users\wouter\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\wouter\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Wouter\Anaconda3\Scripts\fbs.exe\__main__.py", line 9, in <module> File "c:\users\wouter\anaconda3\lib\site-packages\fbs\__main__.py", line 17, in _main fbs.cmdline.main() File "c:\users\wouter\anaconda3\lib\site-packages\fbs\cmdline.py", line 32, in main fn(*args) File "c:\users\wouter\anaconda3\lib\site-packages\fbs\builtin_commands\__init__.py", line 108, in freeze app_name = SETTINGS['app_name'] KeyError: 'app_name'

I had some issues with Anaconda before, with a missing python3.dll file, but that is resolved now. I cannot use a different python version, and I highly prefer to use anaconda since it makes the installation of cartopy easier, which I need. Do you have a suggestion on how to proceed?

Kind regards

wjhuisman commented 5 years ago

I am sorry, I made a silly mistake (my build folder was missing in the \src folder somehow). This issue can be closed.

BMJHayward commented 5 years ago

I know this is closed, but thought it might help someone in future just in case. I had the same issue, my auto-generated .gitignore file included build/, so our CI pipeline wasn't getting the settings files in src/build/ after a git push. BUT the src directory was included in git, so I mistakenly assumed all its children were in there too. I was wrong. I updated the .gitignore, add src/build and then fbs freeze was working again.