I opened an issue: https://github.com/web2py/web2py/issues/1733 
will be taken care of asap.

On Monday, 7 August 2017 19:08:38 UTC-5, Simon Riek wrote:
>
> Since updating from 2.14.6 to 2.15.2 (and also 2.15.3 released just 
> moments ago) I have some problems with the default ExportClasses in 
> SQLFORM.grid.
> I am using MSSQL as database.
> The grid displays just fine, only the export faild (to tsv and, in some 
> cases, to csv - I did not test others).
>
> I'll spare you the complete traceback and get directly to what I could 
> find by implementing my own ExportClass.
>
> At first I got a <type 'exceptions.AttributeError'>, the relevant 
> traceback was:
>
> File "C:\Users\riek\PycharmProjects\web2py\gluon\sqlhtml.py", line 3563, in 
> represented
>     row.append(record._extra[col])
>
> I didn't use any type _extra fields, meaning that the regex check in line 
> 3562 failed (self.rows.db._adapter.REGEX_TABLE_DOT_FIELD.match(col)).
>
> I then overwrote the "represented"-Function with my own, ignoring this 
> check and forcing the else-branch. 
>
> This lead to the following exception: <type 'exceptions.AttributeError'> 
> 'DAL' object has no attribute '"t_schule"'. So my tables and fields are 
> quoted and thus not found.
>
> I tried a solution I found somewhere else, setting entity_quoting=False in 
> my DAL-instance, didn't change anything.
>
> I then searched some more and found this bugfix: 
> https://github.com/web2py/web2py/issues/1542
> It appears that this fix quotes the tables and fields, no matter 
> if entity_quoting is enabled or not.
>
> I could solve my particular problem with an ugly hack, by removing the 
> quotes in the represent-function of my ExportClass (line 3565 in 
> sqlhtml.py: *(t, f) = col.replace('"','').split('.') * instead of *(t, f) 
> = col.split('.')) *
> I am wondering though if this is a bug or I am not properly understanding 
> how the quoting works.
>
>
>
>
>

-- 
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