-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
JupyterLab and arcgis ipywidget 1.6.2 Error model not found #479
Comments
I faced same issue as well. |
@Hiromu-Nakamura @tgrout See this related issue for more information: #287 I believe that the newest JupyterLab 1.0 version has introduced a breaking change, causing the widget not to work anymore. I need to investigate some more, and hopefully fix it for our next release. In the mean time, please try downgrading jupyterlab and see if that fixes your issue. |
@DavidJVitale Hi David. Thank you for giving detail information. I'll try to downgrading the lab version. |
FYI for all following this issue, see this post: #287 (comment)
|
Also from that thread: #287
@tgrout @Hiromu-Nakamura please try upgrading and let me know if your issue is resolved! |
@DavidJVitale Im having trouble finding that release on conda with:
then reverting to pip, within the following short dockerfile to test
|
and when disregarding the note
on https://developers.arcgis.com/python/guide/using-the-jupyter-lab-environment/ and reverting to |
I have tried as well, and as @swatson26 mentioned, could not install it with exactly same command, However, I have found the three files of 1.6.2-post1 at here. As a quick solution, I would like to download a post1 file and install offline, but not sure which file is for Python 3.6.6, my Pro's python version. Thanks |
Hi @Hiromu-Nakamura and @swatson26 , my apologies about the release confusion -- I have updated the build string to include the Try this install command in your conda environments, it should pick out the correct python version for your environment (py3.6 for Pro, etc.). Let me know if this works.
@swatson26 on your pip install error, can you try installing it in a pip environment outside of docker? When I run these three commands, my jupyterlab works correctly with the widget when I run these commands in a new blank environment:
|
thanks @DavidJVitale I've gotten the plugin working, but there is something wonky going on with the JS (I think) where the tabs and right-hand tool bar are not rendering and have red boxes. for operational reasons, I need to be using docker and docker build is based off of jupyters minimal docker image https://github.com/jupyter/docker-stacks/tree/master/minimal-notebook/Dockerfile So I'm assuming there is something in there that's disagreeing with arcgis plugin. Want me to create a separate issue on this topic? |
@swatson26 I saw a similar error to what you saw, I think this is an issue with upstream JupyterLab. These issues appear to be similar to what you're seeing: jupyterlab/jupyterlab#7140 I was able to resolve this by upgrading my Jupyterlab to the latest version, |
@DavidJVitale Sorry for late reply. Thank you so much for clarifying detail. With the command you suggested, I have successfully installed Again, thank you for your quick work! |
Followed the instructions in the In a new conda environment with python=3.7: |
Still seeing the errors when trying to use map widget in jupyter-lab with the stock Python environment (1.7.0) that comes with ArcGIS Pro 2.5.2. Starting from the stock environment and updating arcgis to 1.7.1 does not help: Starting from the stock environment and updating arcgis to the latest currently available version of arcgis, 1.8.1 does not help either: |
@knoopum Could you try installing v1.X of JupyterLab? I am seeing some strange behavior with the
If you are still seeing errors, can you send the browser console when the map doesn't work? |
@DavidJVitale Yes, downgrading to jupyterlab 1.x results in a functional map widget. Since I wanted to stay at 1.8.1 I used:
After downgrading to 1.x, I did have to reinstall the two jupyter labextensions. I also was getting CORS errors, so I had to add http://localhost:8888 to my ArcGIS Online instance's Allowed Origins. With 1.8.1 and jupyterlab 2.x, I will note that even after installing the jupyter labextensions (and making sure to specify version 1.8.1), I get this error in the Console in Chrome Version 83.0.4103.116 on Windows 10:
|
Not sure if it would be helpful, but I could show a map with the following environment: @jupyter-widgets/jupyterlab-manager v1.0.3 I think difference may be that I am using nodejs 12.16.1. |
@FrancisBase I have not posted the v1.8.2 jupyterlab extension yet on npm, I will do that sometime this week. I will tag you on this issue when I publish it. |
Awesome @DavidJVitale So many Thanks. |
@FrancisBase @knoopum @MSDuncan82 I have uploaded the v1.8.2 Please install and let me know of any concerns. I have tested on a few computers and it appears to be working well. Thanks! |
Great work @DavidJVitale here is my solution which is working, if you like put star or like in https://github.com/FrancisBase , and most importantly is useful:
|
Also, for anyone still having issues -- We have updated the installation docs to show how to install it in the JupyterLab UI, please take a look at the new doc: https://developers.arcgis.com/python/guide/using-the-jupyter-lab-environment/ |
@DavidJVitale It is very helpful. Thank you for updating the docs. |
I have followed the instructions and I am still getting the error. I am using JupyterHub to launch single instances. I have built a containerized image of JupyterLab at version 2.1.5. Installed the extension: arcgis-map-ipywidget v1.8.2 enabled OK We have not used Conda since it is a containerized environment anyhow. I have done a jupyter lab build but nothing has changed. I have based the image from the JupyterLab datascience-notebook. https://hub.docker.com/r/jupyter/datascience-notebook/ Its a good image and everything works except the ArcGIS Widget. Here is the Docker Image ARG BASE_IMAGE=jupyter/datascience-notebook
FROM $BASE_IMAGE
ENV GITLAB_HOST=http://ourgitlab.com/
ADD install_jupyterhub.sh /tmp/install_jupyterhub.sh
ARG JUPYTERHUB_VERSION=master
RUN python3 /tmp/install_jupyterhub.sh && \
python3 -m pip install notebook && \
python3 -m pip install torch && \
python3 -m pip install arcgis && \
python3 -m pip install fastai && \
python3 -m pip install libtiff && \
python3 -m pip install jupyterlab-git && \
jupyter serverextension enable --py jupyterlab_git && \
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
jupyter nbextension enable --py --sys-prefix arcgis && \
jupyter labextension install @jupyterlab/toc && \
jupyter labextension install @jupyterlab/geojson-extension && \
jupyter labextension install @jupyterlab/debugger && \
jupyter labextension install jupyterlab-drawio && \
jupyter labextension install jupyterlab-spreadsheet && \
jupyter labextension install jupyterlab-gitlab Here is the install_jupyterhub.sh script that was copied from the JupyterLab Single User example. #!/usr/bin/env python
import os
from subprocess import check_call
import sys
V = os.environ['JUPYTERHUB_VERSION']
pip_install = [
sys.executable, '-m', 'pip', 'install', '--no-cache', '--upgrade',
'--upgrade-strategy', 'only-if-needed',
]
if V == 'master':
req = 'https://github.com/jupyterhub/jupyterhub/archive/master.tar.gz'
else:
version_info = [ int(part) for part in V.split('.') ]
version_info[-1] += 1
upper_bound = '.'.join(map(str, version_info))
vs = '>=%s,<%s' % (V, upper_bound)
req = 'jupyterhub%s' % vs
check_call(pip_install + [req])#!/usr/bin/env python
import os
from subprocess import check_call
import sys
V = os.environ['JUPYTERHUB_VERSION']
pip_install = [
sys.executable, '-m', 'pip', 'install', '--no-cache', '--upgrade',
'--upgrade-strategy', 'only-if-needed',
]
if V == 'master':
req = 'https://github.com/jupyterhub/jupyterhub/archive/master.tar.gz'
else:
version_info = [ int(part) for part in V.split('.') ]
version_info[-1] += 1
upper_bound = '.'.join(map(str, version_info))
vs = '>=%s,<%s' % (V, upper_bound)
req = 'jupyterhub%s' % vs
check_call(pip_install + [req]) It is a fairly chunky image but we need a comprehensive image. Any assistance would be great. |
@DavidJVitale, Do you have arcgis-map-ipywidget for arcgis python API v1.8.5? It was working until 1.8.4, but with the new 1.8.5 release, the widget is no longer working. |
@shingike the issue should be resolved now. Can you please re-try? |
I am still having issues with this. To install the missing extension, I first installed nodejs in my cloned env. Then installed the extension through JupyterLab, restarted Jupyter Lab server, re-ran the code but am still getting
jupyterlab=3.3.2 |
Jupyterlabs 3 is not supported in the current version of the ArcGIS API for Python. |
I see thank you for that information. |
I have tried installing the arcgis-map-ipywidget and I keep getting an error that states:
"Error displaying widget: model not found"
I have tried the following based on other guidance from similar issues (#307)
• run conda uninstall nodejs
• run conda create --name new_blank_env
• run activate new_blank_env
• run conda install -c esri arcgis -y
• run conda install nodejs
• run jupyter labextension install @jupyter-widgets/jupyterlab-manager
• run jupyter labextension install arcgis-map-ipywidget@1.6.2
• run jupyter lab
I get the error when trying to run this code:
"from arcgis.gis import GIS
#Create a map widget like you have done many times before
gis = GIS()
map1 = gis.map()
map1"
I have version 1.6.2 (not 1.5.0) of installed. Any input or guidance would be appreciated. I am able to get this same code to work in Jupyter Notebook but not Jupyter Lab.
The text was updated successfully, but these errors were encountered: