arcgis-python-api
arcgis-python-api copied to clipboard
Creation of map widget creates Errno 22 on Windows 11 having Python 3.9.9
Describe the bug The creation of the map widget running in a jupyter notebook creates a "Errno 22" error.
To Reproduce Steps to reproduce the behavior:
from arcgis.gis import GIS
gis = GIS()
map = gis.map()
error:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_10652/2553157821.py in <module>
----> 1 render_map(doc)
~\AppData\Local\Temp/ipykernel_10652/3101249207.py in render_map(doc)
1 def render_map(doc):
----> 2 map = gis.map()
3 map.basemap = 'osm'
4 return map
~\AppData\Roaming\Python\Python39\site-packages\arcgis\gis\__init__.py in map(self, location, zoomlevel, mode, geocoder)
1251 mapwidget = MapView(gis=self, item=location, mode=mode)
1252 else:
-> 1253 mapwidget = MapView(gis=self, mode=mode)
1254
1255 # Geocode the location
~\AppData\Roaming\Python\Python39\site-packages\arcgis\widgets\_mapview\_mapview.py in __init__(self, gis, item, mode, **kwargs)
898 item web map item from portal with which to initialize the map widget
899 """
--> 900 super(MapView, self).__init__(**kwargs)
901 self._uuid = str(uuid4())
902
~\AppData\Roaming\Python\Python39\site-packages\ipywidgets\widgets\widget.py in __init__(self, **kwargs)
413
414 Widget._call_widget_constructed(self)
--> 415 self.open()
416
417 def __del__(self):
~\AppData\Roaming\Python\Python39\site-packages\ipywidgets\widgets\widget.py in open(self)
436 args['comm_id'] = self._model_id
437
--> 438 self.comm = Comm(**args)
439
440 @observe('comm')
~\AppData\Roaming\Python\Python39\site-packages\ipykernel\comm\comm.py in __init__(self, target_name, data, metadata, buffers, **kwargs)
55 if self.primary:
56 # I am primary, open my peer.
---> 57 self.open(data=data, metadata=metadata, buffers=buffers)
58 else:
59 self._closed = False
~\AppData\Roaming\Python\Python39\site-packages\ipykernel\comm\comm.py in open(self, data, metadata, buffers)
89 comm_manager.register_comm(self)
90 try:
---> 91 self._publish_msg('comm_open',
92 data=data, metadata=metadata, buffers=buffers,
93 target_name=self.target_name,
~\AppData\Roaming\Python\Python39\site-packages\ipykernel\comm\comm.py in _publish_msg(self, msg_type, data, metadata, buffers, **keys)
64 metadata = {} if metadata is None else metadata
65 content = json_clean(dict(data=data, comm_id=self.comm_id, **keys))
---> 66 self.kernel.session.send(self.kernel.iopub_socket, msg_type,
67 content,
68 metadata=json_clean(metadata),
~\AppData\Roaming\Python\Python39\site-packages\jupyter_client\session.py in send(self, stream, msg_or_type, content, parent, ident, buffers, track, header, metadata)
840 if self.adapt_version:
841 msg = adapt(msg, self.adapt_version)
--> 842 to_send = self.serialize(msg, ident)
843 to_send.extend(buffers)
844 longest = max([len(s) for s in to_send])
~\AppData\Roaming\Python\Python39\site-packages\jupyter_client\session.py in serialize(self, msg, ident)
714 content = self.none
715 elif isinstance(content, dict):
--> 716 content = self.pack(content)
717 elif isinstance(content, bytes):
718 # content is already packed, as in a relayed message
~\AppData\Roaming\Python\Python39\site-packages\jupyter_client\session.py in json_packer(obj)
95 def json_packer(obj):
96 try:
---> 97 return json.dumps(
98 obj,
99 default=json_default,
~\AppData\Local\Programs\Python\Python39\lib\json\__init__.py in dumps(obj, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
232 if cls is None:
233 cls = JSONEncoder
--> 234 return cls(
235 skipkeys=skipkeys, ensure_ascii=ensure_ascii,
236 check_circular=check_circular, allow_nan=allow_nan, indent=indent,
~\AppData\Local\Programs\Python\Python39\lib\json\encoder.py in encode(self, o)
197 # exceptions aren't as detailed. The list call should be roughly
198 # equivalent to the PySequence_Fast that ''.join() would do.
--> 199 chunks = self.iterencode(o, _one_shot=True)
200 if not isinstance(chunks, (list, tuple)):
201 chunks = list(chunks)
~\AppData\Local\Programs\Python\Python39\lib\json\encoder.py in iterencode(self, o, _one_shot)
255 self.key_separator, self.item_separator, self.sort_keys,
256 self.skipkeys, _one_shot)
--> 257 return _iterencode(o, 0)
258
259 def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
~\AppData\Roaming\Python\Python39\site-packages\jupyter_client\jsonutil.py in json_default(obj)
110 if isinstance(obj, datetime):
111 obj = _ensure_tzinfo(obj)
--> 112 return obj.isoformat().replace('+00:00', 'Z')
113
114 if isinstance(obj, bytes):
~\AppData\Roaming\Python\Python39\site-packages\dateutil\tz\tz.py in utcoffset(self, dt)
220 return None
221
--> 222 if self._isdst(dt):
223 return self._dst_offset
224 else:
~\AppData\Roaming\Python\Python39\site-packages\dateutil\tz\tz.py in _isdst(self, dt, fold_naive)
289
290 # Check for ambiguous times:
--> 291 dstval = self._naive_is_dst(dt)
292 fold = getattr(dt, 'fold', None)
293
~\AppData\Roaming\Python\Python39\site-packages\dateutil\tz\tz.py in _naive_is_dst(self, dt)
258 def _naive_is_dst(self, dt):
259 timestamp = _datetime_to_timestamp(dt)
--> 260 return time.localtime(timestamp + time.timezone).tm_isdst
261
262 def _isdst(self, dt, fold_naive=True):
OSError: [Errno 22] Invalid argument
Platform (please complete the following information):
- OS: Windows 11
- Browser: Microsoft Edge Version 97.0.1072.69 (Offizielles Build) (64-Bit)
- Python API Version 1.9.1 (you can get this by typing
print(arcgis.__version__)
Additional context pip environment:
Package Version
----------------------- ---------
anyio 3.4.0
arcgis 1.9.1
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
attrs 21.4.0
Babel 2.9.1
backcall 0.2.0
beautifulsoup4 4.10.0
bleach 4.1.0
blis 0.7.5
cachetools 5.0.0
catalogue 2.0.6
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.10
click 8.0.3
colorama 0.4.4
cryptography 36.0.1
cssselect 1.1.0
cycler 0.11.0
cymem 2.0.6
debugpy 1.5.1
decorator 5.1.0
defusedxml 0.7.1
en-core-web-sm 3.2.0
entrypoints 0.3
feedfinder2 0.0.4
feedparser 6.0.8
filelock 3.4.2
fonttools 4.28.5
geomet 0.3.0
idna 3.3
ipykernel 6.6.1
ipython 7.31.0
ipython-genutils 0.2.0
ipywidgets 7.6.5
jedi 0.18.1
jieba3k 0.35.1
Jinja2 3.0.3
joblib 1.1.0
json5 0.9.6
jsonschema 4.3.3
jupyter-client 7.1.0
jupyter-core 4.9.1
jupyter-server 1.13.1
jupyterlab 3.2.5
jupyterlab-pygments 0.1.2
jupyterlab-server 2.10.2
jupyterlab-widgets 1.0.2
keyring 21.7.0
kiwisolver 1.3.2
langcodes 3.3.0
lerc 0.1.0
lxml 4.7.1
MarkupSafe 2.0.1
matplotlib 3.5.1
matplotlib-inline 0.1.3
mistune 0.8.4
murmurhash 1.0.6
nbclassic 0.3.4
nbclient 0.5.9
nbconvert 6.4.0
nbformat 5.1.3
nest-asyncio 1.5.4
newspaper3k 0.2.8
nltk 3.6.7
notebook 6.4.6
ntlm-auth 1.5.0
numpy 1.22.0
oauthlib 3.1.1
packaging 21.3
pandas 1.3.5
pandocfilters 1.5.0
parso 0.8.3
pathy 0.6.1
pickleshare 0.7.5
Pillow 9.0.0
pip 21.2.4
preshed 3.0.6
prometheus-client 0.12.0
prompt-toolkit 3.0.24
pycparser 2.21
pydantic 1.8.2
Pygments 2.11.1
pyparsing 3.0.6
pypiwin32 223
pyrsistent 0.18.0
pyshp 2.1.3
pyspnego 0.3.1
python-certifi-win32 1.6
python-dateutil 2.8.2
pytz 2021.3
pywin32 303
pywin32-ctypes 0.2.0
pywinpty 1.1.6
PyYAML 6.0
pyzmq 22.3.0
regex 2022.1.18
requests 2.27.0
requests-file 1.5.1
requests-kerberos 0.14.0
requests-negotiate-sspi 0.5.2
requests-ntlm 1.1.0
requests-oauthlib 1.3.0
requests-toolbelt 0.9.1
Send2Trash 1.8.0
setuptools 58.1.0
setuptools-scm 6.3.2
sgmllib3k 1.0.0
six 1.16.0
smart-open 5.2.1
sniffio 1.2.0
soupsieve 2.3.1
spacy 3.2.1
spacy-legacy 3.0.8
spacy-loggers 1.0.1
spacyopentapioca 0.1.4
srsly 2.4.2
terminado 0.12.1
testpath 0.5.0
thinc 8.0.13
tinysegmenter 0.3
tldextract 3.1.2
tomli 2.0.0
tornado 6.1
tqdm 4.62.3
traitlets 5.1.1
typer 0.4.0
typing_extensions 4.0.1
ujson 5.1.0
urllib3 1.26.7
wasabi 0.9.0
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.2.3
widgetsnbextension 3.5.2
winkerberos 0.8.0
wrapt 1.13.3
I am getting the same error in JupyterLab with the package arcgis 2.0.0 and the same code (Windows 11 Python 3.9.7).
We are investigating this issue. Did you install via conda or pip?
I'm getting the same error on Windows 10 Installation of arcgis 1.9.1 via pip or conda (tried both ways) using python 3.7.0b1. I will note that it works fine on Windows Subsystem for Linux (via pip) and on MacOs (via conda) installations.
I installed it with pip. Conda did not work.
I'm having the same issue in version 2.0 with python 3.10.4 on a fresh install of Windows Server 2022. I used pip to install the ArcGIS python API.
Any progress on this issue or is this combination not supported?
@joshua-coppola we do not support py310 at the moment. It will be supported in a future release.
When using the wheels you need to manually run the widget installer commands.
Can you test the prerelease tag on conda of 2.0.1? Also we don't support 3.10 yet.
Closing, if this is still an issue please comment further
What was the resolution to this problem? I'm hitting the exact same problem from my spyder environment, but not from the Python window in ArcGIS Pro which is using the same python environment.
print(arcgis.version) 1.9.1
sys.version Out[5]: '3.7.11 [MSC v.1927 64 bit (AMD64)]'
ArcGIS Pro 2.9.5
C:\Users\dmorrison\AppData\Local\ESRI\conda\envs\arcgispro29-py3-081522\Scripts>pip list Package Version
alabaster 0.7.12 appdirs 1.4.4 arcgis 1.9.1 argcomplete 1.12.3 arrow 1.2.2 asn1crypto 1.5.1 astroid 2.11.7 atomicwrites 1.4.0 attrs 21.2.0 autopep8 1.6.0 azure-core 1.12.0 azure-storage-blob 12.8.0 Babel 2.10.3 backcall 0.2.0 bcrypt 3.2.2 binaryornot 0.4.4 black 22.6.0 bleach 3.3.0 blinker 1.4 brotlipy 0.7.0 cached-property 1.5.2 cachetools 4.2.2 certifi 2022.6.15 cffi 1.15.1 cftime 1.5.0 chardet 4.0.0 charset-normalizer 2.0.4 click 8.1.3 cloudpickle 2.0.0 colorama 0.4.5 cookiecutter 2.1.1 cryptography 3.4.8 cycler 0.10.0 debugpy 1.5.1 decorator 5.1.1 defusedxml 0.7.1 despatch 0.1.0 diff-match-patch 20200713 dill 0.3.5.1 docutils 0.17.1 entrypoints 0.4 et-xmlfile 1.0.1 fastcache 1.1.0 flake8 4.0.1 future 0.18.2 geomet 0.3.0 google-api-core 2.8.2 google-api-python-client 2.56.0 google-auth 2.10.0 google-auth-httplib2 0.1.0 google-auth-oauthlib 0.5.2 googleapis-common-protos 1.56.4 h5py 2.10.0 html5lib 1.1 httplib2 0.20.4 idna 3.3 imagesize 1.4.1 importlib-metadata 4.2.0 inflection 0.5.1 iniconfig 1.1.1 intervaltree 3.1.0 ipykernel 6.15.1 ipython 7.31.1 ipython-genutils 0.2.0 ipywidgets 7.4.2 isodate 0.6.0 isort 5.10.1 jdcal 1.4.1 jedi 0.18.1 jellyfish 0.9.0 Jinja2 3.0.3 jinja2-time 0.2.0 json5 0.9.4 jsonschema 3.2.0 jupyter-client 7.3.4 jupyter-console 6.4.0 jupyter-contrib-core 0.3.3 jupyter-contrib-nbextensions 0.5.1 jupyter-core 4.10.0 jupyter-highlight-selected-word 0.2.0 jupyter-latex-envs 1.4.6 jupyter-nbextensions-configurator 0.4.1 jupyterlab 2.2.7 jupyterlab-server 1.2.0 keyring 21.4.0 kiwisolver 1.3.1 lazy-object-proxy 1.7.1 lerc 2.2 lxml 4.6.3 MarkupSafe 2.1.1 matplotlib 3.4.2 matplotlib-inline 0.1.2 mccabe 0.6.1 mistune 0.8.4 mkl-fft 1.3.0 mkl-random 1.2.0 mkl-service 2.3.0 mpmath 1.2.1 msrest 0.6.21 mypy-extensions 0.4.3 nbconvert 5.6.1 nbformat 5.1.3 nest-asyncio 1.5.5 netCDF4 1.5.7 networkx 2.5 nose 1.3.7 notebook 5.7.10 ntlm-auth 1.4.0 numexpr 2.7.3 numpy 1.20.1 numpydoc 1.4.0 oauthlib 3.1.0 olefile 0.46 openpyxl 3.0.7 packaging 21.3 pandas 1.2.3 pandocfilters 1.4.3 paramiko 2.11.0 parso 0.8.3 pathspec 0.9.0 pefile 2019.4.18 pexpect 4.8.0 pickleshare 0.7.5 Pillow 8.3.2 pip 22.1.2 platformdirs 2.5.2 pluggy 1.0.0 pro-notebook-integration 2.5 prometheus-client 0.8.0 prompt-toolkit 3.0.20 protobuf 4.21.5 psutil 5.8.0 ptyprocess 0.7.0 py 1.10.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 pycodestyle 2.8.0 pycparser 2.21 pydocstyle 6.1.1 pyflakes 2.4.0 Pygments 2.11.2 PyJWT 2.1.0 pylint 2.14.5 pyls-spyder 0.4.0 PyNaCl 1.5.0 pyodbc 4.0.0-unsupported pyOpenSSL 21.0.0 pyparsing 3.0.4 PyQt5 5.15.7 PyQt5-Qt5 5.15.2 PyQt5-sip 12.11.0 PyQtWebEngine 5.15.6 PyQtWebEngine-Qt5 5.15.2 pyrsistent 0.17.3 pyshp 2.1.3 PySocks 1.7.1 pytest 6.2.4 python-certifi-win32 1.7.dev1+g24a5d1b python-dateutil 2.8.2 python-lsp-black 1.2.1 python-lsp-jsonrpc 1.0.0 python-lsp-server 1.5.0 python-slugify 6.1.2 pytoolconfig 1.2.2 pytz 2022.1 pywin32 302 pywin32-ctypes 0.2.0 pywinpty 0.5.7 PyYAML 5.4.1 pyzmq 23.2.0 QDarkStyle 3.0.3 qstylizer 0.2.1 QtAwesome 1.1.1 qtconsole 5.3.1 QtPy 2.2.0 regex 2021.8.3 requests 2.28.1 requests-kerberos 0.12.0 requests-negotiate-sspi 0.0.0 requests-ntlm 1.1.0 requests-oauthlib 1.3.0 requests-toolbelt 0.9.1 rope 1.3.0 rsa 4.9 Rtree 1.0.0 saspy 3.7.3 scipy 1.6.2 Send2Trash 1.5.0 setuptools 61.2.0 simplegeneric 0.8.1 six 1.16.0 snowballstemmer 2.2.0 sortedcontainers 2.4.0 Sphinx 4.3.2 sphinxcontrib-applehelp 1.0.2 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 spyder 5.3.2 spyder-kernels 2.3.2 SQLAlchemy 1.3.19 swat 1.9.3 sympy 1.5.1 terminado 0.9.3 testpath 0.4.4 text-unidecode 1.3 textdistance 4.3.0 three-merge 0.1.1 tinycss2 1.1.1 toml 0.10.2 tomli 2.0.1 tomlkit 0.11.4 tornado 6.1 traitlets 5.3.0 typed-ast 1.4.2 typing_extensions 4.3.0 ujson 4.0.2 uritemplate 4.1.1 urllib3 1.26.11 watchdog 2.1.9 wcwidth 0.2.5 webencodings 0.5.1 whatthepatch 1.0.2 wheel 0.37.1 widgetsnbextension 3.4.2 win-inet-pton 1.1.0 wincertstore 0.2 winkerberos 0.7.0 wrapt 1.12.1 x86cpu 0.4 xarray 0.17.0 xlrd 1.2.0 xlwt 1.3.0 yapf 0.32.0 zipp 3.8.0
Hi, Having a similar issue and wondering if a solution has been found? Thanks!
Window 10 pro, jupyter notebook with cloned arcgispro-py kernel (Python 3.9.16), ArcGIS pro 3.1.0
VS Code Version: 1.77.3 (user setup) Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710 Date: 2023-04-12T09:16:02.548Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Windows_NT x64 10.0.19045 Sandboxed: Yes
Package Version
--------------------------------- -----------------
appdirs 1.4.4
arcgis 2.0.1
asn1crypto 1.4.0
asttokens 2.2.1
atomicwrites 1.4.0
attrs 21.4.0
azure-core 1.12.0
azure-storage-blob 12.8.0
backcall 0.2.0
beautifulsoup4 4.11.2
black 0.0.0
bleach 4.1.0
blinker 1.4
Bottleneck 1.3.4
branca 0.6.0
brotlipy 0.7.0
cached-property 1.5.2
cachetools 4.2.2
certifi 2022.12.7
cffi 1.15.0
cftime 1.5.0
chardet 4.0.0
charset-normalizer 2.0.4
click 8.0.4
colorama 0.4.4
comm 0.1.2
contourpy 1.0.6
CoolProp 6.4.3.post1
cryptography 37.0.2
cycler 0.11.0
debugpy 1.6.5
decorator 5.1.1
defusedxml 0.7.1
despatch 0.2.0
entrypoints 0.3
et-xmlfile 1.1.0
executing 1.2.0
fastcache 1.1.0
flake8 4.0.1
fonttools 4.38.0
future 0.18.2
geomet 0.3.0
h5py 3.6.0
html5lib 1.1
idna 3.3
importlib-metadata 4.11.3
iniconfig 1.1.1
ipykernel 6.20.2
ipyleaflet 0.17.2
ipympl 0.9.2
ipython 8.8.0
ipython-genutils 0.2.0
ipywidgets 7.6.5
isodate 0.6.0
jdcal 1.4.1
jedi 0.18.0
Jinja2 3.0.3
json5 0.9.5
jsonschema 3.2.0
jupyter_client 7.4.9
jupyter-console 6.4.0
jupyter-contrib-core 0.3.3
jupyter-contrib-nbextensions 0.5.1
jupyter_core 5.1.3
jupyter-highlight-selected-word 0.2.0
jupyter-latex-envs 1.4.6
jupyter-nbextensions-configurator 0.4.1
jupyterlab 2.2.10
jupyterlab-pygments 0.2.2
jupyterlab-server 1.2.0
jupyterlab-widgets 1.0.0
keyring 23.4.0
kiwisolver 1.3.2
lerc 3.0
lxml 4.8.0
MarkupSafe 2.0.1
matplotlib 3.6.3
matplotlib-inline 0.1.6
mccabe 0.7.0
mistune 2.0.5
mkl-fft 1.3.0
mkl-random 1.2.2
mkl-service 2.3.0
mpmath 1.2.1
msrest 0.6.21
mypy-extensions 0.4.3
nbclient 0.7.2
nbconvert 7.2.10
nbformat 5.1.3
nest-asyncio 1.5.6
netCDF4 1.5.7
networkx 2.7.1
nose 1.3.7
notebook 5.7.10
ntlm-auth 1.4.0
numexpr 2.8.1
numpy 1.24.1
oauthlib 3.2.0
olefile 0.46
openpyxl 3.0.9
packaging 21.3
pandas 1.3.5
pandocfilters 1.5.0
parso 0.8.3
pathspec 0.9.0
pefile 2019.4.18
pickleshare 0.7.5
Pillow 9.1.0
pip 22.3.1
platformdirs 2.6.2
plotly 5.11.0
pluggy 0.13.1
pro-notebook-integration 2.5
prometheus-client 0.8.0
prompt-toolkit 3.0.36
protobuf 3.19.1
psutil 5.8.0
pure-eval 0.2.2
py 1.11.0
pycodestyle 2.8.0
pyconvert 0.6.3
pycparser 2.21
pyee 8.2.2
pyflakes 2.4.0
pygfunction 2.2.2
Pygments 2.9.0
PyJWT 2.4.0
pyodbc 4.0.32
pyOpenSSL 22.0.0
pyparsing 3.0.4
PyPDF2 1.26.0
pyppeteer 1.0.2
pyrsistent 0.18.0
pyshp 2.1.3
PySocks 1.7.1
pytest 6.2.4
python-certifi-win32 1.7.dev1+g24a5d1b
python-dateutil 2.8.2
pytz 2022.1
pywin32 305
pywin32-ctypes 0.2.0
pywinpty 2.0.1
PyYAML 6.0
pyzmq 25.0.0
regex 2022.3.15
requests 2.27.1
requests-kerberos 0.12.0
requests-negotiate-sspi 0.0.0
requests-ntlm 1.1.0
requests-oauthlib 1.3.0
requests-toolbelt 0.9.1
saspy 3.7.8
scipy 1.10.0
SecondaryCoolantProps 1.1
Send2Trash 1.8.0
setuptools 65.7.0
simplegeneric 0.8.1
six 1.16.0
soupsieve 2.4
SQLAlchemy 1.3.12
stack-data 0.6.2
swat 1.9.3
sympy 1.9
tabulate 0.9.0
tenacity 8.1.0
terminado 0.13.1
testpath 0.5.0
tinycss2 1.2.1
toml 0.10.2
tomli 1.2.2
tornado 6.2
tqdm 4.65.0
traitlets 5.8.1
traittypes 0.2.1
typed-ast 1.4.3
typing_extensions 4.1.1
ujson 5.1.0
urllib3 1.26.8
wcwidth 0.2.5
webencodings 0.5.1
webio-jupyter-extension 0.1.0
websockets 10.4
wheel 0.37.1
widgetsnbextension 3.5.2
win-inet-pton 1.1.0
wincertstore 0.2
winkerberos 0.8.0
wrapt 1.13.3
x86cpu 0.4
xarray 0.20.1
xlrd 2.0.1
xlwt 1.3.0
xyzservices 2022.9.0
zipp 3.7.0