Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[urllib imports] Multiple urllib imports are missing #1898

Closed
frosencrantz opened this issue May 14, 2023 · 0 comments · Fixed by #1924
Closed

[urllib imports] Multiple urllib imports are missing #1898

frosencrantz opened this issue May 14, 2023 · 0 comments · Fixed by #1924

Comments

@frosencrantz
Copy link
Contributor

Small description
Missing imports for urllib.error and urllib.parse

Expected result
No stack traces from missing imports.

Actual result with screenshot

First Trace

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/visidata/threads.py", line 200, in _toplevelTryFunc
    t.status = func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/visidata/threads.py", line 219, in _func
    func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/visidata/plugins.py", line 97, in reload
    except urllib.error.URLError as e:
AttributeError: module 'urllib' has no attribute 'error'

Second trace

Traceback (most recent call last):
...
  File "/usr/lib/python3.9/site-packages/visidata/loaders/http.py", line 50, in _iter_lines
    links = urllib.parse.parse_header(linkhdr)
AttributeError: module 'urllib.parse' has no attribute 'parse_header'

Reproduce:

vd https://blog.nature.org/2021/04/12/beaver-otter-muskrat-a-field-guide-to-freshwater-mammals/

Please attach the commandlog (saved with Ctrl-D) to show the steps that led to the issue.
See here for more details.

Additional context
Please include the version of VisiData. Latest develop version of VisData. Python 3.9.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants