Exception on /api/v1/orchestrations/pipeline-schedules AttributeError: 'NoneType' object has no attribute 'get'
See original GitHub issueI get this error sometimes when strating meltano ui
on a windows machine. The error also happens when I navigate between tabs in the UI. The error is associtated with the following API call in the log
Exception on /api/v1/orchestrations/pipeline-schedules [GET]
Here is the ending bit of the error
File "C:\development\meltano\src\meltano\core\project_plugins_service.py", line 83, in current_plugins
self._current_plugins = self.config_service.current_meltano_yml.plugins
File "C:\development\meltano\src\meltano\core\config_service.py", line 35, in current_meltano_yml
self._current_meltano_yml = self.project.meltano
File "C:\development\meltano\src\meltano\core\project.py", line 230, in meltano
return MeltanoFile.parse(self.project_files.load())
File "C:\development\meltano\src\meltano\core\project_files.py", line 66, in load
included_file_contents = self._load_included_files()
File "C:\development\meltano\src\meltano\core\project_files.py", line 150, in _load_included_files
for path in self.include_paths:
File "C:\development\meltano\src\meltano\core\project_files.py", line 59, in include_paths
include_path_patterns = self.meltano.get("include_paths", [])
AttributeError: 'NoneType' object has no attribute 'get'
It can’t find the attribute get
which I think is suppose to be a function of the class ? I also have not been able to determine what the function get
is suppose to do. It seems like it is reading the meltano.yaml
for the include_paths
entries and return all the paths in a list. In the project_files.py
there are these back to back function you can see there is a meltano
function.
@property
def meltano(self):
"""Return the contents of this projects `meltano.yml`."""
if self._meltano is None:
with open(self._meltano_file_path) as melt_f:
self._meltano = yaml.safe_load(melt_f)
return self._meltano
@property
def include_paths(self) -> List[Path]:
"""Return list of paths derived from glob patterns defined in the meltanofile."""
include_path_patterns = self.meltano.get("include_paths", [])
return self._resolve_include_paths(include_path_patterns)
In project.py
there is a meltano
function that returns a MeltanoFile
class
@property
def meltano(self) -> MeltanoFile:
"""Return a copy of the current meltano config.
Returns:
the current meltano config
"""
with self._meltano_rw_lock.read_lock():
return MeltanoFile.parse(self.project_files.load())
The MeltanoFile
class that is in meltano_file.py
has a get_plugins_for_mappings
.
Issue Analytics
- State:
- Created a year ago
- Comments:16 (11 by maintainers)
Top GitHub Comments
I can verify that I get this on Meltano with the Uvicorn feature flag enabled. I can’t replicate this on Linux.
@tayloramurphy sure thing. I have python 3.9.12 installed. Meltano was installed using pipx and is
meltano, version 2.1.0
. I get the error message even when I startmeltano ui
in a freshly initialized test project with the defaultmeltano.yml
file.cc @visch @kgpayne @alexmarple