Closed knewellcob closed 11 months ago
@knewellcob what version of the arcgis library are you using?
import arcgis
arcgis.__version__
Next,
try changing processed_table = df.spatial.to_table('DP05_Pop_Age_Sex_Race')
to processed_table = df.spatial.to_table(os.path.join(arcpy.env.workspace, 'DP05_Pop_Age_Sex_Race'))
Let me know what happens.
version 2.2.0
That change did seem to do the trick! However, with that change my field names all got changed from the original and so subsequent calls and calculations are failing because of field name changes (I did not post the full script which performs field calculations after creating the fgdb table). For example "DP05_0001E" changed to "dp05_0001_e" and so on...Is there and obvious reason why the field name would be changed? It consistently changed all to lower case and changed the "E" at the end of each field name to "_e".
From: Andrew @.> Sent: Wednesday, December 13, 2023 3:00 AM To: Esri/arcgis-python-api @.> Cc: Newell, Kate @.>; Mention @.> Subject: Re: [Esri/arcgis-python-api] df.spatial.to_table error with update to ArcGIS Pro 3.2 (Issue #1727)
You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification
@knewellcobhttps://github.com/knewellcob what version of the arcgis library are you using?
import arcgis arcgis.version
Next,
try changing processed_table = df.spatial.to_table('DP05_Pop_Age_Sex_Race') to processed_table = df.spatial.to_table(os.path.join(arcpy.env.workspace, 'DP05_Pop_Age_Sex_Race'))
Let me know what happens.
— Reply to this email directly, view it on GitHubhttps://github.com/Esri/arcgis-python-api/issues/1727#issuecomment-1853699917, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANJ2HJUGV4M3FXVSRBDNTNDYJGDDFAVCNFSM6AAAAABASD37BWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJTGY4TSOJRG4. You are receiving this because you were mentioned.Message ID: @.***>
@knewellcob the fields get sanitized
. You can set that property to False to not do it.
Describe the bug I have a python script that worked perfectly last week...before I upgraded from ArcGIS Pro 2.9.5 to 3.2 (see below script). The script is run within the python window in Pro. When I re-ran this script this week, after updating to Pro 3.2, the script no longer works. I was able to test it on a workstation that was still on 2.9.5, and it works! So that is pretty clear to me that something has changed from the python/panda libraries between 2.9.5 and 3.2. The error I am getting happens on the last line of the script when I try to write the dataframe to a table. Yes, I know the table does not have any geometry, but this worked in the past and created a fgdb table perfectly. To Reproduce Steps to reproduce the behavior:
error:
Expected behavior This script worked with no errors before updating to ArcGIS Pro 3.2. The script creates a table with the file geodatabase.
Platform (please complete the following information):