Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 001683 - Py2 to 3, Delineate Hierarchy, Flow Path, Animation and Simulate #41

Open
thompsongis opened this issue Feb 22, 2024 · 4 comments

Comments

@thompsongis
Copy link

  • lidar version: 0.7.3
  • Python version: 3.11
  • Operating System: Windows 64 bit

**ArcPro 3.2.2


I was following your tutorial and the "Delineate Flow Path Tool" is continuously failing. I've tried to update the packages, update Pro and all of the other generic "checks". Here is the message I got below when running the "Analyze Tools for Pro", which is the same error message I got when the tool failed. Everything was done exactly as you had in the tutorial. This might have been initially from batch update for Pro I assume?

WARNING 001683: Found Python 2 to 3 errors: Line 348: if key in parent_ids.keys(): -> if key in list(parent_ids.keys()): within script tool DelineateDepressionHierarchy(C:\Users\Thompson\Documents\ArcGIS\lidar_code\lidar-master\lidar\toolbox\scripts\4_Slicing.py)
WARNING 001683: Found Python 2 to 3 errors: Line 399: if row[0] not in inDict.keys(): -> if row[0] not in list(inDict.keys()):
Line 403: for key, value in od.items(): -> for key, value in list(od.items()): within script tool DelineateFlowPath(C:\Users\Thompson\Documents\ArcGIS\lidar_code\lidar-master\lidar\toolbox\scripts\3_Flow_Path.py)
WARNING 001683: Found Python 2 to 3 errors: Line 1: from future import division -> within script tool PlayAnimation(C:\Users\Thompson\Documents\ArcGIS\lidar_code\lidar-master\lidar\toolbox\scripts\7_Play_Animation.py)
WARNING 001683: Found Python 2 to 3 errors: Line 142: print("creating {}...".format(shp)) -> print(("creating {}...".format(shp)))
Line 318: if key in parent_ids.keys(): -> if key in list(parent_ids.keys()): within script tool SimulateInundation(C:\Users\Thompson\Documents\ArcGIS\lidar_code\lidar-master\lidar\toolbox\scripts\6_Simulate Inundation.py)

Thank you for your help! This

@giswqs
Copy link
Member

giswqs commented Feb 22, 2024

The recent ArcGIS Pro updates provide break the tool. The ArcPy API might have changed. Sorry, I don't have time to look into this at the moment

@thompsongis
Copy link
Author

I understand! Do you know the last version this worked with? I can try to revert to a previous update to continue with my project in the mean time is my hope.

@giswqs
Copy link
Member

giswqs commented Feb 22, 2024

I believe it was ArcGIS Pro 2.x. Try checking the screenshot in the video to see if it shows the version somewhere

@thompsongis
Copy link
Author

I have a computer that has Pro 3.1.0, retried this tutorial and it worked! All the way up to Step 6, where I was unable to simulate inundation. I see on another post from 3 days ago that they are having the same issue. Here is the error message:

  1. Simulate Inundation
    =====================
    Parameters

Input Sink Image sink.tif
Input Catchment Hierarchy Image G:\data\PLANNING\GIS\GIS Data\WINDSOR TOWN DATA_Thompson_Trblshoot\Vernal Pool Project\Output\catchment_2\catch_hir.tif
Minimum Depression Size 1000
Minimum Depression Depth 0.2
Slicing Interval 0.2
Rainfall Intensity (cm/h) 5
Rainfall Duration (h) 25
Simulation Time Step (h) 1
Output Inundation Image Folder G:\data\PLANNING\GIS\GIS Data\WINDSOR TOWN DATA_Thompson_Trblshoot\Vernal Pool Project\Output\Inun

Messages

Start Time: Thursday, February 22, 2024 4:37:43 PM
Data preparation time: 0.25606608390808105
Total number of regions: 39
Iteration: 1 ( H = 1.0 )
Traceback (most recent call last):
File "G:\data\PLANNING\GIS\GIS Data\WINDSOR TOWN DATA_Thompson_Trblshoot\Vernal Pool Project\lidar-master\lidar\toolbox\scripts\6_Simulate Inundation.py", line 470, in
for region in copy.deepcopy(regions): # iterate through each depression region
File "C:\Users\thompson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\copy.py", line 146, in deepcopy
y = copier(x, memo)
File "C:\Users\thompson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\copy.py", line 205, in _deepcopy_list
append(deepcopy(a, memo))
File "C:\Users\thompson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "C:\Users\thompson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\copy.py", line 271, in _reconstruct
if hasattr(y, 'setstate'):
File "C:\Users\thompson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\site-packages\skimage\measure_regionprops.py", line 323, in getattr
if attr in self._extra_properties:
File "C:\Users\thompson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\site-packages\skimage\measure_regionprops.py", line 323, in getattr
if attr in self._extra_properties:
File "C:\Users\thompson\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone\Lib\site-packages\skimage\measure_regionprops.py", line 323, in getattr
if attr in self._extra_properties:
[Previous line repeated 991 more times]
RecursionError: maximum recursion depth exceeded

Failed script 6. Simulate Inundation...
Failed to execute (SimulateInundation).
Failed at Thursday, February 22, 2024 4:37:43 PM (Elapsed Time: 0.49 seconds)

I understand you don't have the time to look into this, though. Thank you for your help! I hope to hear from you soon.

Best,
Chloe Thompson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants