miguelgrinberg / REST-auth

Example application for my RESTful Authentication with Flask article.
http://blog.miguelgrinberg.com/post/restful-authentication-with-flask
MIT License
922 stars 337 forks source link

Upgrade SQLAlchemy from 1.1.1 to 1.3.6 #24

Closed dealenx closed 3 years ago

dealenx commented 3 years ago

Python v3.8.5 OS: Windows 10

During running I had an error:

Traceback (most recent call last):
  File "api.py", line 5, in <module>
    from flask_sqlalchemy import SQLAlchemy
  File "C:\dev\work\REST-auth\venv\lib\site-packages\flask_sqlalchemy\__init__.py", line 13, in <module>
    import sqlalchemy
  File "C:\dev\work\REST-auth\venv\lib\site-packages\sqlalchemy\__init__.py", line 9, in <module>
    from .sql import (
  File "C:\dev\work\REST-auth\venv\lib\site-packages\sqlalchemy\sql\__init__.py", line 8, in <module>
    from .expression import (
  File "C:\dev\work\REST-auth\venv\lib\site-packages\sqlalchemy\sql\expression.py", line 33, in <module>
    from .visitors import Visitable
  File "C:\dev\work\REST-auth\venv\lib\site-packages\sqlalchemy\sql\visitors.py", line 28, in <module>
    from .. import util
  File "C:\dev\work\REST-auth\venv\lib\site-packages\sqlalchemy\util\__init__.py", line 8, in <module>
    from .compat import callable, cmp, reduce,  \
  File "C:\dev\work\REST-auth\venv\lib\site-packages\sqlalchemy\util\compat.py", line 172, in <module>
    time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'

In this topic i found a solution which is related to update SQLAlchemy from 1.1.11 to 1.3.6.

After that it is possible to run successfully.