>>> import arcpy >>> arcpy.listenvironments() Traceback (most recent call last): File "<interactive input>", line 1, in <module> AttributeError: 'module' object has no attribute 'listenvironments'
>>> arcpy.ListEnvironments() [u'newPrecision', u'autoCommit', u'XYResolution', u'XYDomain', u'scratchWorkspace', u'terrainMemoryUsage', u'MTolerance', u'compression', u'coincidentPoints', u'randomGenerator', u'outputCoordinateSystem', u'rasterStatistics', u'ZDomain', u'snapRaster', u'projectCompare', u'cartographicCoordinateSystem', u'configKeyword', u'outputZFlag', u'qualifiedFieldNames', u'tileSize', u'pyramid', u'referenceScale', u'extent', u'XYTolerance', u'tinSaveVersion', u'MDomain', u'spatialGrid1', u'cellSize', u'outputZValue', u'outputMFlag', u'geographicTransformations', u'spatialGrid2', u'ZResolution', u'mask', u'spatialGrid3', u'maintainSpatialIndex', u'workspace', u'MResolution', u'derivedPrecision', u'ZTolerance']
Hello,I was wondering if anybody else has experienced this. I'm unable to simply set the workspace (or scratchworkspace). The error I get (in PythonWin/Idle/Executing from Toolbox) is:Traceback (most recent call last): File "C:\Projects\PythonScripts\Script34.py", line 13, in <module> gp.workspace = "C:/Test"AttributeError: Object: Environment <workspace> not foundThe python script is simple:import arcgisscriptinggp = arcgisscripting.create(9.3)gp.workspace = "C:/Test"Things I've tried:- Various formats of the path based on ESRI doc- Checking the versions of Pthon/PythonWin/Numby (and reinstalling several times)- Running in safe mode- Looking at event viewer for error- Using procmon to see if something shows up there- Setting the license level (per others in the forum with same issue)- Creating the geoprocessor various ways from ESRI doc I'm really stuck ... any thoughts as to why this would happen would be MUCH appreciated. Most other properties and methods on the gp seem to work.Windows 7ArcGIS Editor Single Use9.3.1 SP2Jess
gp.listenviroments()
import arcgisscripting gp = arcgisscripting.create(9.3) gp.clearenviroment("workspace") print gp.workspace gp.workspace = "C:/Test" print gp.workspace
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.