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

hv.help errors on object created using hvplot: AttributeError: 'NoneType' object has no attribute 'registry' #5364

Closed
MarcSkovMadsen opened this issue Jul 24, 2022 · 6 comments · Fixed by #6250
Labels
type: bug Something isn't correct or isn't working

Comments

@MarcSkovMadsen
Copy link
Collaborator

I'm trying to add tooltips for hvplot in holoviz/hvplot#789. As a part of would like to use hv.help to demonstrate how easy it is to drop into HoloViews for more power and flexibility. But it seems its not that easy.

import pandas as pd, numpy as np
import hvplot.pandas

idx = pd.date_range('1/1/2000', periods=1000)
df  = pd.DataFrame(np.random.randn(1000, 4), index=idx, columns=list('ABCD')).cumsum()
curves = df.hvplot()

import holoviews as hv
hv.extension("bokeh")
hv.help(curves)
$ python 'script.py'
Traceback (most recent call last):
  File "script.py", line 10, in <module>
    hv.help(curves)
  File "C:\Users\masma\Anaconda3\envs\hvplot_dev\lib\site-packages\holoviews\__init__.py", line 81, in help
    recursive=recursive, pattern=pattern, elements=elements_list)
  File "C:\Users\masma\Anaconda3\envs\hvplot_dev\lib\site-packages\holoviews\core\options.py", line 1239, in info
    pattern=pattern, elements=elements)
  File "C:\Users\masma\Anaconda3\envs\hvplot_dev\lib\site-packages\holoviews\core\pprint.py", line 144, in info
    backend_registry = cls.store.registry.get(backend, {})
AttributeError: 'NoneType' object has no attribute 'registry'

I'm on the main branch of hvPlot and just installed latest version of HoloViews.

@MarcSkovMadsen MarcSkovMadsen added this to the 1.15.0 milestone Jul 24, 2022
@maximlt
Copy link
Member

maximlt commented Jul 24, 2022

I'm on the master branch of these two libraries and cannot reproduce this error, either by running the code in a notebook or as a script.

@philippjfr philippjfr removed this from the 1.15.0 milestone Jul 24, 2022
@philippjfr philippjfr added the needs info More information required from issue creator label Jul 24, 2022
@maximlt maximlt added type: bug Something isn't correct or isn't working and removed tag: bug labels Aug 25, 2022
@hoxbro
Copy link
Member

hoxbro commented Apr 28, 2023

I cannot reproduce the issue. Feel free to open it if you are still having this problem.

@hoxbro hoxbro closed this as completed Apr 28, 2023
@hoxbro hoxbro removed the needs info More information required from issue creator label Apr 28, 2023
@DylanTHebert
Copy link

This is old and maybe no longer relevant, but I've been struggling with this issue, the problem appears to be a missing dependency that comes with JupyterLabs, which I assume basically everyone normally installs and is why this wasn't able to be reproduced. I discovered this from the most recent reply on the following stack overflow post:

https://stackoverflow.com/questions/65191364/how-to-view-opts-for-holoviews-with-bokeh-in-python?newreg=782928f68c4d4bc994a07640ac4e6e48

I've been able to reproduce by starting a fresh env in python 3.9.7, installing holoviews 1.15.4, or 1.18 only via pip, and running the imports, set backend, and help command as done in the original question. Then installing jupterlab fixes the issue, but only on 1.15.4, it persists on 1.18 at least on python 3.9.

@TheoMathurin
Copy link
Contributor

I can confirm I always get this error within a Python console. I don't have jupyterlab installed in my environments.

@way-zer
Copy link

way-zer commented May 27, 2024

I also encountered this problem, and a quick workaround:

add InfoPrinter.store=cls inside Store.info function before call InfoPrinter.info

When InfoPrinter.store init normally? I only found default value None

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants