data source is not registered with the server

359
2
Jump to solution
03-24-2014 01:19 PM
dancheng
New Contributor II
Hi everyone,

So I am publishing my own python script as a geoprocessing service, it keeps telling me the data source is used by the script is not registered with the server: \...\default.gdb. The strange part is that my script is not using default.gdb at all. Attached is the python script. It searches on multiple layers and wraps all the layers in one zipped folder. Thanks!

Dan
0 Kudos
1 Solution

Accepted Solutions
KelleyLewelling
New Contributor II
I too was having this exact problem, and I found it related to the string split I was doing.  Try replacing your .split call with os.path.split. 

Kelley

View solution in original post

0 Kudos
2 Replies
KelleyLewelling
New Contributor II
I too was having this exact problem, and I found it related to the string split I was doing.  Try replacing your .split call with os.path.split. 

Kelley
0 Kudos
dancheng
New Contributor II
Hi Kelley,

Yes, I figured it out this morning too, its due to the split function. So I did this to fix it. Thanks!!!

outputFC = output+layer.split('\\')[-1]
arcpy.Select_analysis(layer, outputFC, SQLs[Layers_To_Search.index(layer)])

I too was having this exact problem, and I found it related to the string split I was doing.  Try replacing your .split call with os.path.split. 

Kelley
0 Kudos