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

modin_spreadsheet seems broken with ipywidgets 8.0 and python 3.10 #49

Open
mvashishtha opened this issue Mar 6, 2023 · 1 comment
Open

Comments

@mvashishtha
Copy link

Environment

  • Operating System:

  • Python Version: 3.10.4

  • How did you install modin-spreadsheet: pip

  • Python packages:

    Details
      	```
      	aiohttp==3.8.4
      	aiohttp-cors==0.7.0
      	aiosignal==1.3.1
      	altair==4.2.2
      	anyio==3.6.2
      	appnope==0.1.3
      	argon2-cffi==21.3.0
      	argon2-cffi-bindings==21.2.0
      	asn1crypto==1.5.1
      	asttokens==2.2.1
      	async-timeout==4.0.2
      	attrs==22.2.0
      	autopep8==2.0.0
      	Babel==2.11.0
      	backcall==0.2.0
      	backoff==2.1.2
      	bcrypt==4.0.1
      	beautifulsoup4==4.11.1
      	big==0.6.16
      	black==22.10.0
      	bleach==5.0.1
      	blessed==1.19.1
      	blinker==1.5
      	boto==2.49.0
      	boto3==1.26.80
      	botocore==1.29.80
      	cachetools==5.3.0
      	certifi==2022.12.7
      	cffi==1.15.1
      	cfgv==3.3.1
      	charset-normalizer==2.1.1
      	click==8.0.4
      	cloudpickle==2.2.0
      	colorful==0.5.4
      	contourpy==1.0.6
      	cryptography==39.0.1
      	cycler==0.11.0
      	dask==2022.10.2
      	db-dtypes==1.0.5
      	debugpy==1.6.3
      	decorator==5.1.1
      	defusedxml==0.7.1
      	distlib==0.3.6
      	distributed==2022.10.2
      	entrypoints==0.4
      	exceptiongroup==1.1.0
      	execnet==1.9.0
      	executing==1.2.0
      	fabric==2.7.1
      	fastjsonschema==2.16.2
      	filelock==3.9.0
      	fonttools==4.38.0
      	frozenlist==1.3.3
      	fsspec==2023.1.0
      	gitdb==4.0.10
      	GitPython==3.1.31
      	google-api-core==2.11.0
      	google-auth==2.16.1
      	google-cloud-bigquery==3.6.0
      	google-cloud-core==2.3.2
      	google-crc32c==1.5.0
      	google-resumable-media==2.4.1
      	googleapis-common-protos==1.58.0
      	gpustat==1.0.0
      	grpcio==1.51.3
      	grpcio-status==1.51.3
      	HeapDict==1.0.1
      	identify==2.5.17
      	idna==3.4
      	importlib-metadata==6.0.0
      	iniconfig==2.0.0
      	invoke==1.7.3
      	ipdb==0.13.9
      	ipycytoscape==1.3.3
      	ipykernel==6.16.0
      	ipython==8.7.0
      	ipython-genutils==0.2.0
      	ipywidgets==8.0.4
      	isort==5.10.1
      	jedi==0.18.2
      	Jinja2==3.1.2
      	jmespath==1.0.1
      	json5==0.9.10
      	jsonschema==4.17.0
      	jupyter==1.0.0
      	jupyter-client==7.3.4
      	jupyter-console==6.4.4
      	jupyter-core==4.11.1
      	jupyter-server==1.23.0
      	jupyterlab==3.5.0
      	jupyterlab-pygments==0.2.2
      	jupyterlab-widgets==3.0.3
      	jupyterlab_server==2.16.3
      	kiwisolver==1.4.4
      	locket==1.0.0
      	lz4==4.0.2
      	markdown-it-py==2.2.0
      	MarkupSafe==2.1.1
      	matplotlib==3.6.2
      	matplotlib-inline==0.1.6
      	mdurl==0.1.2
      	mistune==2.0.4
      	-e git+ssh://[email protected]/mvashishtha/modin.git@6eba2774220c64bcfdf8b036d543df5486f1e157#egg=modin
      	modin-spreadsheet @ git+https://github.com/modin-project/modin-spreadsheet.git@49ffd89f683f54c311867d602c55443fb11bf2a5
      	monotonic==1.6
      	mpi4py-mpich==3.1.2
      	msgpack==1.0.4
      	multidict==6.0.4
      	mypy-extensions==0.4.3
      	nbclassic==0.4.8
      	nbclient==0.7.0
      	nbconvert==7.2.3
      	nbformat==5.7.0
      	nest-asyncio==1.5.6
      	nodeenv==1.7.0
      	notebook==6.5.2
      	notebook_shim==0.2.2
      	numpy==1.24.2
      	nvidia-ml-py==11.495.46
      	opencensus==0.11.0
      	opencensus-context==0.1.3
      	oscrypto==1.3.0
      	packaging==23.0
      	pandas==1.5.3
      	pandocfilters==1.5.0
      	paramiko==2.11.0
      	parso==0.8.3
      	partd==1.3.0
      	pathlib2==2.3.7.post1
      	pathspec==0.10.2
      	pexpect==4.8.0
      	pickleshare==0.7.5
      	Pillow==9.4.0
      	platformdirs==2.5.3
      	pluggy==1.0.0
      	plumbum==1.8.1
      	ponder @ file:///Users/maheshvashishtha/software_sources/soda/dist/ponder-0.0.3-py3-none-any.whl
      	pre-commit==3.0.4
      	prettytable==3.4.1
      	prometheus-client==0.13.1
      	prompt-toolkit==3.0.36
      	proto-plus==1.22.2
      	protobuf==3.20.3
      	psutil==5.9.4
      	ptyprocess==0.7.0
      	pure-eval==0.2.2
      	py==1.11.0
      	py-spy==0.3.14
      	pyarrow==10.0.1
      	pyasn1==0.4.8
      	pyasn1-modules==0.2.8
      	pycodestyle==2.10.0
      	pycparser==2.21
      	pycryptodomex==3.17
      	pydantic==1.10.2
      	pydeck==0.8.0
      	Pygments==2.13.0
      	PyJWT==2.6.0
      	Pympler==1.0.1
      	PyNaCl==1.5.0
      	pyOpenSSL==23.0.0
      	pyparsing==3.0.9
      	pyrsistent==0.19.2
      	pytest==7.2.1
      	pytest-runtime-xfail==1.0.3
      	pytest-xdist==3.2.0
      	python-dateutil==2.8.2
      	pytz==2022.7.1
      	pytz-deprecation-shim==0.1.0.post0
      	PyYAML==6.0
      	pyzmq==24.0.1
      	qgrid==1.3.1
      	qtconsole==5.4.0
      	QtPy==2.3.0
      	ray==2.1.0
      	redis==3.5.3
      	requests==2.28.2
      	rich==13.3.2
      	rpyc==4.1.5
      	rsa==4.9
      	s3transfer==0.6.0
      	segment==0.2.0
      	segment-analytics-python==2.2.1
      	semver==2.13.0
      	Send2Trash==1.8.0
      	six==1.16.0
      	smart-open==6.2.0
      	smmap==5.0.0
      	sniffio==1.3.0
      	snowflake-connector-python==3.0.0
      	sortedcontainers==2.4.0
      	soupsieve==2.3.2.post1
      	spectate==1.0.1
      	sqlglot==11.2.3
      	sqlparse==0.4.3
      	stack-data==0.6.2
      	streamlit==1.19.0
      	tblib==1.7.0
      	terminado==0.17.0
      	tinycss2==1.2.1
      	toml==0.10.2
      	tomli==2.0.1
      	toolz==0.12.0
      	tornado==6.1
      	traitlets==5.7.0
      	typing_extensions==4.5.0
      	tzdata==2022.7
      	tzlocal==4.2
      	unidist==0.2.2
      	urllib3==1.26.14
      	validators==0.20.0
      	virtualenv==20.16.6
      	wcwidth==0.2.5
      	webencodings==0.5.1
      	websocket-client==1.4.2
      	widgetsnbextension==4.0.5
      	yarl==1.8.2
      	zict==2.2.0
      	zipp==3.15.0
      		```
    
  • Jupyter lab packages (if applicable): $ jupyter labextension list

     JupyterLab v3.5.0
     /Users/maheshvashishtha/opt/anaconda3/envs/ponder-product-testing/share/jupyter/labextensions
             jupyter-cytoscape v1.3.3 enabled OK
             jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
             @jupyter-widgets/jupyterlab-manager v5.0.3 enabled OK (python, jupyterlab_widgets)
     
     /usr/local/share/jupyter/labextensions
             jupyterlab-plotly v5.6.0 enabled OK
     
    

