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 what other mod_wsgi
configuration directives have you set in the Apache configuration?

Have you use WSGIPythonHome, WSGIPythonPath or python-path options to
WSGIDaemonProcess or otherwise tried to override where mod_wsgi gets
it Python modules from?

Graham

On 29 October 2012 05:09, Gnarlodious <gnarlodi...@gmail.com> wrote:
> 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: SQLite objects created in a thread can only be used in
> that same thread.The object was created in thread id * and this is thread id
> *
>
> This is a disaster because the only way to recover is to restart Apache,
> surely a Python failing that needs to be fixed.
>
> I attempted to isolate sqlite3 objects with this method:
>
> import threading
> self.local = threading.local() # Thread local storage for db handles
>
> but I am not sure this is the right solution.
>
> This is OSX 10.8 Server.app running mod_wsgi 3.4 under directive:
>
> WSGIDaemonProcess Sectrum python-path=[path] processes=1 threads=1
> display-name=Sectrum
>
> I do have another simpler wsgi script that imports threading without
> complaining, so I suspect the configuration in the previous line overrides
> the default and whacks my webapp. Can anyone explain this? And if possible a
> solution to the sqlite3 concurrency problem?
>
> -- Gnarlie
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/wirjTAO-PFkJ.
> To post to this group, send email to modwsgi@googlegroups.com.
> To unsubscribe from this group, send email to
> modwsgi+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to modwsgi@googlegroups.com.
To unsubscribe from this group, send email to 
modwsgi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to