Fixed in trunk.
On Wednesday, 4 December 2013 16:51:31 UTC-6, P T wrote:
>
> I am posting here the solution I received by e-mail. This resolved this
> issue.
>
> I guess I missed the quotes for the _class dictionary key, so replacing
> this line
>
> **{_class: "%s_fieldnames" %
>
> with this
>
> **{"_class": "%s_fieldnames" %
>
> in gluon/contrib/spreadsheet.py should avoid the error
>
> Thanks,
> PT
>
>
> On Tuesday, December 3, 2013 11:34:33 PM UTC-6, P T wrote:
>>
>> I am using Web2py 2.8.2 source and installed installed the app
>> web2py.app.dataspreadsheets.w2p from
>> https://code.google.com/p/web2py/issues/detail?id=860#c1 and getting the
>> following errors:
>>
>> 1) Cannot import module 'simplejson'
>>
>> Ticket ID
>> 127.0.0.1.2013-12-03.23-17-52.b5368c20-df03-4a22-b20e-35dab70c9eb0
>> <type 'exceptions.ImportError'> Cannot import module 'simplejson'
>> Version
>> web2py™ Version 2.8.2-stable+timestamp.2013.11.28.13.54.07
>> Python Python 2.7.5: C:\Python27\python.exe (prefix: C:\Python27)
>>
>>
>> This is resolved by changing the line 4 in default.py from "import
>> simplejson" to "from gluon.contrib import simplejson"
>>
>> With this I am able to access all pages except for database driven pages,
>> which generate the following error.
>>
>> 2) global name '_class' is not defined
>>
>> Ticket ID
>> 127.0.0.1.2013-12-03.23-21-14.e61d83f2-af1b-4d39-88cf-59909da11f56
>>
>> <type 'exceptions.NameError'> global name '_class' is not defined
>>
>> Version
>> web2py™ Version 2.8.2-stable+timestamp.2013.11.28.13.54.07
>> Python Python 2.7.5: C:\Python27\python.exe (prefix: C:\Python27)
>> Traceback (most recent call last):
>> File "C:\web2py-src\gluon\restricted.py", line 217, in restricted
>> exec ccode in environment
>> File
>> "C:\web2py-src\applications\SpreadSheet\views\default/database_first.html",
>> line 119, in <module>
>> File "C:\web2py-src\gluon\globals.py", line 381, in write
>> self.body.write(xmlescape(data))
>> File "C:\web2py-src\gluon\html.py", line 120, in xmlescape
>> return data.xml()
>> File "C:\web2py-src\gluon\contrib\spreadsheet.py", line 873, in xml
>> return self.sheet().xml()
>> File "C:\web2py-src\gluon\contrib\spreadsheet.py", line 862, in sheet
>> attributes["_class"]}))
>> NameError: global name '_class' is not defined
>>
>> Can somebody help me to fix this?
>>
>> Thanks,
>> PT
>>
>
--
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/groups/opt_out.