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 that the OSX updater overwrites the folder at /usr/libexec/apache2/ so
> don't put your custom stuff there!
> The mod_wsgi is compiled using directive:
>
> --enable-framework=/usr/local/python-3.2.3/frameworks/Python.framework/Versions/3.2

The configure script for mod_wsgi doesn't accept any such option.

You should be using --with-python to specify the path to the python3.2
executable.

It is possible that you may have to also supply the
--disable-framework option to configure script to workaround a problem
that comes up for some people whereby it doesn't correctly compile in
the right Python framework to use.

As per:

http://code.google.com/p/modwsgi/wiki/CheckingYourInstallation#Python_Shared_Library

use 'otool -L' on .libs/mod_wsgi.so after running make to determine
what Python framework it is picking up.

Post the results of that.

Graham


> The "threading" module is located at the same place as other modules that
> all work as expected:
>
> /usr/local/python-3.2.3/frameworks/Python.framework/Versions/3.2/lib/python3.2/threading.py
>
>
> Is there some diagnostic I can plug in to get mod_wsgi to report why it
> can't import threading? Like I said, I was able to import threading in the
> Server.app default wsgi webapp with no problem, so it must be my daemon
> config. I will experiment with other setting and see what happens.
>
>
> Otherwise, if there were a way to get around the sqlite3 problem I would
> that solution. Maybe I should ask on the Python board.
>
>
> -- Gnarlie
>
>
>
> On Sunday, October 28, 2012 2:11:32 PM UTC-6, Graham Dumpleton wrote:
>>
>> 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 <gnarl...@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 mod...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > modwsgi+u...@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 view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/N4BkKm5iJxwJ.
>
> 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