OSError: [Errno 26] Text file busy during subprocess.check_call() :seems os dependent

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Dec 30 21:39:38 EST 2010


On Thu, 30 Dec 2010 13:46:35 -0800, harijay wrote:

[...]
> But I get the same "OSError: [Errno 26] Text file busy"  error
> 
> Everytime I run the same job queue a different part of the job fails.
> 
> Unfortunately I dont see anybody else reporting this OSError. ANy help
> in troubleshooting my "newbie" thread code will be greatly appreciated.

Try catching the OSError exception and inspecting the filename attribute. 
Something like this might help:

# Untested
def report_error(type, value, traceback):
    if type is OSError:
        print value.filename
    sys.__excepthook__(type, value, traceback)


sys.excepthook = report_error


-- 
Steven



More information about the Python-list mailing list