AbdealiJK opened a new issue #5005: DB Upgrade - Fails with sqlalchemy_utils errors URL: https://github.com/apache/incubator-superset/issues/5005 Make sure these boxes are checked before submitting your issue - thank you! - [X] I have checked the superset logs for python stacktraces and included it here as text if any - [X] I have reproduced the issue with at least the latest released version of superset - [X] I have checked the issue tracker for the same issue and I haven't found one similar ### Superset version 0.25.2 ### Expected results DB upgrade should happen seamlessly. ### Actual results DB upgrade fails on fresh installs. ### Steps to reproduce I was following steps at https://superset.incubator.apache.org/installation.html# and found that the "superset db upgrade" step fails. ```python $ superset db upgrade 2018-05-15 14:28:24,171:DEBUG:passlib.utils.compat:loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'> 2018-05-15 14:28:24,172:DEBUG:passlib.utils.compat:loaded lazy attr 'NativeStringIO': <class '_io.StringIO'> 2018-05-15 14:28:24,172:DEBUG:passlib.utils.compat:loaded lazy attr 'BytesIO': <class '_io.BytesIO'> INFO [alembic.runtime.migration] Context impl SQLiteImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. Traceback (most recent call last): File "/Users/abdealijk/anaconda3/bin/superset", line 15, in <module> manager.run() File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_script/__init__.py", line 417, in run result = self.handle(argv[0], argv[1:]) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_script/__init__.py", line 386, in handle res = handle(*args, **config) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_script/commands.py", line 216, in __call__ return self.run(*args, **kwargs) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_migrate/__init__.py", line 259, in upgrade command.upgrade(config, revision, sql=sql, tag=tag) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/command.py", line 254, in upgrade script.run_env() File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py", line 427, in run_env util.load_python_file(self.dir, 'env.py') File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file module = load_module_py(module_id, path) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/compat.py", line 83, in load_module_py spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/superset/migrations/env.py", line 103, in <module> run_migrations_online() File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/superset/migrations/env.py", line 96, in run_migrations_online context.run_migrations() File "<string>", line 8, in run_migrations File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/runtime/environment.py", line 836, in run_migrations self.get_context().run_migrations(**kw) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/runtime/migration.py", line 321, in run_migrations for step in self._migrations_fn(heads, self): File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/command.py", line 243, in upgrade return script._upgrade_revs(revision, rev) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py", line 336, in _upgrade_revs revs = list(revs) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py", line 656, in _iterate_revisions uppers = util.dedupe_tuple(self.get_revisions(upper)) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py", line 301, in get_revisions resolved_id, branch_label = self._resolve_revision_number(id_) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py", line 437, in _resolve_revision_number self._revision_map File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/langhelpers.py", line 239, in __get__ obj.__dict__[self.__name__] = result = self.fget(obj) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py", line 122, in _revision_map for revision in self._generator(): File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py", line 99, in _load_revisions script = Script._from_filename(self, vers, file_) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py", line 812, in _from_filename module = util.load_python_file(dir_, filename) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 81, in load_python_file module = load_module_py(module_id, path) File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/compat.py", line 83, in load_module_py spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py", line 16, in <module> from sqlalchemy_utils.types.encrypted import EncryptedType ImportError: cannot import name 'EncryptedType' ``` On checking, it looks like a wrong import - If I change the `from sqlalchemy_utils.types.encrypted import EncryptedType` to `from sqlalchemy_utils.types.encrypted.encrypted_type import EncryptedType` it works.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org