Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Importing webmap #360

Closed
Amatly opened this issue Mar 31, 2020 · 2 comments
Closed

Importing webmap #360

Amatly opened this issue Mar 31, 2020 · 2 comments

Comments

@Amatly
Copy link

Amatly commented Mar 31, 2020

Dear someone,

I'm trying to use the code belonging to the webmap-folder. However, I seem to be unable to do so. In the 'init.py' of ArcREST I noticed that the import of webmap is commented out. When I try to import the package manually I get the following error:

>>> from arcrest import webmap

Runtime error
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\ArcGIS10.3\lib\site-packages\arcrest\webmap_init_.py", line 2, in
import domain
ImportError: No module named domain

I tried to solve this error by doing the following and got an error again:

>>> import sys
>>> from os import path
>>> sys.path.append('.../ArcREST-master/src/arcrest/webmap')
>>> from arcrest import webmap

Runtime error
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\ArcGIS10.3\lib\site-packages\arcrest\webmap_init_.py", line 2, in
import domain
File ".../ArcREST-master/ArcREST-master/src/arcrest/webmap\domain.py", line 6, in
from .._abstract.abstract import BaseDomain
ValueError: Attempted relative import in non-package

Can someone please help me out? I've been wrecking my brain over this for days now..

Much thanks in advance!!!

Versions

ArcREST-master
ArcMap 10.3

@MikeMillerGIS
Copy link
Member

MikeMillerGIS commented Mar 31, 2020 via email

@achapkowski
Copy link
Collaborator

In the ArcGIS API for Python, you would use the following:

from arcgis.mapping import WebMap
wm = WebMap(item) 
# do stuff
wm.save()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants