cds-astro / ipyaladin

An IPython Widget for Aladin Lite, the sky viewer.
https://cds-astro.github.io/ipyaladin/
BSD 3-Clause "New" or "Revised" License
126 stars 26 forks source link

AttributeError: 'bool' object has no attribute 'warn' #1

Closed cdeil closed 1 year ago

cdeil commented 7 years ago

@tboch - I'm getting this error: https://github.com/cdeil/hipsperiments/blob/master/ipyal_bool_error.ipynb

Note that this is without the extension activated, so maybe it's my fault?

Or is this a bug where you accidentally clobber the log property and should better choose another name for your property?


class Aladin(widgets.DOMWidget):
    log = Bool(True).tag(sync=True, o=True)
 ```
tboch commented 7 years ago

Disclaimer: we started getting familiar with widgets quite recently, I'm not an expert at all.

My understanding is that without activating the extension, this is expected. I get the same error when not activated. Did you manage to make it work once the extension is activated?

christinahedges commented 6 years ago

I have the same error, I followed your install instructions and turned on both extensions with:

jupyter nbextension enable --py widgetsnbextension jupyter nbextension enable --py --sys-prefix ipyaladin

and I get the same issue.

tboch commented 6 years ago

can you check with the following code whether you can display simple widgets:

from ipywidgets import widgets
widgets.IntSlider(
    value=7,
    min=0,
    max=10,
    step=1,
    description='Test:',
    disabled=False,
    continuous_update=False,
    orientation='horizontal',
    readout=True,
    readout_format='d'
)
christinahedges commented 6 years ago

I get the following error:

Error rendering Jupyter widget. Widget not found: {"model_id":"b9825337cd7946cc8dc3343a6623f234"}

tboch commented 6 years ago

Can you check ipywidgets and widgetsnbextension versions?

import ipywidgets
ipywidgets.__version__

import widgetsnbextension
widgetsnbextension.__version__
christinahedges commented 6 years ago

ipywidgets is version 6.0.0 widgetsnbextension is version 3.0.1

christinahedges commented 6 years ago

Updating these fixes the problem. Beautiful widget now works! Thanks for troubleshooting for me

cdeil commented 6 years ago

@tboch - Close this issue? Or is there a way to improve something, i.e. to give an error message that says "You need to activate this extension, see ... for help" instead of an AttributeError?

bmatthieu3 commented 1 year ago

I close the issue as activating the extension is not needed anymore from version 0.1.11