POST
|
Good day, We just migrated to the 3.3 API from the 3.2 and we're experiencing certain problems with functions that worked fine in 3.2. Most notably, it seems I cannot instanciate a LinearUnit object or a Geoprocessor object. From the API reference, I can see that they are both supposed to be included in esri.tasks but I cannot find them when looking at esri.tasks in a debugger. I keep getting this error : TypeError: esri.tasks.LinearUnit is not a constructor Am i doing something wrong here? Thanks for the help, Bruno
... View more
01-15-2013
10:13 AM
|
0
|
2
|
724
|
POST
|
After following some steps by the other poster in the thread mentionned, I managed to work around the path problem. However, it seems that I may now have an environment problem : [INDENT]Unable to complete operation. Error executing tool.: ERROR 000229: Cannot open C:\arcgisserver\directories\arcgisjobs\pathToService\je21b3d49f57f48609764fb57a445bc02\scratch\scratch.gdb\FEATURECLASS Failed to execute (Make Source Feature Layer). Failed to execute (SearchByFeaturesID). Failed to execute (Search By Features ID).[/INDENT] Indeed, on the server, I cannot find any path named C:\arcgisserver\directories\arcgisjobs\pathToService\je21b3d49f57f48609764fb57a445bc02\scratch\scratch.gdb\FEATURECLASS. My instinct tells me it has something to do with the environments but I have no clue how to fix it. Help is still needed, thanks! Bruno
... View more
12-18-2012
10:43 AM
|
0
|
0
|
600
|
POST
|
After searching some more, it seems that the following thread may be related to my issue : http://forums.arcgis.com/threads/73207-Publishing-PYT-with-a-string-pointing-to-an-SDE-file-on-disk-crashes-ArcCatalog
... View more
12-18-2012
10:31 AM
|
0
|
1
|
600
|
POST
|
Good day, I'm trying to get a geoprocessing service to work. The service runs fine from ArcCatalog when I'm on the server, it produces the expected results. Once published though, I cannot get it to run from the endpoint. It seems that a part of my python code is responsible. Basically, I have this simple piece of code that is supposed to look for a file on the disk and return it as a Feature Class : [INDENT]
import arcpy
LayerName = arcpy.GetParameterAsText(0)
path = "C:\\PathToDatabase\database.gdb\\"
fs = arcpy.FeatureSet(path + LayerName)
arcpy.SetParameterAsText(1, fs)
[/INDENT] When I execute the service from the endpoint I get this message : [INDENT]Unable to complete operation. Error executing tool.: Traceback (most recent call last): File "C:\PathToService\SearchByFeaturesTest.GPServer\extracted\v101\GetFileLocation.py", line 13, in <module> fs = arcpy.FeatureSet(path + LayerName) File "c:\program files\arcgis\server\arcpy\arcpy\arcobjects\mixins.py", line 1007, in __init__ self._arc_object.load(table) RuntimeError: RecordSetObject: Cannot open table for Load Failed to execute (Get Source FeatureSet). Failed to execute (SearchByFeaturesTest). Failed to execute (Search By Features Test).[/INDENT] When I look at the extracted py file in the task folder (C:\PathToService\SearchByFeaturesTest.GPServer\extracted\v101\GetFileLocation.py), I can see that lines have been added to my original py file: [INDENT]
# Esri start of added variables
import os, arcpy
g_ESRI_variable_1 = os.path.join(arcpy.env.packageWorkspace,u'database.gdb')
# Esri end of added variables
# Esri start of added imports
import sys, os, arcpy
# Esri end of added imports
import arcpy
LayerName = arcpy.GetParameterAsText(0)
path = g_ESRI_variable_1
fs = arcpy.FeatureSet(path + LayerName)
arcpy.SetParameterAsText(1, fs)
[/INDENT] I am truly stumped on this problem and I could realy use a hand, can anyone help? Thanks Bruno
... View more
12-18-2012
10:11 AM
|
0
|
3
|
5408
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|