Description of Issue

I'm trying to use modin-spreadsheet. Following the README instructions, I tried jupyter nbextension enable --py --sys-prefix modin_spreadsheet and jupyter nbextension enable --py --sys-prefix widgetsnbextension. The latter worked but the first gives

Enabling notebook extension modin_spreadsheet/extension...
      - Validating: problems found:
        - require?  X modin_spreadsheet/extension

then running the notebook fails with an error starting with Failed to load model class 'ModinSpreadsheetModel' from module 'modin_spreadsheet'.

Details
[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'ModinSpreadsheetModel' from module 'modin_spreadsheet'
Error: No version of module modin_spreadsheet is registered
    at f.loadClass (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.bcbea9feb6e7c4da7530.js?v=bcbea9feb6e7c4da7530:1:74856)
    at f.loadModelClass (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:10729)
    at f._make_model (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:7517)
    at f.new_model (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:5137)
    at f.handle_comm_open (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1:3894)
    at _handleCommOpen (http://localhost:8888/lab/extensions/@jupyter-widgets/jupyterlab-manager/static/134.bcbea9feb6e7c4da7530.js?v=bcbea9feb6e7c4da7530:1:73393)
    at b._handleCommOpen (http://localhost:8888/static/lab/jlab_core.e37d4bbc8c984154bc26.js?v=e37d4bbc8c984154bc26:2:1001251)
    at async b._handleMessage (http://localhost:8888/static/lab/jlab_core.e37d4bbc8c984154bc26.js?v=e37d4bbc8c984154bc26:2:1003241)

Reproduction Steps

  1. pp install modin
  2. pip install git+https://github.com/modin-project/modin-spreadsheet.git@49ffd89f683f54c311867d602c55443fb11bf2a5
  3. jupyter nbextension enable --py --sys-prefix widgetsnbextension
  4. jupyter nbextension enable --py --sys-prefix modin_spreadsheet
  5. jupyter notebook
  6. run jupyter cell:
    import modin.pandas as pd
    import modin_spreadsheet
    
    df = pd.DataFrame([1, 2])
    modin_spreadsheet.show_grid(df)

What steps have you taken to resolve this already?

First when I googled the error I saw something about ipywidgets so I tried to install ipywidgets 7.0. That worked, except ipywidgets 7.0 didn't work in python 3.10 because it had some from collections import that were invalid, so I had to switch to python 3.8, and then I was able to show_grid with modin_spreadsheet (I think? now I can't reproduce this in a python 3.8 environment, and I don't know what's wrong.). But I should be able to use python 3.10 and ipywidgets 7.0 and run the nbextension enable commands.

@rootsmusic
Copy link

See quantopian#331 that fixed this issue in qgrid.

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

2 participants