I\'ve set up my Python/Django virtual environment, and mod_wsgi in daemon mode, and am pretty sure (done this before) it\'s \"mostly correct\" except I get the fol
This is likely due to code still running in background threads when the Python interpreter is being destroyed on process shutdown. What happens during interpreter destruction is that all modules get wiped out and attribute access of things often returns None
as fallback. In this case looks like builtins module was wiped before the PIL object got destroyed and so it couldn't find hasattr.
Can you confirm this only happens when Apache is being restarted and processes shutdown?