You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running the cli utility version 20221209_b864626, seeing an error due to a missing py import.
To Reproduce twspace_dl
Expected behavior
No error
Output
Traceback (most recent call last):
File "/usr/bin/twspace_dl", line 5, in <module>
from twspace_dl.__main__ import main
File "/usr/lib64/python3.9/site-packages/twspace_dl/__init__.py", line 3, in <module>
from .twspace import Twspace
File "/usr/lib64/python3.9/site-packages/twspace_dl/twspace.py", line 10, in <module>
from requests.exceptions import JSONDecodeError
ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions' (/usr/lib64/python3.9/site-packages/requests/exceptions.py)
Desktop (please complete the following information):
OS: Slackware64 Linux 15.0
Version: 20221209_b864626
Installation method: pip3 from github source
Additional context
Possible fix:
modify twspace.py as follows:
Delete: from requests.exceptions import JSONDecodeError
Add: from json import JSONDecodeError
I don't know if this is the "right fix" but it seems to work.
The text was updated successfully, but these errors were encountered:
edrozenberg
changed the title
Suggested fix for cannot import name 'JSONDecodeError'
Suggested fix for "cannot import name 'JSONDecodeError'"
Jan 9, 2023
Describe the bug
When running the cli utility version
20221209_b864626
, seeing an error due to a missing py import.To Reproduce
twspace_dl
Expected behavior
No error
Output
Desktop (please complete the following information):
Additional context
Possible fix:
modify
twspace.py
as follows:Delete:
from requests.exceptions import JSONDecodeError
Add:
from json import JSONDecodeError
I don't know if this is the "right fix" but it seems to work.
The text was updated successfully, but these errors were encountered: