KeyError: 'public_settings'
ScarlettCharlie opened this issue · 0 comments
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