Here is my code.

<code>
class MainHandler(webapp.RequestHandler):

  def get(self):
    path = os.path.join(os.path.dirname(__file__), 'templates/
main.html')
    self.response.out.write(template.render(path,
self.request.str_GET, True))

def main():
  application = webapp.WSGIApplication([(urllib.quote('/XXXXXX'),
MainHandler)],
                                       debug=os.environ
['SERVER_SOFTWARE'].startswith('Dev'))
  wsgiref.handlers.CGIHandler().run(application)


if __name__ == '__main__':
  main()

</code>

the '/XXXXXX' is a chinese string.

when I access the url http://localhost:8080/XXXXXX,
the error occurs sometime.

Thanks

On 12月10日, 午前1:07, Marzia Niccolai <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can you please provide the code that is running when you see this error? And
> some more information as to what kinds of requests are causing it?
>
> Thanks,
> Marzia
>
> On Tue, Dec 9, 2008 at 1:14 AM, giginim <[EMAIL PROTECTED]> wrote:
>
> > My app got an error:
>
> > ERROR    2008-12-09 09:03:56,780 dev_appserver.py] Exception
> > encountered handling request
> > Traceback (most recent call last):
> >  File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \dev_appserver.py", line 2443, in _HandleRequest
> >    base_env_dict=env_dict)
> >  File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \dev_appserver.py", line 353, in Dispatch
> >    base_env_dict=base_env_dict)
> >  File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \dev_appserver.py", line 1869, in Dispatch
> >    self._module_dict)
> >  File "C:\Program Files\Google\google_appengine\google\appengine\tools
> > \dev_appserver.py", line 1809, in ExecuteCGI
> >    sys.path[:] = before_path
> > UnboundLocalError: local variable 'before_path' referenced before
> > assignment
>
> > It occurs several times, but I can not reproduce it every time.
> > I think that it is caused by unicode url.
>
> > Can anyone help me?
>
> > Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to