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
Traceback (most recent call last):
File "/home/adrien/.local/bin/dbt", line 11, in <module>
load_entry_point('dbt-core==0.19.0', 'console_scripts', 'dbt')()
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2862, in load_entry_point
return ep.load()
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2462, in load
return self.resolve()
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2468, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/adrien/.local/lib/python3.7/site-packages/dbt/main.py", line 2, in <module>
from dbt.logger import GLOBAL_LOGGER as logger, log_cache_events, log_manager
File "/home/adrien/.local/lib/python3.7/site-packages/dbt/logger.py", line 16, in <module>
from dbt.dataclass_schema import dbtClassMixin
File "/home/adrien/.local/lib/python3.7/site-packages/dbt/dataclass_schema.py", line 13, in <module>
from mashumaro.types import SerializableEncoder, SerializableType
ImportError: cannot import name 'SerializableEncoder' from 'mashumaro.types' (/home/adrien/.local/lib/python3.7/site-packages/mashumaro/types.py)
The operating system you're using:
Linux host 5.11.2-arch1-1 #1 SMP PREEMPT Fri, 26 Feb 2021 18:26:41 +0000 x86_64 GNU/Linux
The output of python --version: python 3.7.9
Additional context
I'm not using a virtual environment as advised in the docs because I don't mind but I didn't think it would be a problem. From a virtual environment and install dbt directly everything is fine:
czardien
changed the title
Python3.7 installation from source raises: ImportError: cannot import name 'SerializableEncoder' from 'mashumaro.types'
Python3.7 system installation raises: ImportError: cannot import name 'SerializableEncoder' from 'mashumaro.types'
Mar 3, 2021
Just pointing out that I also get the error from a regular system-wide pip install with python3.7, i.e. not from the source:
$ python3.7 -m ensurepip && python3.7 -m pip install dbt
$ dbt --help
Traceback (most recent call last):
File "/home/adrien/.local/bin/dbt", line 11, in <module>
load_entry_point('dbt-core==0.19.0', 'console_scripts', 'dbt')()
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2862, in load_entry_point
return ep.load()
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2462, in load
return self.resolve()
File "/home/adrien/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2468, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/adrien/.local/lib/python3.7/site-packages/dbt/main.py", line 2, in <module>
from dbt.logger import GLOBAL_LOGGER as logger, log_cache_events, log_manager
File "/home/adrien/.local/lib/python3.7/site-packages/dbt/logger.py", line 16, in <module>
from dbt.dataclass_schema import dbtClassMixin
File "/home/adrien/.local/lib/python3.7/site-packages/dbt/dataclass_schema.py", line 13, in <module>
from mashumaro.types import SerializableEncoder, SerializableType
ImportError: cannot import name 'SerializableEncoder' from 'mashumaro.types' (/home/adrien/.local/lib/python3.7/site-packages/mashumaro/types.py)
hey @czardien, sorry about this. The develop branch of dbt, which is also set as the default branch, is unstable at the moment and it is unable to be installed from source without also installing the dependencies listed in dev_requirements.txt (pip install -r dev_requirements.txt). We are aware of this and will be resolved once #3138 is merged. (which should hopefully be soon!)
As for #3143 (comment), I believe this is related to the previous attempt to install dbt from source. Please uninstall dbt completely first or pass --force-reinstall (python3.7 -m pip install dbt --force-reinstall) Hope this helps! Closing this issue for now, as #3138 should resolve this.
Describe the bug
After installation from source guide: https://docs.getdbt.com/dbt-cli/installation#install-from-source, running
dbt --help
raises:Steps To Reproduce
With a python3.7 package, follow installation from source guide at: https://docs.getdbt.com/dbt-cli/installation#install-from-source:
... should raise the above error.
Expected behavior
... shouldn't raise an error.
Screenshots and log output
The operating system you're using:
Linux host 5.11.2-arch1-1 #1 SMP PREEMPT Fri, 26 Feb 2021 18:26:41 +0000 x86_64 GNU/Linux
The output of
python --version
: python 3.7.9Additional context
I'm not using a virtual environment as advised in the docs because I don't mind but I didn't think it would be a problem. From a virtual environment and install
dbt
directly everything is fine:Another point is that I couldn't find the class
SerializableEncoder
imported at:dataclass_schema.py
inmashumaro.types.py
, with:The text was updated successfully, but these errors were encountered: