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

With latest ipywidgets and IPython, get AttributeError: 'tqdm_notebook' object has no attribute 'disp' #1453

Open
tswast opened this issue Mar 23, 2023 · 2 comments

Comments

@tswast
Copy link

tswast commented Mar 23, 2023

nox > python -m pip freeze
...
ipython==8.11.0
ipywidgets==8.0.5
jedi==0.18.2
jupyterlab-widgets==3.0.6
matplotlib-inline==0.1.6
...
tqdm==4.65.0
...
widgetsnbextension==4.0.6
...
ests/unit/test_magics.py .F.Exception ignored in: <function tqdm.__del__ at 0x7fd8d74455e0>
Traceback (most recent call last):
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/std.py", line 1145, in __del__
    self.close()
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/notebook.py", line 283, in close
    self.disp(bar_style='danger', check_delay=False)
AttributeError: 'tqdm_notebook' object has no attribute 'disp'
F...............................FException ignored in: <function tqdm.__del__ at 0x7fd8d74455e0>
Traceback (most recent call last):
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/std.py", line 1145, in __del__
    self.close()
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/notebook.py", line 283, in close
    self.disp(bar_style='danger', check_delay=False)
AttributeError: 'tqdm_notebook' object has no attribute 'disp'
FException ignored in: <function tqdm.__del__ at 0x7fd8d74455e0>
Traceback (most recent call last):
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/std.py", line 1145, in __del__
    self.close()
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/notebook.py", line 283, in close
    self.disp(bar_style='danger', check_delay=False)
AttributeError: 'tqdm_notebook' object has no attribute 'disp'
FException ignored in: <function tqdm.__del__ at 0x7fd8d74455e0>
Traceback (most recent call last):
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/std.py", line 1145, in __del__
    self.close()
  File "/tmpfs/src/github/python-bigquery/.nox/prerelease_deps-3-8/lib/python3.8/site-packages/tqdm/notebook.py", line 283, in close
    self.disp(bar_style='danger', check_delay=False)
AttributeError: 'tqdm_notebook' object has no attribute 'disp'
F....... [ 48%]
@tswast
Copy link
Author

tswast commented Mar 23, 2023

Also:

_____________________ test_context_with_default_connection _____________________

self = <ipywidgets.widgets.trait_types.InstanceDict object at 0x7fe3e9e720d0>
obj = <[ModuleNotFoundError("No module named 'ipykernel'") raised in repr()] FloatProgress object at 0x7fe3e3a4a150>
cls = <class 'ipywidgets.widgets.widget_float.FloatProgress'>

    def get(self, obj, cls=None):
        try:
>           value = obj._trait_values[self.name]
E           KeyError: 'layout'

.nox/prerelease_deps-3-11/lib/python3.11/site-packages/traitlets/traitlets.py:656: KeyError

During handling of the above exception, another exception occurred:

@tswast
Copy link
Author

tswast commented Mar 23, 2023

On second thought, this might not be an issue with tqdm itself?

Looking at jupyter-widgets/ipywidgets#3533 -- looks like a dependency on ipykernel was removed even though we still need it?

Edit: See also plotly/plotly.py#4120 which appears to be dealing with the same issue.

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

No branches or pull requests

1 participant