Comments (7)
@PleaseStopAsking
Can you update to the latest version of the API and try again?
A lot of effort was put into cloning in the past versions and this might have already been fixed. Let us know if you still see this occurring
from arcgis-python-api.
@nanaeaubry I can attempt to get v2.3.0
running but when I initially attempted to spin up the docker image, it threw errors that I never resolved. This led to using v2.2.0
. I will report back once I get v2.3.0 running.
Below is the error from v2.3.0
Run command: docker run -it --rm -p 8888:8888 ghcr.io/esri/arcgis-python-api-notebook:2.3.0
Running hooks in: /usr/local/bin/start-notebook.d as uid: 1000 gid: 100
Done running hooks in: /usr/local/bin/start-notebook.d
Running hooks in: /usr/local/bin/before-notebook.d as uid: 1000 gid: 100
Done running hooks in: /usr/local/bin/before-notebook.d
Executing the command: jupyter notebook
Traceback (most recent call last):
File "/opt/conda/lib/python3.11/site-packages/notebook/traittypes.py", line 235, in _resolve_classes
klass = self._resolve_string(klass)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 2025, in _resolve_string
return import_item(string)
^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/utils/importstring.py", line 31, in import_item
module = __import__(package, fromlist=[obj])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'jupyter_server.contents'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/jupyter-notebook", line 10, in <module>
sys.exit(main())
^^^^^^
File "/opt/conda/lib/python3.11/site-packages/jupyter_core/application.py", line 280, in launch_instance
super().launch_instance(argv=argv, **kwargs)
File "/opt/conda/lib/python3.11/site-packages/traitlets/config/application.py", line 1051, in launch_instance
app = cls.instance(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/config/configurable.py", line 575, in instance
inst = cls(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 1311, in __new__
inst.setup_instance(*args, **kwargs)
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 1354, in setup_instance
super(HasTraits, self).setup_instance(*args, **kwargs)
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 1330, in setup_instance
init(self)
File "/opt/conda/lib/python3.11/site-packages/notebook/traittypes.py", line 226, in instance_init
self._resolve_classes()
File "/opt/conda/lib/python3.11/site-packages/notebook/traittypes.py", line 238, in _resolve_classes
warn(f"{klass} is not importable. Is it installed?", ImportWarning)
TypeError: warn() missing 1 required keyword-only argument: 'stacklevel'
from arcgis-python-api.
@PleaseStopAsking
After re-reading your issue it seems you are trying to clone a single layer rather than an item. This is not possible through the API and you have to clone the whole item
from arcgis-python-api.
That is correct. The use-case here is that I need a specific layer from a 3rd party service that is publicly available and instead of adding the entire service as an item in my portal, I point to the individual layer. I can then add this item to any number of web maps or dashboards without having to selectively hide/disable all the other layers that may come with the 3rd party service thus making its usage much easier.
As for it not currently being supported, I can open a feature request to add this in a future release because this would likely benefit others as well.
from arcgis-python-api.
@PleaseStopAsking
You can log an enhancement and we will take it under consideration, however this is complicated since you have to read the terms of use of items, even if they are public to make sure they can be cloned/copied. Cloning is already very limited as you have to be the owner of the item you are cloning or an administrator of the org where the item is held (living atlas being an exception).
A better way to do this is to add the layer by url to the apps and maps you want to use it in.
If you really want to copy then you need to check the metadata for the terms and conditions of this. (this is in general for any and all layers you think of using in the future)
You can either download it from the site using the download button: https://hifld-geoplatform.hub.arcgis.com/datasets/75079bdea94743bcaca7b6e833692639_0/explore
Or with the python api you can query into a SeDF and then import it into your portal.
Hope that helps!
from arcgis-python-api.
@nanaeaubry I am not sure I am following you with regard to the terms of use. If I have created a new feature layer item (non-hosted) in my portal that is simply referencing an external 3rd party feature service, how does cloning/copying that 3rd party service come into play?
The only thing that I would control would be the cloning/copying of the portal item, not the underlying referenced service data. As I would be the admin for both the source and target portals, I have full control to copy/clone the portal items. I just want to ensure I am understanding the issue at play.
Case in point, the Hospital
feature service at https://services1.arcgis.com/Hp6G80Pky0om7QvQ/arcgis/rest/services/Hospital/FeatureServer
.
If I use that feature service as the basis for a new item in Portal, it does not clone that service into my Portal, but simply references the data when I load it into a web map, etc. Even the description of this type of Portal item states, Link to an ArcGIS Server web service...
![image](https://private-user-images.githubusercontent.com/35308946/342740833-ea7409e1-d8f5-4008-8f5c-5138b09a3f8b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyNjY1NzksIm5iZiI6MTcyMzI2NjI3OSwicGF0aCI6Ii8zNTMwODk0Ni8zNDI3NDA4MzMtZWE3NDA5ZTEtZDhmNS00MDA4LThmNWMtNTEzOGIwOWEzZjhiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEwVDA1MDQzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE0NTM0NGNmMjQ2Yzc4ODlhZDI4NDA3NzY1NDA2OTdmMGYyYjY4ZWU4MmViNDE1MzY1NzU1NjM0ZGI3ODI5ZGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.yn0IkXxDfLYX8y4dm2lB2DmstUQO8hfrbW_NqIJ6IL0)
![image](https://private-user-images.githubusercontent.com/35308946/342741653-6bc095fe-4ec0-46ba-bfa7-56dc2ce22a79.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyNjY1NzksIm5iZiI6MTcyMzI2NjI3OSwicGF0aCI6Ii8zNTMwODk0Ni8zNDI3NDE2NTMtNmJjMDk1ZmUtNGVjMC00NmJhLWJmYTctNTZkYzJjZTIyYTc5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODEwVDA1MDQzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTllN2E2OGUzNjI0OTkwZTlmYjVhNTgyZmFmYWFkMDBmNWI3MGI3NDQ0YThlMzI0MGQyODRiZGJiZDc4Y2E5NDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5jTbIxhWeDHHV28IAuzQQ2hEWa1Gm2ZLUhbZaJUK1Tc)
from arcgis-python-api.
@PleaseStopAsking
Some services have privacy terms set up where you are only allowed to reference and not copy so I would just be wary of that.
But to copy I would go the SeDF route described in my previous comment.
from arcgis-python-api.
Related Issues (20)
- Error while trying to run Tensorflow backend in FeatureClassifier HOT 1
- ArcGis HOT 3
- item.update(item_properties={"typeKeywords': "values"}) fills in default values HOT 2
- spatial.to_featureset() returns date fields as float when the first row is NaT HOT 1
- `Geometry._repr_svg_() missing 1 required positional argument: 'self' error` when creating an `arcgis.geometry.Polygon` HOT 3
- Requests to ArcGIS server send 2x when Portal secured with IWA HOT 1
- Feature layer query introduces duplicates when querying above 2000 records HOT 2
- clone_item() hosted feature service referencing to source portal HOT 1
- Empty 'name' property of an arcgis item object causes crash when trying to clone
- arcgis package not getting installed on azure function app HOT 2
- Unable to create user HOT 6
- Adding assignment to workforce does not work
- Error when calling shaded_relief_ob = RFT(shaded_relief_rft) in shipwrecks_detection_using_bathymetric_data.ipynb HOT 1
- Failed to upload the local experience when set the parameter "auto_remap=True" HOT 1
- arcgis.gis.server.Server Incorrectly States Login Successful When ArcGIS Site URL or Credentials Are Invalid
- EnterpriseVectorTileLayerManager.edit() HOT 1
- arcgis..gisgis.GIS() crashing python when Portal domain has bad intermediate SSL certs HOT 1
- EnterpriseVectorTileLayerManager.edit() needs wrapped with a .start() .stop() for exportTiles=True to work
- Bug in Lib\site-packages\arcgis\_impl\common\_query.py HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcgis-python-api.