Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dict values error in python 3. Generic.html. with fix #2126

Open
Eddiedigits opened this issue Mar 3, 2019 · 1 comment
Open

dict values error in python 3. Generic.html. with fix #2126

Eddiedigits opened this issue Mar 3, 2019 · 1 comment

Comments

@Eddiedigits
Copy link

As python 3 doesn't return a list for dict.keys() and .values() methods. Generic.html throws:
TypeError: 'dict_values' object does not support indexing

Caused by line 10 of generic.html. Can be fixed by wrapping the method call in a list() function.
{{=BEAUTIFY(list(response._vars.values())[0])}}

Python 3.7
Web2py 2.17

@leonelcamara
Copy link
Collaborator

This is already fixed in trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants