On Jan 16, 2008 7:43 PM, David <[EMAIL PROTECTED]> wrote:
>
> The article I've been working from is:
> http://wiki.pylonshq.com/display/pylonscookbook/mod_wsgi+and+workingenv.py#install-activate-workingenv-py
>
> It seems to be the simplest route, though I can't get it to work
> properly. Through the step where I verify mod_wsgi works, which it
> does, everything is OK. When I move on to the startup script and the
> activate_workingenv.py script, I start getting a 500 error.
>
> I've pasted the error log lines from Apache below. I've tried to
> isolate the issue but can't seem to peg the exact problem. It seems
> like there is an issue importing from Paste . I do have Paste and
> PasteDeploy installed, verified with easy_setup - and I can run Pylons
> apps w/ Paste from command line anyway. Unless I'm reading it wrong,
> it seems like the import of pkg_resources is where the trouble starts.
> pkg_resources is part of setuptools which I do have installed.
>
>
>
> [Wed Jan 16 21:19:10 2008] [error] [client 127.0.0.1] mod_wsgi
> (pid=5224): Target WSGI script 'C:/Program Files/Python25/Scripts/
> helloworld/wsgi/myapp.wsgi' cannot be loaded as Python module.

There's a problem with virtualenv's on Windows that have a space in
the path ("Program Files").  I don't know if workingenv.py has the
same problem.

Did you really create your workingenv at "C:\Program Files\Python25"?
Where is your original Python installation then?

Also, the actual error may not be where the traceback indicates,
either because of interference from mod_wsgi, or because Paste does a
dynamic import that can't be effectively represented in the traceback.
 (E.g., "<module>", or the fact that it's not clear that 'path_hook'
is really an alias for 'zipimporter' as the traceback implies -- it
may be from some later code or a "C" extension.)


> [Wed Jan 16 21:19:10 2008] [error] [client 127.0.0.1]   File "c:\
> \program files\\python25\\lib\\site-packages\\pastescript-1.3.6-
> py2.5.egg\\paste\\__init__.py", line 4, in <module>
> [Wed Jan 16 21:19:10 2008] [error] [client 127.0.0.1]     import
> pkg_resources

> [Wed Jan 16 21:19:10 2008] [error] [client 127.0.0.1]   File "C:\
> \Program Files\\Python25\\lib\\pkgutil.py", line 376, in get_importer
> [Wed Jan 16 21:19:10 2008] [error] [client 127.0.0.1]     importer =
> path_hook(path_item)
> [Wed Jan 16 21:19:10 2008] [error] [client 127.0.0.1] TypeError:
> zipimporter() argument 1 must be string, not module


-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to