I am trying to setup a script that runs the CCTV solution daily and pulls data from our SDE. I'm getting an error and I don't know if it's related to using the SDE data or something else.
RuntimeError: cannot open 'R:\GIS\User\Krystal_Phaneuf\ArcGIS_Pro_Projects\CCTV_Manager\CCTVResults_08122019.gdb\DOU.GXP_GISINSPECTION_TVW'
The process creates a table in CCTVResults_08122019.gdb, but the name does not contain the "DOU." I think that's being pulled from my SDE and it's somehow referencing that name?
I'm using ArcGIS Pro 2.4.1 and SDE 10.4.1 Oracle 12c.
Any help or suggestions is appreciated!
Thanks
Krystal
Full Message:
Messages
Start Time: Monday, August 12, 2019 3:53:23 PM
Running script GenerateCCTVPipeFeatures...
ArcGIS Pro 2.4.1.19948
utilsolutions 2.2.2
A python error occurred.
EXCEPTION
Traceback (most recent call last):
File "C:\Users\kphaneuf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone3\Lib\site-packages\utilsolutions\esri\helper.py", line 35, in wrapper
return func(*args, **kwargs)
File "C:\Users\kphaneuf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone3\Lib\site-packages\utilsolutions\esri\gptools.py", line 910, in run
points, lines, defects,group_layer = p.save_to_disk(target_gdb=gdb,group_layer=group_layer)
File "C:\Users\kphaneuf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone3\Lib\site-packages\utilsolutions\cctv\core.py", line 479, in save_to_disk
inspection_df, condition_df = self.process()
File "C:\Users\kphaneuf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone3\Lib\site-packages\utilsolutions\cctv\core.py", line 362, in process
df = self.pipe_df()
File "C:\Users\kphaneuf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone3\Lib\site-packages\utilsolutions\cctv\core.py", line 230, in pipe_df
pipe_ids = self.inspection_df()[self.inspection_fk].tolist()
File "C:\Users\kphaneuf\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone3\Lib\site-packages\utilsolutions\cctv\core.py", line 271, in inspection_df
with arcpy.da.SearchCursor(self._inspection_table, fields, where_clause=sql) as cursor:
RuntimeError: cannot open 'R:\GIS\User\Krystal_Phaneuf\ArcGIS_Pro_Projects\CCTV_Manager\CCTVResults_08122019.gdb\DOU.GXP_GISINSPECTION_TVW'
Failed to execute (GenerateCCTVPipeFeatures).
Failed at Monday, August 12, 2019 3:56:09 PM (Elapsed Time: 2 minutes 45 seconds)
Looks like the fully qualified name from SDE is being carried over into your geodatabase. The path should be:
'R:\GIS\User\Krystal_Phaneuf\ArcGIS_Pro_Projects\CCTV_Manager\CCTVResults_08122019.gdb\GXP_GISINSPECTION_TVW'
instead
That's a bug, the tool should work fine if your source is in an enterprise geodatabase.
CC Gelisa Slyer
Thanks Paul. When you say it should work if the source is in an enterprise gdb, do you mean if the results table is in an enterprise gdb? Currently, all the source data that is going into the tool is coming from an enterprise gdb, SDE 10.4.1 Oracle 12c.
Currently the tool only creates output in a new file geodatabase.
You would need to load into your enterprise gdb afterwards.
Ok, but the tool doesn't complete with the input data for inspections, conditions, and media coming from SDE. So I'd have to copy from SDE to a fgdb, run the script with that data, output the results to another fgdb, then load the results in the enterprise gdb. Correct?
Currently, yes.
By design, the tool outputs to FGDB. It's a bug that it doesn't work with input from SDE.
Ok, thank you for the responses. Glad to know I wasn't just doing something wrong. Thanks!