I have added a validators library to my google app engine by manually adding the code to a folder lib/validators
. Then in my code I added this line
from validators.utils import ValidationFailure
When I run my app I got an exception from this line:
from validators.utils import ValidationFailure
File "lib/validators/__init__.py", line 1, in <module>
from .between import between
File "lib/validators/between.py", line 2, in <module>
from .utils import validator
File "lib/validators/utils.py", line 5, in <module>
from decorator import decorator
ImportError: No module named decorator
If I run from decorator import decorator
in the python intrepretor, it works as expected.
However when I tried it in the 'interactive console' in the local development server, I got the same error
How can I resolve this exception?
This worked for me, I installed the decorator package specifically for Python 3.4:
sudo python3.4 -m pip install decorator # specifically Python 3.4
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