POST
|
Thank you Josh for your help and hints. I don't understand why according to you the overwrite method is not your preferred one. To me it seems the most straightforward, not only as a concept but also in coding. Isn't it?
... View more
10-17-2022
09:21 AM
|
0
|
1
|
584
|
POST
|
In fact I'm not sure I run the script correctly (when I said I'm new with Python...). If I do instead: (load_csv) C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\Scripts>python "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\Scripts\overwrite_feature_layer.py" I get this error: Traceback (most recent call last):
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\Scripts\overwrite_feature_layer.py", line 10, in <module>
csv_item = gis.content.get('XXX')
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\load_csv\lib\site-packages\arcgis\gis\__init__.py", line 5880, in get
raise e
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\load_csv\lib\site-packages\arcgis\gis\__init__.py", line 5870, in get
item = self._portal.get_item(itemid)
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\load_csv\lib\site-packages\arcgis\gis\_impl\_portalpy.py", line 1416, in get_item
return self.con.post("content/items/" + itemid, self._postdata())
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\load_csv\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 1412, in post
force_bytes=kwargs.pop("force_bytes", False),
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\load_csv\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 900, in _handle_response
self._handle_json_error(data["error"], errorcode)
File "C:\Program Files\ArcGIS\Server\framework\runtime\ArcGIS\bin\Python\envs\load_csv\lib\site-packages\arcgis\gis\_impl\_con\_connection.py", line 923, in _handle_json_error
raise Exception(errormessage)
Exception: You do not have permissions to access this resource or perform this operation.
(Error Code: 403) (where "XXX" is the id of the layer of course). Is this second way to run the script more correct?
... View more
10-06-2022
07:29 AM
|
0
|
1
|
655
|
POST
|
So I managed to set up the environment I think. But when I run the script, the first error I get is: ImportError: No module named arcgis.gis However the module is there: And here is the script I try to run (created from bits and pieces, there will be surely other errors after...): # Import libraries
from arcgis.gis import GIS
from arcgis import features
import pandas as pd
# Connect to the GIS
gis = GIS(url='https://XXX.XXX.org/portal')
csv_file = r'C:\CSV_TIR\POI.csv'
csv_item = gis.content.get('XXX')
# csv_item = target.content.get(csv_item['XXX'])
from arcgis.features import FeatureLayerCollection
csv_featurelayercoll = FeatureLayerCollection.fromitem(csv_item)
#call the overwrite() method which can be accessed using the manager property
csv_featurelayercoll.manager.overwrite(csv_file)
... View more
10-06-2022
03:37 AM
|
0
|
2
|
674
|
POST
|
Thank you very much Brian, so let's first try to create an environment and install the modules with Conda. I'll try to run a test script then and post here my progress!
... View more
10-06-2022
12:55 AM
|
0
|
3
|
677
|
POST
|
Hello, I've a very simple need, however I can't find in the documentation a global description of how to achieve this: we need to daily update data that feeds a service, and this data is in a CSV file hosted on our ArcGIS Server. The first import of the CSV (it contains lat & lon fields) is done manually, using the "Add CSV and create a hosted feature layer" function in Portal. I'm a beginner regarding Python scripts / API use and all this stuff... What I found for now is that I need to create a View Layer (to avoid possible locks issues when data is overwritten) from the Hosted Feature layer, create a Python script and schedule it (using Windows scheduler) on the machine hosting my ArcGIS Server. So basically, what I want to script and schedule is the "Update Data" > "Overwrite Entire Layer" Portal function: Does the machine hosting ArcGIS Server & Portal need a specific environment/set up? It currently has Python 2.7 (folder C:\python27\ArcGISx6410.9) Where can I find tutorial and/or samples of Python script for the "Update Data" > "Overwrite Entire Layer" Portal function? Not bits of code, but a full script that helps to understand the full logic (where to put this script, how to run it, etc). For example this link (https://developers.arcgis.com/python/samples/overwriting-feature-layers/) seems to match, but when I try to run the first lines, it blocks at "ImportError: No module named arcgis.gis". Then when I search for this issue, I find that this code is for ArcGIS API for Python, which is installed along with ArcGIS Pro, but what I need is to use the Python script on the server... Context: ArcGIS Enterprise server (ArcGIS Server site federated with a portal) 10.9.1 (Windows). Many thanks! Martin
... View more
10-05-2022
07:21 AM
|
0
|
10
|
850
|
IDEA
|
Strongly need default values management... It is impossible to use the dashboard if on the first page load it displays non sense data 😕 We can't present this to our users.
... View more
04-23-2021
01:13 AM
|
0
|
0
|
1321
|
POST
|
Hi, sorry for this non very explicit title. Basically, I'd like to understand how I can show in a webmap only the layers I published and not the "parent" map item. A screenshot will be more explicit, I hope: I have a map service named "Transport Legal Instruments". I would like, in my web map consuming this service, to show only the 3 layers AGR1, AGR2, AGR3 in the "Contents" pane (and also in the layers list of the webapp I'll build using the WebApp Builder) and NOT the "Transport Legal Instruments" parent item: it prevents the users to go straight to the layers by adding an unnecessary click and in the webapp it brings no added value in my case. Any hints? I guess it is a very basic question, but I don't find any similar question here! Thank you! PS: I need the layers to be all in the same map (there will be about 50 layers)
... View more
10-20-2020
09:05 AM
|
0
|
1
|
285
|
POST
|
Add the Lenovo Yoga Thinkpad to the list (Windows 10 Pro). Same bug, with Firefox 66.0.4 and Chrome 78.0. Note that the tablet mode is disabled, and that the laptop is closed (connected to a dual screen).
... View more
03-03-2020
01:55 AM
|
0
|
0
|
429
|
POST
|
Moving to HTML5 Premium Media | Microsoft Edge Dev Blog Microsoft continues to support Silverlight, and Silverlight out-of-browser apps can continue to use it. Silverlight will also continue to be supported in Internet Explorer 11, so sites continue to have Silverlight options in Windows 10. At the same time, we encourage companies that are using Silverlight for media to begin the transition to DASH/MSE/CENC/EME based designs and to follow a single, DRM-interoperable encoding work flow enabled by CENC. This represents the most broadly interoperable solution across browsers, platforms, content and devices going forward. Considering that Windows 10 browser (Edge) will not support Silverlight, does ESRI have any plans for moving to other new technology?
... View more
07-04-2015
04:25 AM
|
0
|
2
|
3573
|
POST
|
Hello, I have a arcgis online map embeded in a iFrame on my ASP.Net website. The iFrame is in the 3rd tab of a 3 tabs container. Each time I change tab, the tabs are reloaded because of the autopostback (I can't set it to false). Until recently, it worked fine. I didn't change anything, but now, there is an error message when I navigate between the tabs. When I leave the third tab that contains the map, I have this error: The page at http://www.arcgis.com says:
Unable to create map : "d is null" In Firebug, in the console there are these 2 errors: 1/ At the beginning: NetworkError: 404 Not Found - http://www.arcgis.com/home/webmap/templates/templateConfig.js 2/ And after the "GET http://www.arcgis.com/home/webmap/templates/OneP...icviewer/apl/ElevationsChart/templates/Pane.html": dojo/parser::parse() error
TypeError: d is null This error occurs at line 512 of js.arcgis.com/3.7, in this code: f,b,!0)}).then(function(a){return n=n.concat(a)}).otherwise(function(a){console.error("dojo/parser::parse() error",a);throw a;});m.mixin(n,q);return n}};l.parser=B;e.parseOnLoad&&n(100,B,"parse");return B})},"esri/layers/MapImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/has esri/kernel esri/domUtils esri/geometry/Extent".split(" "),function(g,l,m,p,e,h){g=g(null,{declaredClass:"esri.layers.MapImage",constructor:function(e){l.mixin(this,e);this.extent=new h(this.extent)},visible:!0, Any help appreciated! Thank you Martin
... View more
10-02-2013
05:21 AM
|
0
|
5
|
3606
|
Online Status |
Offline
|
Date Last Visited |
Friday
|