I have the following error:
web_1 | /code/app/__init__.py:4: ExtDeprecationWarning: Importing flask.ext.script is deprecated, use flask_script instead.
web_1 | from flask.ext.script import Manager
web_1 | Traceback (most recent call last):
web_1 | File "run.py", line 2, in <module>
web_1 | from app import app
web_1 | File "/code/app/__init__.py", line 4, in <module>
web_1 | from flask.ext.script import Manager
web_1 | File "/usr/local/lib/python3.6/site-packages/flask/exthook.py", line 110, in load_module
web_1 | raise ImportError('No module named %s' % fullname)
web_1 | ImportError: No module named flask.ext.script
and then I made the change but then it says:
web_1 | Traceback (most recent call last):
web_1 | File "run.py", line 2, in <module>
web_1 | from app import app
web_1 | File "/code/app/__init__.py", line 4, in <module>
web_1 | from flask_script import Manager
web_1 | ModuleNotFoundError: No module named 'flask_script'
I'm a bit confused on how Flask was upgraded. Any advice? Should I fix my flask to an older version, maybe the dependencies aren't upgraded yet?
Using sqlalchemy and migrate:
from flask import Flask
from flask_ext.script import Manager
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.migrate import Migrate, MigrateCommand
I had to explicitly install Flask-Script
Then the imports would work with
from flask_script import Manager
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate, MigrateCommand
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With