I setup virtualenv using python 3.4.3 and tried to import JSONDecodeError from json.decoder
from json.decoder import JSONDecodeError (I think its valid in python3 ? But why not working for me ?)
But it is not working. Only below is working:
from simplejson import JSONDecodeError
How I did ?
virtualenv venv --no-site-packages -p python3
pip install ipython
ipython
from json.decoder import JSONDecodeError
ImportError: cannot import name 'JSONDecodeError'
According to 3.4.x docs, plain ValueError
is raised when JSON decoding fails.
JSONDecodeError
class is available starting from 3.5.x.