my SQLFORM.grid includes a virtual field in fields[]. Displays perfectly in
the grid, but CSV button using (ExporterCSV, ...) fails (I'm using web2py
2.18.5 Python 2.7):
Ticket ID
127.0.0.1.2019-04-24.11-28-41.edaaa1f3-2035-4402-bc95-4ff9a74097fb
<type 'exceptions.KeyError'> 'Name' Version
web2py™ Version 2.18.5-stable+timestamp.2019.04.08.04.22.03 Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
Traceback (most recent call last):
File "C:\Users\David\Google Drive\My
Documents\OxCamNE.3.0\gluon\restricted.py", line 219, in restricted
exec(ccode, environment)
File "C:\Users\David\Google Drive\My
Documents\OxCamNE.3.0\applications\init\controllers/default.py", line 1881, in
<module>
File "C:\Users\David\Google Drive\My Documents\OxCamNE.3.0\gluon\globals.py",
line 421, in <lambda>
self._caller = lambda f: f()
File "C:\Users\David\Google Drive\My
Documents\OxCamNE.3.0\applications\init\models\db.py", line 110, in wrapped_f
return f(*args)
File "C:\Users\David\Google Drive\My
Documents\OxCamNE.3.0\applications\init\controllers/default.py", line 130, in
memberaffiliations
paginate=25, maxtextlength=150, user_signature = False, represent_none = '')
File "C:\Users\David\Google Drive\My Documents\OxCamNE.3.0\gluon\sqlhtml.py",
line 2724, in grid
raise HTTP(200, oExp.export(), **response.headers)
File "C:\Users\David\Google Drive\My Documents\OxCamNE.3.0\gluon\sqlhtml.py",
line 3776, in export
self.rows.export_to_csv_file(s, represent=True)
File "C:\Users\David\Google Drive\My
Documents\OxCamNE.3.0\gluon\packages\dal\pydal\objects.py", line 2809, in
export_to_csv_file
value = record[f]
File "C:\Users\David\Google Drive\My
Documents\OxCamNE.3.0\gluon\packages\dal\pydal\objects.py", line 103, in
__getitem__
raise KeyError(key)
KeyError: 'Name'
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.