In the following line
def run_job_subtype(self):
print os
if os.path.exists(self.abs_export_dir):
return "incr"
else:
return "full"
I am getting a traceback as follow:
"AttributeError: 'NoneType' object has no attribute 'path'
printing os:
<module 'os' from '/usr/lib/python2.7/os.pyc'>
<module 'os' from '/usr/lib/python2.7/os.pyc'>
<module 'os' from '/usr/lib/python2.7/os.pyc'>
None
None
None
None
None
None
None
all of the sudden it is set to None
I dont think I am programmatically setting to None..
Is it possible for os being set to None somehow other than by a programmer?
or any ways to debug this besides manually looking over thousands of lines of code?
This function is called within a thread
Another weird thing.... I've changed the code to:
def run_job_subtype(self):
print os
print sys.modules['os']
if os.path.exists(self.abs_export_dir):
return "incr"
else:
return "full"
Traceback
print sys.modules[\'os\']
', "AttributeError: 'NoneType' object has no attribute 'modules'
And im also importing sys. I am definitely not creating variables for both os and sys...
something is wiping all the imports?