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

BUG: calling yt.load_sample with no arguments is broken on main #4691

Closed
neutrinoceros opened this issue Oct 9, 2023 · 2 comments · Fixed by #4693
Closed

BUG: calling yt.load_sample with no arguments is broken on main #4691

neutrinoceros opened this issue Oct 9, 2023 · 2 comments · Fixed by #4693
Labels
Milestone

Comments

@neutrinoceros
Copy link
Member

Bug report

Bug summary

This is a regression in yt 4.3 (dev)

I suspect it came from #4646 (cc @chrishavlin). It also shows that this path is currently not tested.

Code for reproduction

$ python -c "import yt; yt.load_sample()`

Actual outcome

One can see which sample datasets are available at: https://yt-project.org/data
or alternatively by running: yt.sample_data.api.get_data_registry_table()
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/robcleme/dev/yt-project/yt/yt/loaders.py", line 1666, in load_sample
    loadable_path, load_kwargs = _get_sample_data(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object

Expected outcome
with yt 4.2.2, no error is raised

One can see which sample datasets are available at: https://yt-project.org/data
or alternatively by running: yt.sample_data.api.get_data_registry_table()

Version Information

  • Operating System: any
  • Python Version: any
  • yt version: 4.3.0dev0
  • Other Libraries (if applicable): N/A
@neutrinoceros neutrinoceros added this to the 4.3.0 milestone Oct 9, 2023
@neutrinoceros neutrinoceros changed the title BUG: calling yt.load_sample with no arguments in broken on main BUG: calling yt.load_sample with no arguments is broken on main Oct 9, 2023
@chrishavlin
Copy link
Contributor

Yup, my pr seems the likely culprit. Happy to put in a fix later today if you don't get to it first :)

@neutrinoceros
Copy link
Member Author

Be my guest !

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

Successfully merging a pull request may close this issue.

2 participants