Visual Studio Code not showing maps with Python 3.8
See original GitHub issueDescribe the bug Trying to show a map inside jupyter notebook in Visual Studio Code when using a new conda environment (not the one from ArcGIS Pro) . The map shows an unhandled error.
To Reproduce Steps to reproduce the behavior:
create a new conda env as described here: https://support.esri.com/en/technical-article/000022005
Write code in jupyter:
from arcgis import GIS
gis = GIS(url='https://<abc>.maps.arcgis.com',username='<username>',password='<pwd>')
mymap=gis.map('Zurich')
mymap
error
Messages in the console (browser console inside VS Code)
[Embedded Page] WidgetManager: Loading class LayoutModel:@jupyter-widgets/base:1.2.0
webviewElement.ts:90 [Embedded Page] require promise
webviewElement.ts:90 [Embedded Page] WidgetManager: Loading class ArcGISMapIPyWidgetModel:arcgis-map-ipywidget:1.8.4
webviewElement.ts:90 [Embedded Page] Fetch IPyWidget source for arcgis-map-ipywidget
webviewElement.ts:90 [Embedded Page] require promise
webviewElement.ts:90 [Embedded Page] WidgetManager: Loading class LayoutModel:@jupyter-widgets/base:1.2.0
webviewElement.ts:90 [Embedded Page] require promise
webviewElement.ts:90 [Embedded Page] WidgetManager: Loading class ArcGISMapIPyWidgetModel:arcgis-map-ipywidget:1.8.4
webviewElement.ts:90 [Embedded Page] Fetch IPyWidget source for arcgis-map-ipywidget
webviewElement.ts:90 [Embedded Page] require promise
webviewElement.ts:90 [Embedded Page] WidgetManager: Loading class ArcGISMapIPyWidgetView:arcgis-map-ipywidget:1.8.4
webviewElement.ts:90 [Embedded Page] Fetch IPyWidget source for arcgis-map-ipywidget
webviewElement.ts:90 [Embedded Page] require promise
webviewElement.ts:90 [Embedded Page] WidgetManager: Loading class LayoutView:@jupyter-widgets/base:1.2.0
webviewElement.ts:90 [Embedded Page] require promise
webviewElement.ts:90 [Embedded Page] Error on render:
webviewElement.ts:90 [Embedded Page] Error: Script error for "esri/Map"
https://requirejs.org/docs/errors.html#scripterror
Platform (please complete the following information):
- OS: windows 10
- Visual Studio Code (latest with python and jupyter extension from microsoft)
- Python API Version [
1.8.4
] - Python 3.8
Additional context
- The same code runs without problems in condas jupyter notebook
- The same code also runs in VS Code when using the conda environment installed with ArcGIS Pro
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
VS Code can't find Python - Stack Overflow
Show activity on this post. In VS Code, open the Settings with (Ctrl+,) then search settings for "Interpreter." There will an option for...
Read more >ArcGIS API for Python in Visual Studio Code not showing maps
I'm trying to display a map inside a jupyter notebook running in Visual Studio Code (with the python and jupyter extension enabled).
Read more >Get Started Tutorial for Python in Visual Studio Code
Write a simple Python script to plot figures within VS Code. This tutorial is not intended to teach you Python itself. Once you...
Read more >Visual Studio Code (Windows) - Setting up a Python ...
In this Python Programming Tutorial, we will be learning how to set up a Python development environment in VSCode on Windows. VSCode is...
Read more >Mac OS Monterey Python Version? | Apple Developer Forums
I'm using an extension inside Visual Studio Code (VSC) which assumes the command ... For default Python 3.8.9, I am seeing build errors...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @SCMGeocom and @nam-tonthat Map widget display of ArcGIS API for Python is not supported in VS code. Please try jupyter notebooks when it comes to drawing or plotting in maps. Thanks!
Thirded. I know that VS Code can be a bit troublesome to support but it is now a go-to all-purpose IDE for a massive amount of the developer community.