{"action":"opened","issue":{"url":"https://api.github.com/repos/apache/incubator-superset/issues/5005","repository_url":"https://api.github.com/repos/apache/incubator-superset","labels_url":"https://api.github.com/repos/apache/incubator-superset/issues/5005/labels{/name}","comments_url":"https://api.github.com/repos/apache/incubator-superset/issues/5005/comments","events_url":"https://api.github.com/repos/apache/incubator-superset/issues/5005/events","html_url":"https://github.com/apache/incubator-superset/issues/5005","id":323127536,"number":5005,"title":"DB Upgrade - Fails with sqlalchemy_utils errors","user":{"login":"AbdealiJK","id":2200743,"avatar_url":"https://avatars3.githubusercontent.com/u/2200743?v=4","gravatar_id":"","url":"https://api.github.com/users/AbdealiJK","html_url":"https://github.com/AbdealiJK","followers_url":"https://api.github.com/users/AbdealiJK/followers","following_url":"https://api.github.com/users/AbdealiJK/following{/other_user}","gists_url":"https://api.github.com/users/AbdealiJK/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdealiJK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdealiJK/subscriptions","organizations_url":"https://api.github.com/users/AbdealiJK/orgs","repos_url":"https://api.github.com/users/AbdealiJK/repos","events_url":"https://api.github.com/users/AbdealiJK/events{/privacy}","received_events_url":"https://api.github.com/users/AbdealiJK/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-15T09:03:37Z","updated_at":"2018-05-15T09:03:37Z","closed_at":null,"author_association":"NONE","body":"Make sure these boxes are checked before submitting your issue - thank you!\r\n\r\n- [X] I have checked the superset logs for python stacktraces and included it here as text if any\r\n- [X] I have reproduced the issue with at least the latest released version of superset\r\n- [X] I have checked the issue tracker for the same issue and I haven't found one similar\r\n\r\n\r\n### Superset version\r\n0.25.2\r\n\r\n### Expected results\r\nDB upgrade should happen seamlessly.\r\n\r\n### Actual results\r\nDB upgrade fails on fresh installs.\r\n\r\n### Steps to reproduce\r\nI was following steps at https://superset.incubator.apache.org/installation.html# and found that the \"superset db upgrade\" step fails.\r\n\r\n\r\n```python\r\n$ superset db upgrade\r\n2018-05-15 14:28:24,171:DEBUG:passlib.utils.compat:loaded lazy attr 'SafeConfigParser': <class 'configparser.ConfigParser'>\r\n2018-05-15 14:28:24,172:DEBUG:passlib.utils.compat:loaded lazy attr 'NativeStringIO': <class '_io.StringIO'>\r\n2018-05-15 14:28:24,172:DEBUG:passlib.utils.compat:loaded lazy attr 'BytesIO': <class '_io.BytesIO'>\r\nINFO  [alembic.runtime.migration] Context impl SQLiteImpl.\r\nINFO  [alembic.runtime.migration] Will assume transactional DDL.\r\nTraceback (most recent call last):\r\n  File \"/Users/abdealijk/anaconda3/bin/superset\", line 15, in <module>\r\n    manager.run()\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_script/__init__.py\", line 417, in run\r\n    result = self.handle(argv[0], argv[1:])\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_script/__init__.py\", line 386, in handle\r\n    res = handle(*args, **config)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_script/commands.py\", line 216, in __call__\r\n    return self.run(*args, **kwargs)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/flask_migrate/__init__.py\", line 259, in upgrade\r\n    command.upgrade(config, revision, sql=sql, tag=tag)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/command.py\", line 254, in upgrade\r\n    script.run_env()\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py\", line 427, in run_env\r\n    util.load_python_file(self.dir, 'env.py')\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/pyfiles.py\", line 81, in load_python_file\r\n    module = load_module_py(module_id, path)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/compat.py\", line 83, in load_module_py\r\n    spec.loader.exec_module(module)\r\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/superset/migrations/env.py\", line 103, in <module>\r\n    run_migrations_online()\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/superset/migrations/env.py\", line 96, in run_migrations_online\r\n    context.run_migrations()\r\n  File \"<string>\", line 8, in run_migrations\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/runtime/environment.py\", line 836, in run_migrations\r\n    self.get_context().run_migrations(**kw)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/runtime/migration.py\", line 321, in run_migrations\r\n    for step in self._migrations_fn(heads, self):\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/command.py\", line 243, in upgrade\r\n    return script._upgrade_revs(revision, rev)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py\", line 336, in _upgrade_revs\r\n    revs = list(revs)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py\", line 656, in _iterate_revisions\r\n    uppers = util.dedupe_tuple(self.get_revisions(upper))\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py\", line 301, in get_revisions\r\n    resolved_id, branch_label = self._resolve_revision_number(id_)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py\", line 437, in _resolve_revision_number\r\n    self._revision_map\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/langhelpers.py\", line 239, in __get__\r\n    obj.__dict__[self.__name__] = result = self.fget(obj)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/revision.py\", line 122, in _revision_map\r\n    for revision in self._generator():\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py\", line 99, in _load_revisions\r\n    script = Script._from_filename(self, vers, file_)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/script/base.py\", line 812, in _from_filename\r\n    module = util.load_python_file(dir_, filename)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/pyfiles.py\", line 81, in load_python_file\r\n    module = load_module_py(module_id, path)\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/alembic/util/compat.py\", line 83, in load_module_py\r\n    spec.loader.exec_module(module)\r\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"/Users/abdealijk/anaconda3/lib/python3.6/site-packages/superset/migrations/versions/289ce07647b_add_encrypted_password_field.py\", line 16, in <module>\r\n    from sqlalchemy_utils.types.encrypted import EncryptedType\r\nImportError: cannot import name 'EncryptedType'\r\n```\r\n\r\nOn 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."}}
{"actor":{"display_login":"AbdealiJK"}}