[mod_python] IOError: [Errno 2] No such file or directory...(etc)

kevin at vap.org kevin at vap.org
Tue Aug 20 17:09:46 EST 2002


That sounds like a possibility, but it didn't help.  Here is some
more information:

- I changed the Apache service to logon with my username (which also
logs on to our Windows Domain).  No improvement.
- If I just return an HTML tag to have the browser open the graphic
(like <img src="z:\...jpg" />), then access works (probably since it
is under my user id via the browser application).
- I tried the code as a CGI called from Apache and I get the same
error (so I guess it doesn't have anything to do with modpython).


I guess I'll redirect this to an Apache group since it doesn't look
to be caused by modpython.

Any ideas are appreciated, though.

-Kevin



---- Original Message ----
From: grisha at modpython.org
To: kevin at vap.org, 
Subject: Re: [mod_python] IOError: [Errno 2] No such file or
directory...(etc)
Date: Tue, 20 Aug 2002 14:36:51 -0400 (EDT)

>
>Might it be that the Z: mapping doesn't exist for whatever user id 
>the
>apache service is running under?
>
>Grisha
>
>On Tue, 20 Aug 2002 kevin at vap.org wrote:
>
>> Okay, I know this has been discussed many times before, and I am
>> aware of the fix on the FAQ.  However, I have a few issues:
>>
>> 1) My error says "IOError" instead of the "OSError" that everyone
>> else has reported.
>> 2) using Python 2.2.1, Apache 1.3.26, Modpython 2.7.8, on WinXP
>> 3) Since the python patch for this was closed in Aug-2001, any idea
>> why it isn't in Python 2.2.1, released Apr-2002?
>> 4) I went ahead & patched pythonrun.c and recompiled my Python 
>2.2.1.
>> The FAQ says to rebuild mod_python, but I don't know how to on
>> Windows, and I suspect 2.7.8 might already have the fix?.
>>
>> Can anyone assist with rebuilding mod_python on Windows?  What 
>effect
>> would that have since it doesn't include pythonrun.c in the
>> mod_python build?  Any other ideas regarding the problem? (output 
>is
>> below)
>>
>> -Kevin
>>
>> **** output ****
>>
>> Mod_python error: "PythonHandler mod_python.publisher"
>>
>> Traceback (most recent call last):
>>
>>   File "C:\...\python\Lib\mod_python\apache.py", line 193, in 
>Dispatch
>>     result = object(req)
>>
>>   File "C:\...\python\Lib\mod_python\publisher.py", line 171, in
>> handler
>>     result = apply(object, (), args)
>>
>>   File "c:/.../mywww\imgsvr.py", line 77, in get
>>     fd = open( filenm, "rb" )
>>
>> IOError: [Errno 2] No such file or directory:
>> 'z:\\FILES\\up\\oak_20020730\\01638764.BCK.jpg'
>>
>> **** end of output ****
>>
>> Notes:
>> I'm trying to access a file on my local network.  I have tried
>> different drive letters on my local network (& UNC paths instead of
>> drive letters).  The only time it works is when I use the local 
>"C:"
>> for the path.  Even if I do a "subst e: c:\" and try that (E:\...),
>> it fails.  I even tried messing with <Directory> entries in Apache 
>to
>> no avail.
>>
>> And yes, the code works fine when outside of Apache/Mod_python.





More information about the Mod_python mailing list