It works!

I am using Windows XP. I converted the routes.py to UNIX format
(notepad++) and it works.

Thanks to everyone that replied.

And of course, web2py rocks.

On Aug 24, 6:04 am, mdipierro <mdipie...@cs.depaul.edu> wrote:
> I cannot reproduce this error. Perhaps there is some strange character
> in there. Try delete the file and rewrite it. If it still does not
> work, email me your routes.py
>
> On Aug 23, 6:35 am, Prabhu <prabhu.sen...@gmail.com> wrote:
>
> > Massimo, Thanks for the reply.
>
> > Even after adding the commas, I get the same error.
>
> > If I say,
>
> > routes_out = (('/ccweb/default/$a', '/cc/$a'),)
> > routes_in = (('.*:/cc/$a','/ccweb/default/$a'),)
>
> > It throws an exception.
>
> > If I say,
>
> > routes_out = (('/ccweb/default/$a', '/cc/$a'),)
> > or
> > routes_in = (('.*:/cc/$a','/ccweb/default/$a'),)
>
> > It works as expected.
>
> > The weird part is,
>
> > routes_out = (('/ccweb/default/$a', '/cc/$a'),)
> > #routes_in = (('.*:/cc/$a','/ccweb/default/$a'),)
>
> > throws an exception.
>
> > The exception,
>
> > no file locking
> > no sqlite3 or pysqlite2.dbapi2 driver
> > no MySQLdb driver
> > no psycopg2 driver
> > no cx_Oracle driver
> > no MSSQL/DB2 driver
> > no kinterbasdb driver
> > no informixdb driver
> > no zxJDBC driver
> > unable to import dbhash
> > Your routes.py has a syntax error. Please fix it before you restart
> > web2py
> > <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 1)
> > Traceback (most recent call last):
> >   File "/base/data/home/apps/myapp/1.335820055527865939/
> > gaehandler.py", line 26, in <module>
> >     import gluon.main
> >   File "/base/data/home/apps/myapp/1.335820055527865939/gluon/
> > main.py", line 39, in <module>
> >     from globals import Request, Response, Session
> >   File "/base/data/home/apps/myapp/1.335820055527865939/gluon/
> > globals.py", line 18, in <module>
> >     from compileapp import run_view_in
> >   File "/base/data/home/apps/myapp/1.335820055527865939/gluon/
> > compileapp.py", line 43, in <module>
> >     from rewrite import error_message_custom
> >   File "/base/data/home/apps/myapp/1.335820055527865939/gluon/
> > rewrite.py", line 31, in <module>
> >     raise e
> > <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 1)
>
> > Any help is appreciated.
>
> > Thanks.
>
> > Prabhu
>
> > On Aug 23, 6:46 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > > routes_in = (('/cc/$a','/ccweb/default/$a'),)
> > > routes_out = (('/ccweb/default/$a', '/cc/$a'),)
>
> > > the '.*:' is not necessary. The key missing ingredient is the ','
>
> > > Massimo
>
> > > On Aug 22, 1:54 am, Prabhu <prabhu.sen...@gmail.com> wrote:
>
> > > > Thanks Victor and Yarko.
>
> > > > It works if I specify routes_in = (('.*:/cc/$a','/ccweb/default/$a'))
> > > > or
> > > > routes_out = (('/ccweb/default/$a', '/cc/$a'))
>
> > > > If I say
>
> > > > routes_in = (('.*:/cc/$a','/ccweb/default/$a'))
> > > > routes_out = (('/ccweb/default/$a', '/cc/$a'))
>
> > > > in routes.py, I still get the syntax error. Why am I not able to
> > > > specify both? This looks like a very dumb mistake I am making. Any
> > > > ideas?
>
> > > > Prabhu
>
> > > > On Aug 22, 9:02 am, Yarko Tymciurak <yark...@gmail.com> wrote:
>
> > > > > you might find this discussiont helpful:
>
> > > > >http://groups.google.com/group/web2py/msg/abb56704cda162a0
>
> > > > > On Fri, Aug 21, 2009 at 5:17 PM, Victor <victor.akuj...@gmail.com> 
> > > > > wrote:
>
> > > > > > your line should be routes_in = (('.*:/testme','/myapp/default/
> > > > > > index'))  dont forget to add an $ at the end if all you want is /
> > > > > > testme
>
> > > > > > On Aug 21, 10:41 pm, Prabhu <prabhu.sen...@gmail.com> wrote:
> > > > > > > Hi,
>
> > > > > > > Newbie to web2py here. My routes.py reads,
>
> > > > > > > #!/usr/bin/env python
> > > > > > > # -*- coding: utf-8 -*-
>
> > > > > > > routes_in = (('/testme','/myapp/default/index'),)
>
> > > > > > > routes_out = (('/myapp/default/index', '/test'),)
>
> > > > > > >http://127.0.0.1:8000/testmeworks. When I upload web2py to GAE, I 
> > > > > > >get
> > > > > > > the following error
>
> > > > > > > Your routes.py has a syntax error. Please fix it before you 
> > > > > > > restart
> > > > > > > web2py
> > > > > > > <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 3)
> > > > > > > Traceback (most recent call last):
> > > > > > >   File "/base/data/home/apps/myapp/1.335783148456469963/
> > > > > > > gaehandler.py", line 26, in <module>
> > > > > > >     import gluon.main
> > > > > > >   File "/base/data/home/apps/myapp/1.335783148456469963/gluon/
> > > > > > > main.py", line 39, in <module>
> > > > > > >     from globals import Request, Response, Session
> > > > > > >   File "/base/data/home/apps/myapp/1.335783148456469963/gluon/
> > > > > > > globals.py", line 18, in <module>
> > > > > > >     from compileapp import run_view_in
> > > > > > >   File "/base/data/home/apps/myapp/1.335783148456469963/gluon/
> > > > > > > compileapp.py", line 43, in <module>
> > > > > > >     from rewrite import error_message_custom
> > > > > > >   File "/base/data/home/apps/myapp/1.335783148456469963/gluon/
> > > > > > > rewrite.py", line 31, in <module>
> > > > > > >     raise e
> > > > > > > <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 3)
>
> > > > > > > This happens when there is a routes.py file (even if all the 
> > > > > > > lines are
> > > > > > > commented).
>
> > > > > > > Is this the correct way to do URL Rewrite? The Reddish application
> > > > > > > (web2py.appspot.com) does this correctly. How? The source code (of
> > > > > > > Reddish) has the application only.
>
> > > > > > > Can someone please clarify this?
>
> > > > > > > Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to