Django and IIS

122 views
Skip to first unread message

CrabbyPete

unread,
Jul 29, 2009, 11:23:38 AM7/29/09
to PyISAPIe
I just tryed to install pyisapie, but I keep getting the errors
below. Can anyone tell me what I did wrong.

Internal Server Error
An error occurred processing this request.

--------------------------------------------------------------------------------

Could not initialize interpreter

ImportError: No module named Isapi



Additional Information

--------------------------------------------------------------------------------


-- Module Search Path --

C:\pyisapie
C:\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg
C:\Python26\lib\site-packages\elixir-0.6.1-py2.6.egg
C:\Python26\lib\site-packages\authkit-0.4.3-py2.6.egg
C:\Python26\lib\site-packages\migrate-0.2.2-py2.6.egg
C:\Python26\lib\site-packages\pil-1.1.7a2-py2.6-win32.egg
C:\Python26\lib\site-packages\pylint-0.18.0-py2.6.egg
C:\Python26\lib\site-packages\logilab_astng-0.19.0-py2.6.egg
C:\Python26\lib\site-packages\logilab_common-0.39.0-py2.6.egg
C:\Python26\lib\site-packages\flup-1.0.1-py2.6.egg
C:\Python26\lib\site-packages\isapi_wsgi-0.4-py2.6-win32.egg
C:\Python26\lib\site-packages\django_messages-0.4.0-py2.6.egg
C:\Python26\lib\site-packages\django_imagekit-0.2-py2.6.egg
C:\WINDOWS\system32\python26.zip
C:\Python26\Lib
C:\Python26\DLLs
C:\Python26\Lib\lib-tk
c:\windows\system32\inetsrv
C:\Python26
C:\Python26\lib\site-packages
C:\Python26\lib\site-packages\PIL
C:\Python26\lib\site-packages\win32
C:\Python26\lib\site-packages\win32\lib
C:\Python26\lib\site-packages\Pythonwin


-- Other Path Info --

Current Directory = 'C:\pyisapie'
Python Home = '<Auto>'
sys.executable = 'C:\pyisapie\PyISAPIe.dll'
sys.exec_prefix = 'C:\Python26'
sys.prefix = 'C:\Python26'




Phillip

unread,
Jul 29, 2009, 2:21:02 PM7/29/09
to PyISAPIe
Where in your path do you have the Http package?

I believe it's finding the Http package, but maybe the wrong one that
doesn't have an Isapi.py module. I'm a little baffled, it should say
"No module named Http.Isapi" - either way, make sure you have that
Http folder somewhere on your import path. As you can see, the folder
containing the DLL has precedence over others by default.

- Phillip

CrabbyPete

unread,
Jul 29, 2009, 2:58:09 PM7/29/09
to PyISAPIe
The Http directory is in C:\Python26\Lib\site-packages\

I see that it is not looking in that directory. What do I do to make
it look there. I copied from the directory I created by unzipping
everything into C:\pysapie

On Jul 29, 2:21 pm, Phillip <phillip.sit...@gmail.com> wrote:
> Where in your path do you have the Http package?
>
> I believe it's finding the Http package, but maybe the wrong one that
> doesn't have an Isapi.py module. I'm a little baffled, it should say
> "No module named Http.Isapi" - either way, make sure you have that
> Http folder somewhere on your import path. As you can see, the folder
> containing the DLL has precedence over others by default.
>
>  - Phillip
>
> On Jul 29, 8:23 am, CrabbyPete <pete.do...@gmail.com> wrote:
>
>
>
> > I just tryed to install pyisapie, but I keep getting the  errors
> > below. Can anyone tell me what I did wrong.
>
> > Internal Server Error
> > An error occurred processing this request.
>
> > ---------------------------------------------------------------------------­-----
>
> > Could not initialize interpreter
>
> > ImportError: No module named Isapi
>
> > Additional Information
>
> > ---------------------------------------------------------------------------­-----
> > sys.prefix        = 'C:\Python26'- Hide quoted text -
>
> - Show quoted text -

Phillip

unread,
Aug 3, 2009, 2:24:48 PM8/3/09
to PyISAPIe
> The Http directory is in C:\Python26\Lib\site-packages\
> I see that it is not looking in that directory. What do I do to make
> it look there. I copied from the directory I created by unzipping
> everything into C:\pysapie

According to your path listing in the error, it is looking in that
directory (it's listed after C:\Python26\).

Try this: from your command line, start Python and run the following
commands:

>>> import Http
>>> Http.__path__, Http.__file__

And see what the output is. Additionally, you can try "from Http
import Isapi" - if you see an error that PyISAPIe can't be loaded, you
at least know that the correct package is on the import path (PyISAPIe
can only be imported from within the server process).

My best guess is that you have a different package named Http
somewhere that gets imported first.

Spot Burner

unread,
Aug 3, 2009, 9:46:48 PM8/3/09
to PyISAPIe
Phillip,

Thank you very much. I think I figured it out. When I did from Http
import Isapi

There is an error in my Isapi file

Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python26\lib\site-packages\Http\Isapi.py", line 43
sys.path.append(r'e:\spot\')
^
SyntaxError: EOL while scanning string literal

Phillip

unread,
Aug 3, 2009, 9:51:24 PM8/3/09
to PyISAPIe
That's interesting that the error didn't show up in the traceback- I
think that's something I can probably make sure happens so that it
isn't so mysterious next time :)

Phillip

unread,
Aug 3, 2009, 9:54:43 PM8/3/09
to PyISAPIe
Actually, I just looked at the code and it doesn't mess with the
error... I'll look into it some more later but that is weird that the
syntax error wouldn't show up, and a pain for debugging!

CrabbyPete

unread,
Aug 3, 2009, 10:28:11 PM8/3/09
to PyISAPIe
I just tried it and I still get the error. I ran " from Http import
Isapi " from python and I get this:

Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python26\lib\site-packages\Http\Isapi.py", line 37, in
<module>
from Http.WSGI import RunWSGI
File "C:\Python26\lib\site-packages\Http\WSGI.py", line 18, in
<module>
from PyISAPIe import Read, Write, Env, Header
ImportError: No module named PyISAPIe
Reply all
Reply to author
Forward
0 new messages