NENA911 / NG911GISDataModel

GIS Data Model templates based on the NENA Standard for NG9-1-1 GIS Data Model (NENA-STA-006.x)
Apache License 2.0
15 stars 7 forks source link

Python 2.7 logic causing Python 3.x toolbox to fail. #63

Closed NCT911-DLindsey closed 1 year ago

NCT911-DLindsey commented 1 year ago

Hey Tom,

I got the following error message when attempting to create the Esri File GDB via ArcGIS Pro: image

From what I've researched, Python 3 doesn't support "iteritems" for dictionaries.

https://github.com/NENA911/NG911GISDataModel/blob/67a6aac3f91184f6c1492f8c97ea8a43f9bfa9e9/esri_geodatabase/NENA_NG911_Scripts/create_ng911_fgdb.py#L241-L247

-David L.

tomneer commented 1 year ago

Thanks. Thought I snuck around the differences in Python 2 and 3. Obviously not...

jasonhorning commented 1 year ago

If there isn’t a workaround to this, perhaps we should roll back.  It’s not ideal but I’d prefer to have a solution that works going forward as opposed to resolving an inconvenience on software with a declared end of life.Sent from my iPhoneOn Jan 3, 2023, at 3:19 PM, Tom Neer @.***> wrote: Thanks. Thought I snuck around the differences in Python 2 and 3. Obviously not...

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

NCT911-DLindsey commented 1 year ago

Tom, I changed line 245 in my forked create_ng911_fgdb.py script from domain["values"].iteritems() to domain["values"].items() and so far it seems to be humming along nicely in Python 2.7 and Python 3 (at first glance). I'll deep dive it in the morning, but let me know if you see issues with that approach.

ArcMap: image

Pro: image

-David L.

tomneer commented 1 year ago

I switched out the library to use the six library. Didn't see your change until just now. Tested in both ArcGIS Pro and ArcGIS Desktop 10.x.

jasonhorning commented 1 year ago

My test in in 10.5.1 this am is working and I have an ordered list of domain values from which to choose.