On Sep 9, 2010, at 9:07 PM, Miguel Goncalves wrote:
> in my case I was using the following routes.py
What I'm looking for is the file itself (preferably zipped). I'm wondering if
there might be something in it that isn't surviving a paste into email, because
I don' t seen anything in line 3 that would cause a syntax error. (Notice that
this is a Python syntax error, not a complaint from the rewrite code.)
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
> default_application = 'reviewround' # ordinarily set in base routes.py
> default_controller = 'default' # ordinarily set in app-specific
> routes.py
> default_function = 'index'
>
>
> routes_in = ( ('/', '/reviewround/default/index'),)
> routes_out = ( ('/reviewround/default/index', '/'),)
>
> -Miguel
>
>
> On Thu, Sep 9, 2010 at 9:28 AM, Jonathan Lundell <[email protected]> wrote:
> On Sep 9, 2010, at 9:17 AM, mdipierro wrote:
> >
> > try:
> > import rocket
> > except:
> > logging.warn('unable to import Rocket')
> >
> > True. This is supposed to fail on GAE. I will change it. No need to
> > try the import and issue a warning on GAE.
>
> ...which leaves the mystery of the routes syntax error.
>
> I'd try it with the first three lines (two comments and blank line) removed,
> and see what happens.
>
> I'd also carefully check routes.py for invisible garbage characters, perhaps
> from some word processor. Word's idea of a non-breaking space, for example.
>
> If possible, zip the routes.py that you're uploading to GAE, and send me a
> copy.
>
> >
> >
> >
> > On Sep 9, 9:57 am, Jonathan Lundell <[email protected]> wrote:
> >> On Sep 9, 2010, at 7:49 AM, mdipierro wrote:
> >>
> >>
> >>
> >>> gaehanlder.py does not import Rocket.
> >>
> >> main imports Rocket
> >>
> >>> Is it possible gaehandler.py or
> >>> app.yaml were modified?
> >>
> >>> On Sep 9, 9:40 am, Jonathan Lundell <[email protected]> wrote:
> >>>> On Sep 9, 2010, at 6:27 AM, mdipierro wrote:
> >>
> >>>>> I do not understand where "unable to import Rocket" comes from.
> >>
> >>>> That's a strange error. Also, the syntax error on routes.py is on line
> >>>> 3, which is empty; there's no code until line 4.
> >>
> >>>> My advice is to resolve the first error (Rocket) before worrying about
> >>>> the routes error.
> >>
> >>>>> On Sep 9, 8:03 am, Richard <[email protected]> wrote:
> >>>>>> I am using the following simple routes.py and find it works fine on
> >>>>>> GAE with latest trunk:
> >>
> >>>>>> routes_in = (
> >>>>>> ('/', '/init/default/index'),
> >>>>>> ('/topics', '/init/topics/index'),
> >>>>>> )
> >>>>>> routes_out = [(second, first) for (first, second) in routes_in]
> >>
> >>>>>> On Sep 9, 9:49 pm, mdipierro <[email protected]> wrote:
> >>
> >>>>>>> i cannot reproduce this problem. Can you send me your routes?
> >>
> >>>>>>> On Sep 7, 1:28 am, Miguel Goncalves <[email protected]> wrote:
> >>
> >>>>>>>> Hi
> >>
> >>>>>>>> I guess this bug has not been fixed yet?
> >>
> >>>>>>>> I am getting the following error:
> >>
> >>>>>>>> unable to import Rocket
> >>>>>>>> Your routes.py has a syntax error Please fix it before you restart
> >>>>>>>> web2py
> >>>>>>>> Traceback (most recent call last):
> >>>>>>>> File
> >>>>>>>> "/base/data/home/apps/reviewround/1.344628390884008259/gluon/rewrite.py",
> >>>>>>>> line 106, in load
> >>>>>>>> exec routesfp.read() in symbols
> >>>>>>>> File "<string>", line 3
> >>
> >>>>>>>> ^
> >>>>>>>> SyntaxError: invalid syntax
> >>
> >>>>>>>> <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 3)
> >>>>>>>> Traceback (most recent call last):
> >>>>>>>> File
> >>>>>>>> "/base/data/home/apps/reviewround/1.344628390884008259/gaehandler.py",
> >>>>>>>> line 52, in <module>
> >>>>>>>> import gluon.main
> >>>>>>>> File
> >>>>>>>> "/base/data/home/apps/reviewround/1.344628390884008259/gluon/main.py",
> >>>>>>>> line 66, in <module>
> >>>>>>>> rewrite.load()
> >>>>>>>> File
> >>>>>>>> "/base/data/home/apps/reviewround/1.344628390884008259/gluon/rewrite.py",
> >>>>>>>> line 114, in load
> >>>>>>>> raise e
> >>>>>>>> <type 'exceptions.SyntaxError'>: invalid syntax (<string>, line 3)
> >>
> >>>>>>>> The routes.py looks like :
> >>>>>>>> #!/usr/bin/python
> >>>>>>>> # -*- coding: utf-8 -*-
> >>
> >>>>>>>> default_application = 'reviewround' # ordinarily set in base
> >>>>>>>> routes.py
> >>>>>>>> default_controller = 'default' # ordinarily set in
> >>>>>>>> app-specific
> >>>>>>>> routes.py
> >>>>>>>> default_function = 'index'
> >>
> >>>>>>>> routes_in = ( ('/', '/reviewround/default/index'),)
> >>>>>>>> routes_out = ( ('/reviewround/default/index', '/'),)
> >>
> >>>>>>>> thanks
> >>>>>>>> Miguel
> >>
> >>
>
>
>