I cannot reproduce, and I can't think of anything web2py would be doing 
that would be relevant, as this is a standard Python exception. I was 
thinking maybe you switched to Python 3, but in that case, I would expect a 
more specific error message indicating the parentheses are missing (unless 
you're using an older version of Python 3 and the message is different in 
that version).

Anthony

On Monday, October 23, 2017 at 6:38:27 PM UTC-4, Dave S wrote:
>
> In  my 2.15.x testing, I've been concentrating on the https interface, but 
> I now tried to do a -M -S that would queue up a Scheduler task.  And I ran 
> into an unexpected problem with syntax errors on print statements.
>
>    if when:
>       print "ri_s: when " + when
>
> Even when I shorten the line to remove the concatenation, I get a syntax 
> error:
>
> Traceback (most recent call last):
>   File "web2py.py", line 33, in <module>
>     gluon.widget.start(cron=True)
>   File "/home/ec2-user/web2py/web2py-2.15.4/web2py/gluon/widget.py", line 
> 1152, in start
>     cronjob=options.cronjob)
>   File "/home/ec2-user/web2py/web2py-2.15.4/web2py/gluon/shell.py", line 
> 258, in run
>     execfile(pyfile, _env)
>   File "applications/updater/controllers/default.py", line 140
>     print "ri_s: when "
>                       ^
> SyntaxError: invalid syntax
>
> I tried changing the variable name to "pwhen" in case this was an 
> if-statement/keyword issue, but still "invalid syntax".
>
> As you might guess, default.py loads fine for https requests, and this 
> code loads fine with -S under 2.14.6, so I'm not sure what's going on here.
>
> /dps
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to