|
POST
|
I've created a custom script tool. And I want to be able to describe what to do for each parameter. I would think you could edit the little info box that appears when you hover over it. Right now it's blank. I don't see anywhere in the Tool Properties> Parameters where you could do this.
... View more
06-09-2021
12:50 PM
|
0
|
2
|
4577
|
|
POST
|
Thanks for the workflow. I had a post going in the Python Documents community too. I followed this workflow to get my environment up and running again. Navigate to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3, back it up somewhere else, ex: %localappdata%\temp\arcgispro-py3-broken-backup Uninstall Pro 2.8 Navigate to C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 and make sure the folder is deleted. If it isn't, go ahead and delete it. Install Pro 2.8 In the python command prompt: create a new environment by cloning arcgispro-py3, and activate it: >>>conda create --clone arcgispro-py3 --name my-env --pinned >>>activate my-env Generate a list of additional packages installed in your current environment, with the conda command: >>>conda env export > env.yaml (Optional) If you have additional dependencies installed through pip, find those with pip freeze: >>>pip freeze > requirements.txt Add back missing conda packages from your current environment: >>>conda env update -n my-env -f env.yaml (Optional) Add back missing packages from pip: >>>pip install -r requirements.txt (Optional) Make it the default for the ArcGIS Pro application: >>>proswap my-env
... View more
06-04-2021
08:54 AM
|
0
|
0
|
2546
|
|
DOC
|
Learned some things. Thank you very much. When I uninstalled 2.8 the first time I didn't check whether the arcgispro-3 folder was there before I reinstalled 2.7. Looking back, it might have been due to the duplicate packages. I didn't know it was a golden rule to work from a cloned environment. I'm pretty sure I've added packages to the arcgispro-3 environment in the past via the python command prompt or the VS Code 2019 package installer. Everything is working as it should again.
... View more
06-04-2021
08:32 AM
|
0
|
0
|
7877
|
|
DOC
|
@HannesZieglerThanks for the feedback. I never used the Pro Python Package Manager to install any packages. The Install/Uninstall buttons are always greyed-out anyway? And I've never set up a cloned environment. I didn't know what else to do but un-install Pro 2.8 and then reinstall 2.7. With 2.7 everything is functioning again. With 2.8 I couldn't access anything python-related on top of not having the modules available in a stand-alone. Opening a new Notebook or the python window would crash Pro 2.8. And opening Jupyter from the ArcGIS folder in the Start menu also failed. With this reinstall of 2.7 I'm still seeing duplicates in the Package Manager as I did with 2.8. I'm not sure how to uninstall when the button is greyed-out.
... View more
06-03-2021
09:18 AM
|
0
|
0
|
7936
|
|
POST
|
I updated yesterday and there are a few things not working. 1) I can't open a Notebook from Pro. It will crash Pro. 2) I can't open a Jupyter Notebook at all. 3) From a Pro python environment in VS Code 2019 my modules are all broke in the few scripts I have open. 4) Even opening the python window from the View menu will crash Pro. The Pro environment is using Python 3.7.10. The python .exe file still lives in the same directory: C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3 Based off another question ("Adding notebook crashing ArcGIS"), I went to my Python Package Manager and noticed I have a lot of duplicate packages as the author of the question did. Why's this happening? And what's the solution to getting my Pro python environment back up?
... View more
06-02-2021
09:29 AM
|
0
|
3
|
2604
|
|
DOC
|
Is there an obvious reason why my modules are no longer found while working in a Python Pro environment after the update to 2.8? My environment hasn't moved from this location:C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3
... View more
06-01-2021
01:49 PM
|
0
|
0
|
8002
|
|
POST
|
This isn't very encouraging: "Care should be taken when using ArcGIS REST API search operations... The Portal uses a powerful search engine to index information and to allow full text searching on it. This search engine uses many different inputs to find the appropriate results and rank them. This often makes search 'fuzzy', making it ideal for human interaction, but not necessarily ideal for looking for specific records programmatically. Developers should avoid using search to find specific items (e.g. by title) as the results of these types of queries might change as the search engine evolves."
... View more
05-13-2021
09:35 AM
|
0
|
1
|
3438
|
|
POST
|
Josh, Thanks for the reply. I was able to get back the table I was searching for: table = gis.content.search("typekeywords:table")
table
#out[]: <Item title:"csvtest" type:Table Layer owner:admin
...
#this also worked
table = gis.content.search(query="typekeywords:table") However, that also returns every other table owned by admin. There are seven. I want to single out my table. And using the other parameters doesn't seem to do anything. For example, this will return all the tables under admin. table = gis.content.search("typekeywords:table", sort_field='csvtest') I've considered using an index number [0] to find the item, but that can be slippery as my colleagues also add content to the Portal with the admin sign-in. So, it might be [0] one day but not the next.
... View more
05-13-2021
09:29 AM
|
0
|
3
|
3439
|
|
POST
|
Is there a way to search your Enterprise Portal for a hosted table using the content manager search()? I've tried a few different ways using the item_type= parameter, but I get nothing. And there is no obvious mention of tables in the Items and item types API help page? table = gis.content.search(query="title:csvtest", item_type='table') I've also tried these: item_type='hosted table'
item_type='Table'
item_type='Table Layer' They all give me this [] There is, however, a table in my content. I can find it with the required query parameter alone. The item type will come back as Table Layer, which, as you see above, I have tried. table = gis.content.search(query="title:csvtest")
###result
<Item title:"csvtest" type:Table Layer owner:admin>
... View more
05-12-2021
12:20 PM
|
0
|
5
|
3501
|
|
POST
|
Thanks @Tomasz_Tarchalski . I was asleep at the wheel.
... View more
05-04-2021
02:06 PM
|
0
|
0
|
5152
|
|
POST
|
@Tomasz_Tarchalski If I run row[1] = s[1:][0]
print(row[1]) it's only returning one value. DENNIS
KYLE
LINDA
SUSAN
MICHAEL
NEILL
PAMELA
... This is what I'm expecting: DENNIS J
KYLE
LINDA KAY LVG TR
SUSAN K
MICHAEL JO ANN
NEILL DANIEL J
PAMELA
... If I do this it's back in a list again. row[1] = s[1:][0:]
print(row[1]) Prints: ['DENNIS', 'J']
['KYLE']
['LINDA', 'KAY', 'LVG', 'TR']
['SUSAN', 'K']
['MICHAEL', 'JO', 'ANN']
['NEILL', 'DANIEL', 'J']
['PAMELA']
...
... View more
05-04-2021
07:23 AM
|
0
|
2
|
5168
|
|
POST
|
I'm trying to slice with an index to get everything that comes after the first value in the MAIL_AD1 field and use the update cursor to put it in the Name_First field. As of now I can only get the second value and nothing more. Here's the table I'm working with: This puts the correct value in the Name_Last field: fc = r"C:/pathto/fc"
field = ['MAIL_AD1', 'Name_First', 'Name_Last']
def Name_Last(): # this function updates the Name_Last field
with arcpy.da.UpdateCursor(fc, field) as cursor:
for row in cursor:
name = row[0] #get name in MAIL_AD1 list
if name is None: continue # continue to the next iteration in loop if None
s = str(unit).split() #split strings in MAIL_AD1 field
row[2] = s[0] #update Name_Last field with first value in MAIL_AD1 field
cursor.updateRow(row)
del cursor But when I try to slice with an index number I get the error, which happens on the row[1] = s[1:] line. def Name_First(): #this function updates the Name_First field
with arcpy.da.UpdateCursor(fc, field) as cursor:
for row in cursor:
unit = row[0] #get Unit in field list
if unit is None: continue # continue to the next iteration in loop if None
s = str(unit).split() #split strings in MAIL_AD1 field
row[1] = s[1:] #update Name_First field with what comes after first value in MAIL_AD1 field
cursor.updateRow(row)
del cursor TypeError: value #1 - unsupported type: list
... View more
05-03-2021
02:39 PM
|
0
|
4
|
5226
|
|
POST
|
Perhaps? I was signed in as me. I haven't tried it as an admin. I'll keep that in mind!
... View more
04-30-2021
09:17 AM
|
0
|
0
|
740
|
|
POST
|
Thanks @jcarlson, Not sure why your first bit of code wasn't giving me the same results as the second bit of code. But after adding this parameter to the second bit I was able to get the desired results. query="owner:" + gis.users.me.username
... View more
04-30-2021
09:04 AM
|
0
|
2
|
6039
|
|
POST
|
That's true, I didn't realize that. Regardless, I'm showing only 32 items with 'authoritative' status when viewing Content under My Organization. That's interesting. I'm getting a Cross-Origin Request Blocked when clicking the 'Authoritative' filter. 16:11:50.370 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://mobileanalytics.us-east-1.amazonaws.com/2014-06-05/events. (Reason: CORS request did not succeed).
... View more
04-29-2021
02:14 PM
|
0
|
1
|
6050
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-25-2026 12:25 PM | |
| 1 | 05-04-2026 08:45 AM | |
| 1 | 04-20-2026 01:20 PM | |
| 1 | 07-24-2025 01:27 PM | |
| 1 | 11-13-2025 08:22 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|