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

encounter a error said Could not import 'flaskr'. #2

Open
wuutiing opened this issue Jan 6, 2025 · 3 comments
Open

encounter a error said Could not import 'flaskr'. #2

wuutiing opened this issue Jan 6, 2025 · 3 comments

Comments

@wuutiing
Copy link

wuutiing commented Jan 6, 2025

when running flask --app flaskr init-db , meet error

flask --app flaskr init-db
Error: Could not import 'flaskr'.

Usage: flask [OPTIONS] COMMAND [ARGS]...
Try 'flask --help' for help.

Error: No such command 'init-db'.
@volotat
Copy link
Owner

volotat commented Jan 6, 2025

Please, try to use this command for databse initialization.
flask --app app init-db
There are probably some naming mismatch in the installation guide. Please tell me if it worked for you.

@wuutiing
Copy link
Author

wuutiing commented Jan 8, 2025

thanks, later tried flask --app app db init and that worked. May be because version mismatch, in my env installed Flask-Migrate==4.0.7
but after bash run.sh, pages were launched, but setting imagedir ,no response returned, no error log printed, unable to further debug
all logs are like this

Loading model: ./models/MERT-v1-95M
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.env] No changes in schema detected.
Loading model: ./models/MERT-v1-95M
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Loading model: ./models/MERT-v1-95M

@volotat
Copy link
Owner

volotat commented Jan 8, 2025

Really not sure what the problem might be here. What OS do you use?
As a temporary fix, you can configure "media_directory" folders directly in the config.yaml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants