mherrmann / fbs-tutorial

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

KeyError: 'public_settings' #44

Closed ScarlettCharlie closed 4 years ago

ScarlettCharlie commented 4 years ago

This is what happened when I executed fbs run:

Traceback (most recent call last): File "/Users/charleslure/src/main/python/main.py", line 313, in appctxt = ApplicationContext() File "/Users/charleslure/src/main/python/fbs_runtime/application_context/init.py", line 31, in init self.app File "/Users/charleslure/src/main/python/fbs_runtime/application_context/init.py", line 54, in app result.setApplicationName(self.build_settings['app_name']) File "/Users/charleslure/src/main/python/fbs_runtime/application_context/init.py", line 65, in build_settings return _source.load_build_settings(self._project_dir) File "/Users/charleslure/src/main/python/fbs_runtime/_source.py", line 37, in load_build_settings return filter_public_settings(all_settings) File "/Users/charleslure/src/main/python/fbs_runtime/_fbs.py", line 27, in filter_public_settings return {k: settings[k] for k in settings['public_settings']} KeyError: 'public_settings'

It gets solved somehow and I guess I shouldn't use ApplicationContext (imported from fbs_runtime.application_context.PyQt5) after the [ if name == "main": ]. The ApplicationContext is in the file PyQt.py which is in this path: /Users/thisisme/venv/lib/python3.7/site-packages/fbs_runtime/application_context/PyQt5.py

------------------------ update ------------------------

No matter how much you want to use PyCharm, note that the folder /Users/thisisme/venv is only available for fbs, which requires fbs to run the scripts in this path on its own: /Users/thisisme/venv/lib/python3.7/site-packages/fbs_runtime

So, DO NOT copy this folder into the /Users/thisisme/src/main/python3.7. REPEAT: DON'T DO IT