[mod_python] Getting error as The system cannot find the file specified

Graham Dumpleton graham.dumpleton at gmail.com
Tue Mar 31 00:21:09 EDT 2009


2009/3/31 rahul <rahul.warhekar at edisphere.com>:
> Hi graham,
>
> I have done what you suggested but was not successful.
> My code in index.psp is
>
>
> <%
> import os
> from mod_python import Session
> from mod_python import util
> from mod_python import psp
> _REQUEST = util.FieldStorage(req)
> view = "reports"
> user =''
> session.load()
>
> if view=='reports':
>
> util.redirect(req,"modules/reports/index.psp?hidval=f&showcnt=25&user=%s"%se
> ssion['user'])

This isn't what I told you to use.

Having a path that doesn't start with a '/' will not ever work either.

> else:
>        req.write("Invalid User")
>
> %>
>
> And full error message is

That is not the full message.

Post the complete Python traceback giving lines numbers, files etc.

Graham

> Mod_python Error: mod python stuff
> And in last it gives
>
> File C:/wamp/www/edi/modules/reports/index.psp
> WindowsError [Errno2]: The system cannot find the file specified.
>
>
> According to me it seems that my mod_python code is not getting executed or
> either it is not registered.
>
> Any suggestion on this will be greatly appreciated.
>
> Thanks,
>
> Rahul
>
>
> -----Original Message-----
> From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com]
> Sent: Monday, March 30, 2009 11:33 AM
> To: rahul.warhekar at edisphere.com
> Cc: Tim Valenta; mod_python at modpython.org
> Subject: Re: [mod_python] Getting error as The system cannot find the file
> specified
>
> 2009/3/30  <rahul.warhekar at edisphere.com>:
>> ok, sorry for that,
>>
>> I am using util.redirect(req,"/edi/modules/index.psp")
>
> Technically the second argument, as I said before, must be a full URI,
> including 'http://host'. Supplying a path only as you have may or may
> not work depending on the browser.
>
> For starters, therefore change it to:
>
>  util.redirect(req,req.construct_url("/edi/modules/index.psp"))
>
> and see if that works.
>
> And that you are using a virtual machine is likely got nothing to do with
> it.
>
> Graham
>
>> my document root dir is c:\wamp\www
>>
>> Thanks
>> Rahul
>>
>>> You did not answer my question.
>>>
>>> What is your code passing as the second argument to:
>>>
>>>   util.redirect
>>>
>>> function call?
>>>
>>> I cannot help if you do not answer the question. You are already
>>> stressing the abilities of the crystal ball as it is by not supplying
>>> enough actual useful information.
>>>
>>> Graham
>>>
>>> 2009/3/30  <rahul.warhekar at edisphere.com>:
>>>> hello all
>>>>
>>>> I am using virtual machine. On it we are having wamp server 2.6 running.
>>>>
>>>> any suggestion for this situation.
>>>>
>>>> Any help will be greatly appreciated.
>>>>
>>>> Thanks
>>>> rahul
>>>>
>>>>
>>>>
>>>>> What is "path to file"?
>>>>>
>>>>> It must be a properly formed URI, ie., 'http://host/.....'. You should
>>>>> not be just supplying a local URL without the 'http://host' bit.
>>>>>
>>>>> Graham
>>>>>
>>>>> 2009/3/30 rahul <rahul.warhekar at edisphere.com>:
>>>>>> No I get error while using util.redirect(req,”path to file”)
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>> rahul
>>>>>>
>>>>>>
>>>>>>
>>>>>> ________________________________
>>>>>>
>>>>>> From: Tim Valenta [mailto:tonightslastsong at gmail.com]
>>>>>> Sent: Saturday, March 28, 2009 12:08 AM
>>>>>> To: rahul
>>>>>> Cc: Graham Dumpleton; mod_python at modpython.org
>>>>>> Subject: Re: [mod_python] Getting error as The system cannot find the
>>>>>> file
>>>>>> specified
>>>>>>
>>>>>>
>>>>>>
>>>>>> When do you get the error?  When you start Apache?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Tim
>>>>>>
>>>>>> On Fri, Mar 27, 2009 at 6:25 AM, rahul <rahul.warhekar at edisphere.com>
>>>>>> wrote:
>>>>>>
>>>>>> Hello all,
>>>>>>
>>>>>> I am using my mod_python for my web application.
>>>>>>
>>>>>> And I am getting "WindowsError: [Errno 2] The system cannot find the
>>>>>> file
>>>>>> specified" error.
>>>>>>
>>>>>> Any quick help reg this will be greatly appreciated and this is really
>>>>>> urgent.
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Rahul
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mod_python mailing list
>>>>>> Mod_python at modpython.org
>>>>>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>>>>>
>>>>>>
>>>>>> --
>>>>>> "Python is the unholy bastard step-child between Ruby and PHP."
>>>>>> "I'd let an ipod blow up on my leg for $150,000."
>>>>>> "but Ben and Jerry do make a lovely couple."
>>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>
>



More information about the Mod_python mailing list