1

I'm using Jupyter notebook and I have a problem with the qgrid package. I'm receiving this message:

TypeError: register() missing 1 required positional argument: 'widget'

I've tried changing the widget to 7.0 ('pip install ipywidgets~=7.0') but it continues to give me the TypeError. I'm working on VS CODE w/ Python 3.8.3.

Btw, I will leave here all the error message

TypeError                                 Traceback (most recent call last)
Cell In[15], line 2
      1 get_ipython().system('pip install ipywidgets==7.0')
----> 2 import qgrid
      4 # Creamos una copia
      5 df2 = df.copy()

File c:\Users\Franco\AppData\Local\Programs\Python\Python38\lib\site-packages\qgrid\__init__.py:3
      1 from ._version import version_info, __version__  # noqa F401
----> 3 from .grid import (
      4     enable,
      5     disable,
      6     set_defaults,
      7     on,
      8     off,
      9     set_grid_option,
     10     show_grid,
     11     QgridWidget,
     12     QGridWidget,
     13 )
     16 def _jupyter_nbextension_paths():
     17     return [
     18         {
     19             "section": "notebook",
...
    562 
    563     """
    565     _view_name = Unicode('QgridView').tag(sync=True)

TypeError: register() missing 1 required positional argument: 'widget'
  • Dynamically installing modules at run time is not among best practices. What happens when you install ipywidgets from the command line? Does it automatically installs a `qgrid` module? – Serge Ballesta Jan 18 '23 at 12:51
  • Can you pin to ipywidgets 8, like it says at the bottom [here](https://github.com/quantopian/qgrid/issues/376#issuecomment-1220968621)? Or maybe your Python is too old? There's issues with qgrid lately because of it being written for old software versions, see [here](https://github.com/quantopian/qgrid/issues/380). Does the alternative mentioned there suffice? It says it works with standard versions available in January 2023. – Wayne Jan 18 '23 at 19:56
  • Sorry that I didn't answer earlier. I've pinned ipywidgets to old versions and it didn't work :( I've trying with this for weeks but it seems to me that it has no solution – Franco Riottini Jan 23 '23 at 13:32
  • 1
    I've used ipydatagrid (https://github.com/bloomberg/ipydatagrid) that it's great. Thanks – Franco Riottini Jan 23 '23 at 17:17

0 Answers0