You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "ampil (via GitHub)" <gi...@apache.org> on 2024/12/19 09:27:57 UTC

Re: [I] I'm getting ERROR:flask_migrate:Error while upgrading. [superset]

ampil commented on issue #30211:
URL: https://github.com/apache/superset/issues/30211#issuecomment-2553181309

   @dosu,
   
   I am having the same error after Superset upgrade.
   Upgraded Superset from 3.0.0 to 4.1.1: `sudo pip install apache-superset --upgrade` .
   
   `superset db upgrade` passed successfully.
   
   `superset db init` returns an error: 
   ```
   ERROR:flask_migrate:Error: Directory /usr/local/lib/python3.9/site-packages/superset/extensions/../migrations already exists and is not empty
   ```
   
   I tried:
   1. deleting the `migrations` folder and running `superset db init`  again. 
   In this case the error message is:
   ```
   
   Traceback (most recent call last):
     File "/usr/local/bin/superset", line 5, in <module>
       from superset.cli.main import superset
     File "/usr/local/lib/python3.9/site-packages/superset/cli/main.py", line 53, in <module>
       module = importlib.import_module(module_name)
     File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
       return _bootstrap._gcd_import(name[level:], package, level)
     File "/usr/local/lib/python3.9/site-packages/superset/cli/viz_migrations.py", line 27, in <module>
       from superset.migrations.shared.migrate_viz.base import (
   ModuleNotFoundError: No module named 'superset.migrations'
   ```
   2. Deleting all contents in the `migrations` folder except for python scripts and running `superset db init`  again. The error message persists:
   ```
   ERROR:flask_migrate:Error: Directory /usr/local/lib/python3.9/site-packages/superset/extensions/../migrations already exists and is not empty
   ```
   
   I run it on Linux CentOS.
   
   How to pass `superset db init` and fix the errors ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org