Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Anirudh\Documents\flask_app\connecting_to_database\application.py", line 2, in <module>
from flask_sqlalchemy import SQLAlchemy
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python38\lib\site-packages\flask_sqlalchemy\__init__.py", line 18, in <module>
import sqlalchemy
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\__init__.py", line 9, in <module>
from .sql import (
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in <module>
from .expression import (
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\sql\expression.py", line 34, in <module>
from .visitors import Visitable
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in <module>
from .. import util
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in <module>
from .compat import callable, cmp, reduce, \
File "C:\Users\Anirudh\AppData\Local\Programs\Python\Python38\lib\site-packages\sqlalchemy\util\compat.py", line 234, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
I had this issue with SQLAlchemy 1.2.10. Upgrading to the current version (1.3.18 as of now) fixed the problem
pip install sqlalchemy --upgrade
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