I'm quite new in python and faced this issue after the manual installation of the new jsonschema
dependency.
$ python /var/www/html/graylog.py
Traceback (most recent call last):
File "/var/www/html/graylog.py", line 18, in <module>
from jsonschema import validate
ImportError: cannot import name 'validate'
Python version 3.6.8
This is the current pip list
Package Version
------------------ --------
attrs 19.3.0
certifi 2019.3.9
chardet 3.0.4
Click 7.0
configparser 5.0.0
Flask 1.0.2
Flask-WTF 0.14.2
grapi 0.1.4
idna 2.8
importlib-metadata 1.6.1
itsdangerous 1.1.0
Jinja2 2.10
jsonschema 3.2.0
M2Crypto 0.35.2
MarkupSafe 1.1.1
Nuitka 0.6.8.3
pip 20.1.1
prometheus-client 0.8.0
PyMySQL 0.9.3
pyrsistent 0.16.0
PySimpleGUI 3.29.0
requests 2.21.0
setuptools 39.2.0
six 1.15.0
urllib3 1.24.1
virtualenv 16.4.3
Werkzeug 0.15.1
WTForms 2.2.1
zipp 3.1.0
Try to update the jsonSchema
version that often solves the error especially if it's been installed manually
pip install --upgrade jsonschema
It may also be that the python
that you are using in your environment may point to a different version that does not contain the jsonSchema
module. Try
python3 /var/www/html/graylog.py
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