Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/app/superset/extensions/../migrations already exists and is not empty #31609

Closed
3 tasks
Varick-Wang opened this issue Dec 24, 2024 · 3 comments
Closed
3 tasks
Labels
install:docker Installation - docker container

Comments

@Varick-Wang
Copy link

Bug description

docker image : apache/superset:latest
-=-=-=-=-=-=-=-=-=-=-
superset version: 4.1.1
-=-=-=-=-=-=-=-=-=-=-
How to solve the error '/app/superset/extensions/../migrations already exists and is not empty' when executing the command 'superset init' during software startup

Screenshots/recordings

No response

Superset version

4.1.1

Python version

3.10

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Dec 24, 2024

Hey @Varick-Wang! I'm here to help you with any bugs, questions, or contributions for Superset. Let's squash this bug together!

The error message '/app/superset/extensions/../migrations already exists and is not empty' typically indicates that the migrations directory already contains files or directories, which might be causing a conflict during the initialization process. Here are a few steps you can take to resolve this issue:

  1. Backup and Clear the Migrations Directory:

    • Navigate to the migrations directory and back up any important files.
    • Clear the contents of the directory to ensure it is empty before running the superset init command again.
  2. Check for Unapplied Migrations:

    • Ensure that all migrations have been applied to your database. You can use Alembic commands to check the current state of migrations.
  3. Rebuild the Docker Image:

    • If you are using Docker, try rebuilding the Docker image to ensure that there are no residual files from previous builds.
  4. Verify Configuration:

    • Check the alembic.ini configuration file for any settings that might affect migrations, such as the file_template setting [1].

By following these steps, you should be able to resolve the error and successfully initialize Superset.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the install:docker Installation - docker container label Dec 24, 2024
@Habeeb556
Copy link
Contributor

I think you should run superset db upgrade before superset init to ensure it's up-to-date and no migration files are missed.

@Varick-Wang
Copy link
Author

Yes, you're right.

First, execute 'superset db upgradeThen superset init `

thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:docker Installation - docker container
Projects
None yet
Development

No branches or pull requests

2 participants