arcgis中的python连接SDE
用arcgis中自带的python连接自己基于oracle的sde,在destop里面已经配置好了sde,现在我用arcpy.arcpy.AcceptConnections("Database Connections/yuan.sde", True);出现错误:Python 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import arcpy
>>> arcpy.arcpy.AcceptConnections("Database Connections/yuan.sde", True)
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
arcpy.arcpy.AcceptConnections("Database Connections/yuan.sde", True)
File "D:\software_location\arcgis10.3\server\ArcPy\arcpy\__init__.py", line 1670, in AcceptConnections
return gp.acceptConnections(sde_workspace, accept_connections)
File "D:\software_location\arcgis10.3\server\ArcPy\arcpy\geoprocessing\_base.py", line 477, in acceptConnections
return self._gp.AcceptConnections(sde_workspace, accept_connections)
TypeError: Could not open SDE workspace.
另外就是这个函数必须使用数据库管理员连接,难度还有配置什么?
Type "copyright", "credits" or "license()" for more information.
>>> import arcpy
>>> arcpy.arcpy.AcceptConnections("Database Connections/yuan.sde", True)
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
arcpy.arcpy.AcceptConnections("Database Connections/yuan.sde", True)
File "D:\software_location\arcgis10.3\server\ArcPy\arcpy\__init__.py", line 1670, in AcceptConnections
return gp.acceptConnections(sde_workspace, accept_connections)
File "D:\software_location\arcgis10.3\server\ArcPy\arcpy\geoprocessing\_base.py", line 477, in acceptConnections
return self._gp.AcceptConnections(sde_workspace, accept_connections)
TypeError: Could not open SDE workspace.
另外就是这个函数必须使用数据库管理员连接,难度还有配置什么?
1 个回复
孙林
赞同来自:
另外参考:https://www.reddit.com/r/gis/comments/5ksu84/python_script_works_everywhere_but_command_line/
参考:http://www.cnblogs.com/mumu122GIS/p/7697915.html
要回复问题请先登录或注册