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
The urllib submodules (request, parse, etc.) are used in a few code paths, most notably the command-line interface. Importing urllib on its own does nothing, as its __init__.py is empty (see https://github.com/python/cpython/tree/3.12/Lib/urllib/). This leads to a crash if the code tries to use the modules.
Code for reproduction
$ yt download --list
Actual outcome
Traceback (most recent call last):
File "/home/eric/mambaforge/envs/yt-devel/bin/yt", line 8, in <module>
sys.exit(run_main())
File "/home/eric/build/yt/yt/utilities/command_line.py", line 1613, in run_main
args.func(args)
File "/home/eric/build/yt/yt/utilities/command_line.py", line 223, in run
self(args)
File "/home/eric/build/yt/yt/utilities/command_line.py", line 1555, in __call__
self.get_list()
File "/home/eric/build/yt/yt/utilities/command_line.py", line 1589, in get_list
urllib.request.urlopen("http://yt-project.org/data/datafiles.json")
AttributeError: module 'urllib' has no attribute 'request'
Hi, and welcome to yt! Thanks for opening your first issue. We have an issue template that helps us to gather relevant information to help diagnosing and fixing the issue.
Bug report
Bug summary
The
urllib
submodules (request
,parse
, etc.) are used in a few code paths, most notably the command-line interface. Importingurllib
on its own does nothing, as its__init__.py
is empty (see https://github.com/python/cpython/tree/3.12/Lib/urllib/). This leads to a crash if the code tries to use the modules.Code for reproduction
$ yt download --list
Actual outcome
Expected outcome
It should list all the data files available on https://yt-project.org/data.
Version Information
The text was updated successfully, but these errors were encountered: