Error accessing app edit

34 views
Skip to first unread message

Maurice Waka

unread,
Mar 17, 2019, 11:01:07 AM3/17/19
to web2py-users
When clicking on the edit button for my app, I get this error:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Traceback (most recent call last):
File "/home/mauricewaka/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/home/mauricewaka/web2py/applications/admin/controllers/default.py", line 2012, in <module>
File "/home/mauricewaka/web2py/gluon/globals.py", line 421, in <lambda>
self._caller = lambda f: f()
File "/home/mauricewaka/web2py/applications/admin/controllers/default.py", line 1130, in design
items = find_exposed_functions(data)
File "/home/mauricewaka/web2py/gluon/compileapp.py", line 520, in find_exposed_functions
parsed = ast.parse(data)
File "/usr/lib/python3.6/ast.py", line 35, in parse
return compile(source, filename, mode, PyCF_ONLY_AST)
File "<unknown>", line 490
_onclick="jQuery('#name').val('%s')" % k,
^
SyntaxError: invalid syntax

This is after upgrading to the new web2py 2.18.4

Regards

Massimo Di Pierro

unread,
Mar 17, 2019, 10:49:17 PM3/17/19
to web2py-users
This says you are using python 3. Is your app build for python 3 or python 2?

Lovedie JC

unread,
Mar 17, 2019, 11:55:59 PM3/17/19
to web...@googlegroups.com
Python 3.
I moved to python 3
Regards 

--
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+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Massimo Di Pierro

unread,
Mar 18, 2019, 1:35:41 AM3/18/19
to web2py-users
can you provide a minimal controller default.py so we can reproduce and fix it?
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.

Leonel Câmara

unread,
Mar 18, 2019, 11:08:19 AM3/18/19
to web2py-users
This was due to changes I made to the way web2py discovers exposed functions in a controller file. It uses the python parser so it has a problem with syntax errors. I made a pull request that teaches the admin to deal with them:

Maurice Waka

unread,
Mar 19, 2019, 3:22:42 PM3/19/19
to web...@googlegroups.com
Thanks
I'll follow up 

On Mon, 18 Mar 2019, 18:08 Leonel Câmara <leonel...@gmail.com> wrote:
This was due to changes I made to the way web2py discovers exposed functions in a controller file. It uses the python parser so it has a problem with syntax errors. I made a pull request that teaches the admin to deal with them:

--
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/YnZ49zuE0Ic/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages