Comments (4)
Same! Shame because this looks really nice.
$ flask initdb
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Users\necer\.virtualenvs\full-flask-template\Scripts\flask.exe\__main__.py", line 7, in <module>
File "C:\Users\necer\.virtualenvs\full-flask-template\Lib\site-packages\flask\cli.py", line 994, in main
cli.main(args=sys.argv[1:])
File "C:\Users\necer\.virtualenvs\full-flask-template\Lib\site-packages\flask\cli.py", line 600, in main
return super().main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\necer\.virtualenvs\full-flask-template\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\necer\.virtualenvs\full-flask-template\Lib\site-packages\click\core.py", line 1651, in invoke
cmd_name, cmd, args = self.resolve_command(ctx, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\MY WEBSITES\full-flask-template\flask-starter\flaskstarter\extensions.py", line 11, in <module>
db = SQLAlchemy()
^^^^^^^^^^^^
File "C:\Users\necer\.virtualenvs\full-flask-template\Lib\site-packages\flask_sqlalchemy\__init__.py", line 758, in __init__
_include_sqlalchemy(self, query_class)
File "C:\Users\necer\.virtualenvs\full-flask-template\Lib\site-packages\flask_sqlalchemy\__init__.py", line 112, in _include_sqlalchemy
for key in module.__all__:
^^^^^^^^^^^^^^
AttributeError: module 'sqlalchemy' has no attribute '__all__'. Did you mean: '__file__'?
from flask-starter.
As of Dec' 2023, It's working with the latest version along with few tweaks in the code:
-
In
flaskstarter/frontend/forms.py
:
Replacefrom flask import Markup
withfrom markupsafe import Markup
-
In
flaskstarter/config.py
:
Replace (or Comment Out)SQLALCHEMY_DATABASE_URI = 'sqlite:///' + INSTANCE_FOLDER_PATH + '/db.sqlite'
withSQLALCHEMY_DATABASE_URI = 'sqlite:///db.sqlite'
-
Use the Below working
requirements.txt
Instead:
blinker==1.7.0
cachelib==0.9.0
click==8.1.7
colorama==0.4.6
dnspython==2.4.2
email-validator==2.1.0.post1
exceptiongroup==1.2.0
Flask==3.0.0
Flask-Admin==1.6.1
Flask-Caching==2.1.0
Flask-Login==0.6.3
Flask-Mail==0.9.1
Flask-SQLAlchemy==3.1.1
Flask-WTF==1.2.1
greenlet==3.0.3
idna==3.6
importlib-metadata==7.0.1
iniconfig==2.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
packaging==23.2
pluggy==1.3.0
pytest==7.4.3
SQLAlchemy==2.0.24
tomli==2.0.1
typing_extensions==4.9.0
Werkzeug==3.0.1
WTForms==3.1.1
zipp==3.17.0
from flask-starter.
It works when you just remove all version requirements from requirements.txt
As of Sep 20, 2023, I got these versions to work:
1 │ Package Version
2 │ ----------------- -----------
3 │ asgiref 3.7.2
4 │ attrs 23.1.0
5 │ blinker 1.6.2
6 │ cachelib 0.9.0
7 │ click 8.1.7
8 │ defusedxml 0.7.1
9 │ dnspython 2.4.2
10 │ email-validator 2.0.0.post2
11 │ exceptiongroup 1.1.3
12 │ Flask 2.3.3
13 │ Flask-Admin 1.6.1
14 │ Flask-Caching 2.0.2
15 │ Flask-Login 0.6.2
16 │ Flask-Mail 0.9.1
17 │ Flask-SQLAlchemy 3.1.1
18 │ Flask-WTF 1.1.1
19 │ Glances 3.4.0.3
20 │ greenlet 2.0.2
21 │ idna 3.4
22 │ iniconfig 2.0.0
23 │ itsdangerous 2.1.2
24 │ Jinja2 3.1.2
25 │ MarkupSafe 2.1.3
26 │ packaging 23.1
27 │ pip 23.2.1
28 │ pluggy 1.3.0
29 │ psutil 5.9.5
30 │ py 1.11.0
31 │ pytest 7.4.2
32 │ setuptools 68.2.2
33 │ SQLAlchemy 2.0.21
34 │ tomli 2.0.1
35 │ typing_extensions 4.8.0
36 │ ujson 5.7.0
37 │ Werkzeug 2.3.7
38 │ wheel 0.41.2
39 │ WTForms 3.0.1
from flask-starter.
Seems like the issue is based on compatibility between sqlalchemy and Flask-sqlAlchemy.
Add this line to the bottom of your requirements.txt
SQLAlchemy>=1.3.0,<2.0.0
from flask-starter.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-starter.