hack4impact / flask-base

A simple Flask boilerplate app with SQLAlchemy, Redis, User Authentication, and more.
http://hack4impact.github.io/flask-base
MIT License
3.04k stars 481 forks source link

ModuleNotFoundError: No module named 'flask.ext' #228

Open sathish-sign opened 8 months ago

sathish-sign commented 8 months ago

I have cloned the repo and followed the README.md to start the app. But after running the command honcho start -e config.env -f Local i got below error, seems like the module is depricated.


15:44:52 system   | redis.1 started (pid=3830)
15:44:53 system   | web.1 started (pid=3834)
15:44:53 system   | worker.1 started (pid=3835)
15:44:53 redis.1  | 3833:C 07 Mar 2024 15:44:53.027 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
15:44:53 redis.1  | 3833:C 07 Mar 2024 15:44:53.032 # Redis version=7.0.15, bits=64, commit=00000000, modified=0, pid=3833, just started
15:44:53 redis.1  | 3833:C 07 Mar 2024 15:44:53.033 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.035 * Increased maximum number of open files to 10032 (it was originally set to 1024).
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.036 * monotonic clock: POSIX clock_gettime
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.037 * Running mode=standalone, port=6379.
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.040 # Server initialized
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.041 * Ready to accept connections
15:44:53 worker.1 | Traceback (most recent call last):
15:44:53 worker.1 |   File "userflask-base/manage.py", line 5, in <module>
15:44:53 worker.1 |     from flask_migrate import Migrate, MigrateCommand
15:44:53 worker.1 |   File "/home/user/.flask/lib/python3.11/site-packages/flask_migrate/__init__.py", line 3, in <module>
15:44:53 worker.1 |     from flask.ext.script import Manager
15:44:53 worker.1 | ModuleNotFoundError: No module named 'flask.ext'
15:44:53 web.1    | Traceback (most recent call last):
15:44:53 web.1    |   File "/home/user/flask-base/manage.py", line 5, in <module>
15:44:53 web.1    |     from flask_migrate import Migrate, MigrateCommand
15:44:53 web.1    |   File "/home/user/.flask/lib/python3.11/site-packages/flask_migrate/__init__.py", line 3, in <module>
15:44:53 web.1    |     from flask.ext.script import Manager
15:44:53 web.1    | ModuleNotFoundError: No module named 'flask.ext'
15:44:53 system   | worker.1 stopped (rc=1)
15:44:53 system   | sending SIGTERM to redis.1 (pid 3830)
15:44:53 system   | sending SIGTERM to web.1 (pid 3834)
15:44:53 redis.1  | 3833:signal-handler (1709826293) Received SIGTERM scheduling shutdown...
15:44:53 system   | web.1 stopped (rc=-15)
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.444 # User requested shutdown...
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.444 * Saving the final RDB snapshot before exiting.
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.447 * DB saved on disk
15:44:53 redis.1  | 3833:M 07 Mar 2024 15:44:53.447 # Redis is now ready to exit, bye bye...
15:44:53 system   | redis.1 stopped (rc=-15)```
kaebmoo commented 6 months ago

try to fixed from https://stackoverflow.com/questions/55023231/importerror-no-module-named-flask-ext or I already fixed see in repo https://github.com/kaebmoo/url_shortener/blob/main/user_management/