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

zarr.tree() example in docs doesn't work as of 2.4.0 #537

Closed
ryan-williams opened this issue Feb 17, 2020 · 6 comments · Fixed by #539
Closed

zarr.tree() example in docs doesn't work as of 2.4.0 #537

ryan-williams opened this issue Feb 17, 2020 · 6 comments · Fixed by #539

Comments

@ryan-williams
Copy link
Member

Minimal, reproducible code sample, a copy-pastable example if possible

Taken from the docs:

import h5py
import zarr
import numpy as np
source = h5py.File('data/example.h5', mode='w')
foo = source.create_group('foo')
baz = foo.create_dataset('bar/baz', data=np.arange(100), chunks=(50,))
spam = source.create_dataset('spam', data=np.arange(100, 200), chunks=(30,))
zarr.tree(source)

Problem description

Tree widget renders correctly in Zarr 2.3.2:
image

Same code throws a ValueError (and renders some text) in 2.4.0:
image

Version and installation information

2.3.2 works as expected; pip freeze:

appnope==0.1.0
asciitree==0.3.3
backcall==0.1.0
decorator==4.4.1
fasteners==0.15
h5py==2.10.0
ipykernel==5.1.4
ipython==7.12.0
ipython-genutils==0.2.0
jedi==0.16.0
jupyter-client==5.3.4
jupyter-core==4.6.2
monotonic==1.5
numcodecs==0.6.4
numpy==1.18.1
parso==0.6.1
pexpect==4.8.0
pickleshare==0.7.5
prompt-toolkit==3.0.3
ptyprocess==0.6.0
Pygments==2.5.2
python-dateutil==2.8.1
pyzmq==18.1.1
six==1.14.0
tornado==6.0.3
traitlets==4.3.3
wcwidth==0.1.8
zarr==2.3.2

2.4.0 exhibits the failure; pip freeze:

appnope==0.1.0
asciitree==0.3.3
backcall==0.1.0
decorator==4.4.1
fasteners==0.15
h5py==2.10.0
ipykernel==5.1.4
ipython==7.12.0
ipython-genutils==0.2.0
jedi==0.16.0
jupyter-client==5.3.4
jupyter-core==4.6.2
monotonic==1.5
numcodecs==0.6.4
numpy==1.18.1
parso==0.6.1
pexpect==4.8.0
pickleshare==0.7.5
prompt-toolkit==3.0.3
ptyprocess==0.6.0
Pygments==2.5.2
python-dateutil==2.8.1
pyzmq==18.1.1
six==1.14.0
tornado==6.0.3
traitlets==4.3.3
wcwidth==0.1.8
zarr==2.4.0

(the Zarr version is the only difference)

#450 seems relevant (cc @jakirkham); possibly discussion at #259 as well.

@jakirkham
Copy link
Member

Are you rendering it in the notebook? If so, you need to install ipytree now. This dependency was added so rendering would work in JupyterLab. Though, once installed, it should work in the notebook too.

Sounds like we could use a clear error message though.

@jakirkham
Copy link
Member

@ryan-williams? 🙂

@mzjp2
Copy link
Member

mzjp2 commented Feb 22, 2020

Should we add ipytree to our requirements in that case? (or make it an extras_require?)

@jakirkham
Copy link
Member

It is listed in the extras_require.

@mzjp2
Copy link
Member

mzjp2 commented Feb 22, 2020 via email

@jakirkham
Copy link
Member

No worries 😉

Yeah we can make this fallback behavior nicer 🙂

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

Successfully merging a pull request may close this issue.

3 participants