Hey everyone! I’m getting this error after I set t...
# troubleshooting
k
Hey everyone! I’m getting this error after I set the executor to the LocalExecutor. Any suggestions/thoughts on that?
meltano invoke scheduler -D
StrictVersion object has no attribute 'version'
d
@ks Do you see any additional output when you run with
meltano --log-level=debug
?
k
Copy code
File "/Users/kaan.simsek/opt/miniconda3/envs/elt/lib/python3.7/distutils/version.py", line 170, in _cmp
    if self.version != other.version:
AttributeError: 'StrictVersion' object has no attribute 'version'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/kaan.simsek/opt/miniconda3/envs/elt/lib/python3.7/site-packages/meltano/cli/__init__.py", line 51, in main
    raise CliError(str(err)) from err
meltano.cli.utils.CliError: 'StrictVersion' object has no attribute 'version'
'StrictVersion' object has no attribute 'version'
@douwe_maan
Copy code
File "/Users/kaan.simsek/opt/miniconda3/envs/elt/lib/python3.7/site-packages/meltano/core/behavior/hookable.py", line 89, in trigger
    hook_func(target, *args, **kwargs)
  File "/Users/kaan.simsek/opt/miniconda3/envs/elt/lib/python3.7/site-packages/meltano/core/plugin/airflow.py", line 92, in before_configure
    if StrictVersion(version) < StrictVersion("2.0.0")
  File "/Users/kaan.simsek/opt/miniconda3/envs/elt/lib/python3.7/distutils/version.py", line 52, in __lt__
    c = self._cmp(other)
  File "/Users/kaan.simsek/opt/miniconda3/envs/elt/lib/python3.7/distutils/version.py", line 170, in _cmp
    if self.version != other.version:
AttributeError: 'StrictVersion' object has no attribute 'version'
d
@ks Let's try this: In that
meltano --log-level=debug ...
output, you should see a line prefixed with
Invoking:
, followed by an absolute path that includes
.meltano/orchestrators/airflow/venv
and probably end with
bin/airflow
. Can you take that path and run it by itself with
version
, as in:
Copy code
/Users/.../path/to/project/.../.meltano/orchestrators/airflow/venv/bin/airflow version
I'd like to see what that says
k
@douwe_maan ow version 1.10.14
d
That's odd,
'StrictVersion' object has no attribute 'version'
suggests that when Meltano tried to call
airflow version
itself, it got an error or empty output
meltano invoke airflow scheduler
is still failing?
k
Yes both are failing
d
OK, let's add some debugging statements into the code. Can you open
/Users/kaan.simsek/opt/miniconda3/envs/elt/lib/python3.7/site-packages/meltano/core/plugin/airflow.py
, and just after the line
version, err = handle.communicate()
add:
Copy code
logging.warning(f"Stdout: {version}")
logging.warning(f"Stderr: {err}")
And then run
meltano invoke airflow scheduler
again
k
I tried w/ default sqlite so it gives errors. I need to change it to postgresql or something else. Thanks @douwe_maan
Copy code
self.get('core', 'executor')))
airflow.exceptions.AirflowConfigException: error: cannot use sqlite with the LocalExecutor
d
Ah, now we're getting somewhere!
Do you think you could file an issue on https://gitlab.com/meltano/meltano/-/issues about that useless
StrictVersion object has no attribute 'version'
error? We should always be printing the actual error message
k
Sure I will file an issue about that on GitLab. It may be good to put a remainder on documentation for newcomers.
d
Good idea, thanks!