Select to view content in your preferred language

Calculate Geometry in 2.7 not working

2194
7
01-29-2021 02:04 PM
RobbynAbbitt
Regular Contributor

When I upgraded to ArcPro 2.7 the Calculate Geometry tool stopped working.

It will run on a numeric field clean with no errors or warnings, but it fails to populate the field with any values.

I have tried old data, new data, shapefile and geodatabase feature class.

I have also tried multiple options in the tool -centroid, area, perimeter, etc.

Thanks in advance for any responses!

0 Kudos
7 Replies
DanPatterson
MVP Esteemed Contributor

could be a bad install/update.

Try Windows, Add/Remove programs, select Remove, the Repair.

If that doesn't work, then you may need to completely remove Pro (including renaming folders in your c:\users... appdata ... anything esri rename to esri_old)

and reinstall


... sort of retired...
RobbynAbbitt
Regular Contributor

Hi Dan - I've tried both of those...to no avail.

In an interesting twist, I decided to try the Calculate Field tool this morning and now I AM getting error messages:

160145 Field is not nullable 

and

000574 Python is not installed

The Python one is super curious since I did a full installation last night - AND I am also teaching a Python in ArcPro course right now and all of my IDLE in Pro scripts are still working...

I'm going to try to repair the installation again and then perhaps try to uninstall and reinstall again.

Thanks for the advice

0 Kudos
DanPatterson
MVP Esteemed Contributor

You apparently have multiple versions of python installed... you will have issues.

Windows Add/remove programs.... get rid of any python version you have and you might want to consider reinstalling your favorite python IDE once you are all done

Your uninstall left vestiges of previous versions of python and remnants of previous Pro installations.

You should really rename your C:\Users\ YOU \AppData\Local\ESRI folder to .....ESRI_OLD ... AFTER you completely uninstall pro.

When you download the software from your My ESRI site, SAVE IT!  into a folder.  It will save an *.exe file to disk, you run it and it creates a *.msi and *.cab file... run the *.msi folder

The smart person will install it in a simple folder like ..... c:\arc_pro  to avoid the space in file path issues.

You should have a clean uninstall,.... however, you might want to consider checking your windows registry  first..

windows 'regedit' and renaming the ESRI folder in \HKEY_CURRENT_USER  to ESRI_OLD as well

Then install

It that doesn't work, I would contact Tech Support, since this message will self destruct in 15 minutes 😊

 


... sort of retired...
0 Kudos
RobbynAbbitt
Regular Contributor

I FINALLY figured out the issue.  For teaching my Python course I have them install the Spyder package (Which requires making a clone of the Python environment).

My installations (and repeated uninstalls and reinstalls) were referencing this clone environment - which apparently was not working properly?

I'm still not sure on that front - I will need to canvas my students to see if those in the Python course have the same issues on their ArcPro installations now that we have done the Spyder install step in class.

Somehow it was causing all functions in Pro that required a Python script to no longer work.

Thank you immensely for your continued responses - my service request from Thursday still hasn't been responded to so this was invaluable.

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

You install Spyder AFTER Pro.  I install spyder in the main/base environment I don't use clones, but if they have to

Clone ... ArcGIS Pro 2.5 - GeoNet, The Esri Community

And for spyder

Spyder 4 ... the python IDE for science - GeoNet, The Esri Community

Viewing Geometry in your Python IDE - GeoNet, The Esri Community

a bit older but a goodie

Spyder.... for coding with Python - GeoNet, The Esri Community

If you have spyder issues, let me know 😉

ArcGIS PRO .... your conda environments and scrip... - GeoNet, The Esri Community


... sort of retired...
0 Kudos
EDSONARANTESNASCIMENTO
New Contributor

Same Here dude waiting for the answer. The same issue happened to me.

 

0 Kudos
RobbynAbbitt
Regular Contributor

If your issue is with the Calc Geometry tool not working - open the Python window in Pro (analysis tab) and make sure there are no red error messages when that window opens.

My issue was driven by my Python environment not working properly - and for some reason the Calc Geom tool just never threw an error message.  BUT other tools eventually did.

Once I got Python back and working the tool worked as expected - and as it has for years.

Good luck!