|
POST
|
Open this file: C:\Users\dvandervoort\AppData\Local\ESRI\conda\envs\arcgispro-py3-DEV\Lib\site-packages\arcgis\features\managers.py At the top, do you see import logging and _log = logging.getLogger() You should be seeing those somewhere in the first 30 lines.
... View more
06-12-2024
01:16 PM
|
0
|
0
|
1526
|
|
POST
|
The problem here is that operation doesn't happen in-place. So, you have to do this to bake into the dataframe: sdf = sdf.astype({'facility_id': 'Int64'}) You may also use this syntax if you find it less confusing: sdf["facility_id"] = sdf["facility_id"].astype("Int64")
... View more
06-12-2024
10:05 AM
|
1
|
0
|
1315
|
|
POST
|
Ah, thanks. From looking at the source, it looks like the "logging" package is conditionally imported in a few places. In version 2.3.0.2 of the API, I don't see any obvious issues - our line numbers don't match up so I assume we are on different versions. Which version of the API are you using? You can look this up in the Pro package manager, doing running "conda list -n arcgispro-py3" or via "arcgis.__version__" My hope is whatever problem exists in your version can be easily fixed by upgrading the arcgis package. I don't really understand what the purpose of the conditional imports are since logging is imported at the top of "C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\managers.py" in my version. Perhaps this was a temp fix someone put in between versions? You should be able to add "import logging" at the very top of this file (I would assume it's missing) and it should fix this particular error you're encountering.
... View more
06-11-2024
08:49 AM
|
0
|
1
|
1543
|
|
POST
|
I mean the complete traceback showing where it failed. I want to see the line numbers and paths. If that's really all there is, then the problem must be in your code.
... View more
06-11-2024
04:14 AM
|
0
|
1
|
1561
|
|
POST
|
If you know what the item ids for your views are you can do it like this: from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
gis = GIS("https://www.arcgis.com", "user", "passwd")
view_id = "425b785aa3564a7d8d71dcc524a8eb9f"
vw_item = gis.content.get(view_id)
relationships = vw_item.related_items(rel_type="Service2Data") This is okay if you only have one relationship. It will give you access to the source item. If the only relatonship is to the source, then you'll get a list of length 1. Simply access that item and get whatever information you need from the Item as usual (id, url, name, etc.) I looked and I didn't see an obvious way to get the FeatureService sources endpoint, but this would be the most direct way to get the info you want. Assuming it actually doesn't exist in the API (someone please let us know if it does), you can get the info like this: import requests
from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "user", "passwd")
# if you already know the direct urls you don't need to do it like this
view_id = "425b785aa3564a7d8d71dcc524a8eb9f"
vw_item = gis.content.get(view_id)
sources_url = f"{vw_item.url}/sources"
data = {"token": gis._con.token, "f": "json"}
r = requests.post(sources_url, data=data) r.json() will look something like this: {
"currentVersion" : 11.2,
"services" : [
{
"name" : "schedule_pnt",
"type" : "FeatureServer",
"url" : "https://services3.arcgis.com/ON5SbcAnb3abcdef/ArcGIS/rest/services/schedule_pnt/FeatureServer",
"serviceItemId" : "9a65d1256fd04370807a60c11988asdfg"
}
]
} If you have a lot to go through, you may need to refresh the token with gis._con.relogin()
... View more
06-10-2024
05:00 PM
|
0
|
0
|
972
|
|
POST
|
Do you have an exception to work with? Seems like a missing import in the source unless you are using the logging package in your script.
... View more
06-10-2024
02:13 PM
|
0
|
3
|
1575
|
|
POST
|
Looks like you have a reproducible case? If it's not working as expected with the latest version of the API, I'd say you should go ahead and log something here: Issues · Esri/arcgis-python-api · GitHub
... View more
06-09-2024
02:04 PM
|
1
|
1
|
867
|
|
IDEA
|
@ZeminDhanani We have actually worked on improving the location of dialogs as part of the next ArcGIS Pro release. The challenge here is that what one person prefers may not be what another prefers. Some people want dialogs to always open the screen ArcGIS Pro is on, others may want dialogs to open in their last known position. The solution we have landed on is to strike a balance between both: The first time a dialog is opened, it will appear on the screen where Pro is displayed. The last position and size of the dialog will be remembered. For multi-monitor setups, when the Pro application is moved onto a new monitor, for example from Screen #1 to Screen #2, the dialog location will be reset and will appear on the same monitor as Pro (Screen #2 in this example).
... View more
06-06-2024
12:11 PM
|
0
|
0
|
1584
|
|
POST
|
Perhaps this will help? Solved: Re: Joined View Layer - Esri Community
... View more
06-06-2024
09:42 AM
|
0
|
1
|
1248
|
|
POST
|
There was a fairly similar question asked the other week. You can use the API to do a spatial join and then update the target field accordingly. See this example: Re: "Select By Location" and "Updat... - Esri Community
... View more
06-06-2024
09:37 AM
|
0
|
0
|
614
|
|
POST
|
If I understand you correctly, you want to do an append but preserve globalids so the related items are maintained? I think you can do this with the Append tool, but I believe unless something changed the catch is you have to be dealing with an enterprise geodatabase as the target. So, you may have to get your hands dirty to fix this but it's doable. You would just have to create a new field in the parent feature classes that maintains the original globalid values. Then, you append everything, join your related tables GUID <--> Copied GlobalId, and recalculate with the new globalid values.
... View more
06-05-2024
06:27 AM
|
0
|
0
|
1166
|
|
POST
|
Not what I was expecting, but let's try something. What happens when you install the package with no dependencies? The format for that in requirements.txt is: <package> --install-option="--no-deps"
... View more
06-04-2024
04:13 AM
|
0
|
0
|
2419
|
|
POST
|
Can you expand on what you mean by "We can export a zipped GDB to be opened in ArcGIS Pro but there is not a means to import/export this into our Portal with all the related data" ? Are you saying the Export process is not exporting the related data or something else? An alternative to a simple export would be to try turning on the sync capability and then create a replica (fgdb output format) which you can set to include attachments. I recall that with very large datasets the sync can time out - in that case, what you can do is set a query to limit the number of records and then just do the replication in chunks.
... View more
06-03-2024
02:52 PM
|
0
|
2
|
1199
|
|
POST
|
Is there anything in the logs with more information about the failure? Is the .zip failing to upload, for example?
... View more
06-03-2024
08:56 AM
|
0
|
1
|
2435
|
|
POST
|
Ah, so you are appending from a geojson file then? My guess is there may be an issue parsing the geometry data. Is the source data only available in geojson?
... View more
05-30-2024
06:23 AM
|
0
|
1
|
2096
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 01-18-2024 01:34 PM | |
| 1 | 09-13-2023 06:48 AM | |
| 1 | 09-23-2022 09:04 AM | |
| 1 | 06-14-2024 01:14 PM | |
| 2 | 09-24-2019 08:22 AM |