Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a job (arcpy script) which relies on a query layer but it fails sometimes. It has to do with the query layer connection (the point where job fails randomly)- which is totally under the control of ORACLE team. I want to capture this to discuss with ORACLE team. What should be the right layer property to capture this?

share|improve this question
Did you try Layer.isBroken? – Kirk Kuykendall Feb 5 '13 at 19:26
I am working on 10.0 – Deep Feb 5 '13 at 20:11
Also, can I do anything about it? say add some wait time and try again (though users on the other side won't be happy with this- but waiting is better than breaking) – Deep Feb 5 '13 at 20:25

I've run into some issues with a few different tools failing because of Oracle connection problems. The workaround has been to wrap whatever process is failing in a try...except block and call it again if needed.

def do_work(self, call_counter):
    if call_counter > 0:

        #do your query layer work here
        #return whatever results you need, if any
        return "it worked!"
        #log here if needed
        return ""

def __init__(self):
    work_output = ""
    call_counter = 0 

    while len(work_output) == 0:
        work_output = self.do_work(call_counter)
        call_counter += 1
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.