Exercise 22 Issue
lcevallo opened this issue · 1 comments
I have this issue I think is in utils.py with the method pbkdf2_sha256.hash(password)
Traceback (most recent call last):
File "C:\Users\Administrator\Documents\NetBeansProjects\Python\smilecook\app.py", line 8, in
from resources.user import UserListResource
File "C:\Users\Administrator\Documents\NetBeansProjects\Python\smilecook\resources\user.py", line 4, in
from utils import hash_password
File "C:\Users\Administrator\Documents\NetBeansProjects\Python\smilecook\utils.py", line 1, in
from passlib.hash import pbkdf2_sha256
File "C:\Users\Administrator\Documents\NetBeansProjects\Python\smilecook\venv\lib\site-packages\passlib\hash.py", line 25, in
from passlib.registry import proxy
File "C:\Users\Administrator\Documents\NetBeansProjects\Python\smilecook\venv\lib\site-packages\passlib\registry.py", line 12, in
from passlib.ifc import PasswordHash
File "C:\Users\Administrator\Documents\NetBeansProjects\Python\smilecook\venv\lib\site-packages\passlib\ifc.py", line 10, in
from passlib.utils.decor import deprecated_method
File "C:\Users\Administrator\Documents\NetBeansProjects\Python\smilecook\venv\lib\site-packages\passlib\utils_init.py", line 845, in
from time import clock as timer
ImportError: cannot import name 'clock' from 'time' (unknown location)
I was going through this course to start working on setting up my own API's for fun and ran into the same issue. If someone else runs into this, the fix for me was to update passlib to 1.7.2. Looks like some updates were made with python 3.8 and higher that causes this to not work as it sits.