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

Gregory (Grisha) Trubetskoy grisha at modpython.org
Tue Aug 20 14:36:51 EST 2002


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.
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list