You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug report @maxwest-uw is working with fibad and kbmod-ml, and ran into this error when trying to push changes. It's clearly lines in Fibad that are causing this:
Traceback (most recent call last):
File "/astro/users/maxwest/fibad_script.py", line 7, in
fibad_instance = fibad.Fibad(config_file="kbmod_fibad_config.toml")
File "/astro/users/maxwest/fibad/src/fibad/fibad.py", line 46, in init
self.config_manager = ConfigManager(runtime_config_filepath=config_file)
File "/astro/users/maxwest/fibad/src/fibad/config_utils.py", line 85, in init
self.external_library_config_paths = self._find_external_library_default_config_paths(
File "/astro/users/maxwest/fibad/src/fibad/config_utils.py", line 136, in _find_external_library_default_config_paths
default_configs |= ConfigManager._find_external_library_default_config_paths(value)
File "/astro/users/maxwest/fibad/src/fibad/config_utils.py", line 140, in _find_external_library_default_config_paths
if importlib.util.find_spec(external_library) is not None:
AttributeError: module 'importlib' has no attribute 'util'
The text was updated successfully, but these errors were encountered:
I spent some time trying to reproduce this locally on the command line and wasn't able to do so. Running the following on my local machine with Python 3.11 was fine:
import importlib
importlib.util.find_spec("asdf")
In some examples of people using find_spec, I see that they typically import the following:
import importlib
import importlib.util
...
So perhaps that is necessary on some systems?
I also took a look through the python code base to see if perhaps importing just importlib would not include util, but it does seem to include it.
So I'll put together a little PR that adds the second import importlib.util statement and we can see if that fixes things.
Bug report
@maxwest-uw is working with fibad and kbmod-ml, and ran into this error when trying to push changes. It's clearly lines in Fibad that are causing this:
The text was updated successfully, but these errors were encountered: