Re: [modwsgi] ImportError: No module named threading

2012-11-14 Thread Graham Dumpleton
Interesting. I am hoping soon to upgrade a mac mini at home used as a media server to latest MacOSX and add server extensions, so may finally be able to dig into what message Apple has created. Graham On 13 November 2012 16:08, Gnarlodious gnarlodi...@gmail.com wrote: I think I've figured out

Re: [modwsgi] ImportError: No module named threading

2012-11-12 Thread Gnarlodious
I think I've figured out why this was happening. If Server.app can't parse a configuration file when it starts up, it replaces the unreadable file with a default file while leaving Apache running on its previous config. When that happens, restarting the web service causes the new default

Re: [modwsgi] ImportError: No module named threading

2012-11-10 Thread Gnarlodious
UPDATE! Some of these complaints may have been solved by rebooting. Upon investigating this phenomenon, the OSX 10.8 (Mountain Lion) Server.app does NOT in fact restart Apache. It turns out that Server.app is built on top of a subsystem that runs httpd as root user. As a security precaution,

Re: [modwsgi] ImportError: No module named threading

2012-11-08 Thread Gnarlodious
I've verified that my webapp is in fact running more than one thread when it is configured to run only one thread. It periodically displays an entire different data set dependng on which thread decides to answer the request. It also explains the problem with objects not being found. But why all

Re: [modwsgi] ImportError: No module named threading

2012-11-07 Thread Gnarlodious
No. I disabled the offending modules all of which use sqlite3, but it means my webapp is running in a degraded mode. I am waiting for someone else to have this problem and solve it since I am not so knowledgeable. I did solve the sqlite3 problem by isolating the connection using:

Re: [modwsgi] ImportError: No module named threading

2012-11-06 Thread Graham Dumpleton
Did you ever sort out why this was happening? Graham On 30 October 2012 02:29, Gnarlodious gnarlodi...@gmail.com wrote: The two paths are identical at the *.wsgi script and also at the *.py script that crashes. -- Gnarlie On Monday, October 29, 2012 5:55:02 AM UTC-6, Graham Dumpleton

Re: [modwsgi] ImportError: No module named threading

2012-10-29 Thread Gnarlodious
It seems to be working now after restarting Apache using: sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist sudo launchctl load -w /System/Library/LaunchDaemons/org.apache.httpd.plist This restarts the parent process of the Apache instance Server.app uses.

Re: [modwsgi] ImportError: No module named threading

2012-10-29 Thread Gnarlodious
OK here is the final report. import threading MUST be declared in your *.wsgi script. If not, you get an error ImportError: No module named threading from any module importing threading. I don't know why this is the case because it was determined by trial and error. Anything else I said about

Re: [modwsgi] ImportError: No module named threading

2012-10-29 Thread Graham Dumpleton
You aren't playing around with sys.path in the WSGI script file and mucking up what was in it to begin with? Try adding in debug which prints out sys.path in WSGI script file and then later where import of threading was failing. Graham On 29 October 2012 22:50, Gnarlodious gnarlodi...@gmail.com

Re: [modwsgi] ImportError: No module named threading

2012-10-29 Thread Gnarlodious
The two paths are identical at the *.wsgi script and also at the *.py script that crashes. -- Gnarlie On Monday, October 29, 2012 5:55:02 AM UTC-6, Graham Dumpleton wrote: You aren't playing around with sys.path in the WSGI script file and mucking up what was in it to begin with? Try

[modwsgi] ImportError: No module named threading

2012-10-28 Thread Gnarlodious
My webapp runs normally as a python script, but cannot import module threading when run under mod_wsgi. This problem started after I upgraded to Python 3.2.3 which evidently no longer allows concurrent connections to my SQLite database. Suddenly my module crashed with error: ProgrammingError:

Re: [modwsgi] ImportError: No module named threading

2012-10-28 Thread Graham Dumpleton
I would suspect the OS X Server.app mod_wsgi is compiled for Python 2.7 and not Python 3.2. You can't force that mod_wsgi.so to use Python 3.2, you would need to recompile mod_wsgi from source code against Python 3.2 if you wanted to use Python 3.2. Which Python version are you wanting to use and

Re: [modwsgi] ImportError: No module named threading

2012-10-28 Thread Gnarlodious
Default 10.8 Server.app invokes mod_wsgi at: /Applications/Server.app/Contents/ServerRoot/usr/libexec/apache2/mod_wsgi.so however mine is invoked like: LoadModule wsgi_module /usr/local/apache2/modules/mod_wsgi.so NOTE that the OSX updater overwrites the folder at /usr/libexec/apache2/ so

Re: [modwsgi] ImportError: No module named threading

2012-10-28 Thread Graham Dumpleton
On 29 October 2012 13:15, Gnarlodious gnarlodi...@gmail.com wrote: Default 10.8 Server.app invokes mod_wsgi at: /Applications/Server.app/Contents/ServerRoot/usr/libexec/apache2/mod_wsgi.so however mine is invoked like: LoadModule wsgi_module /usr/local/apache2/modules/mod_wsgi.so NOTE

Re: [modwsgi] ImportError: No module named threading

2012-10-28 Thread Gnarlodious
Solved: I removed processes=1 threads=1 from my config and the threading module imports normally. You may want to keep that in mind for future reference. The sqlite3 concurrency problem remains, however… but only in mod_wsgi. I get error: AttributeError: '_thread._local' object has no

Re: [modwsgi] ImportError: No module named threading

2012-10-28 Thread Graham Dumpleton
That is the wrong solution and should have made no difference. More likely it went away because you stopped and started Apache. When changing Apache modules doing just a 'restart' doesn't always work. Please do what I asked you to do with otool -L and post the results and also ensure you are