Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import arcpy
  2.  
  3. SDE_CONNECTION = "XXX_DEV.sde"
  4. TABLE_NAME = "Table01"
  5.  
  6. fields = ["Field01"]
  7.  
  8. with arcpy.da.SearchCursor(TABLE_NAME, fields) as cursor:
  9. for row in cursor:
  10. print(row)
  11.  
  12. Connected to pydev debugger (build 141.1899)
  13. Traceback (most recent call last):
  14. File "C:Program Files (x86)JetBrainsPyCharm 4.5.2helperspydevpydevd.py", line 2358, in <module>
  15. globals = debugger.run(setup['file'], None, None, is_module)
  16. File "C:Program Files (x86)JetBrainsPyCharm 4.5.2helperspydevpydevd.py", line 1778, in run
  17. pydev_imports.execfile(file, globals, locals) # execute the script
  18. File "C:/XXX/_pg.py", line 10, in <module>
  19. with arcpy.da.SearchCursor(TABLE_NAME, fields) as cursor:
  20. RuntimeError: cannot open 'Table01'
  21.  
  22. Process finished with exit code 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement