on web2py 2.9.5
obj[key] I pass a unicode
Solution
now pass
obj[key] a string
and on gluon/serializers.py line 167 I changed (encode for decode)
return str(obj[key]).encode('utf-8', 'replace') if key in obj else default
for
return str(obj[key]).decode('utf-8', 'replace') if key in obj else def
Hi:
This patch broke my rss.
When update web2py 2.9.5 to 2.9.11 the RSS produces an encoding error.
Ticket ID
>
> 192.168.0.109.2014-11-18.08-43-24.a4e11dac-b0ab-49b8-83b7-105ea1ba5ad2
> 'ascii' codec can't encode
> character u'\xf3' in position 23: ordinal not in range(128) Version
> web2py
Thank you very much, it works.
I have little experience, but I'm trying to learn as quickly as possible
web2py
Thanks for a wonderful framework.
Small wish more educational material and examples of application web2py to
create mobile applications.
Thanks !!!
среда, 10 сентября 2014 г.,
Sorry for the trouble here:
I pushed this to trunk:
def rss(feed):
if not 'entries' in feed and 'items' in feed:
feed['entries'] = feed['items']
def safestr(obj, key, default=''):
return str(obj[key]).encode('utf-8', 'replace') if key in obj else
default
now = datetim
Does not work. :-)
Error ticket for "welcome"Ticket ID
127.0.0.1.2014-09-09.11-33-31.6f78e65a-5d28-410e-9111-55ded191b520
'NoneType' object has no attribute
'encode'Версияweb2py™Version 2.9.9-stable+timestamp.2014.09.08.13.16.54
PythonPython 2.7.6: C:\Python27\python.exe (prefix: C:\Python27)Tr
very strange. try this:
link=str((feed.get('link') or '').encode('utf-8', 'replace')),
On Monday, 8 September 2014 12:45:25 UTC-5, Капылов Данил wrote:
>
> File "web2py \ gluon \ serializers.py" I did not change.
>
> He was the default
>
> I changed the code to your.
>
> Does not work.
>
> 'Non
File "web2py \ gluon \ serializers.py" I did not change.
He was the default
I changed the code to your.
Does not work.
'NoneType' object has no attribute
'encode'Версияweb2py™Version 2.9.9-stable+timestamp.2014.09.08.13.16.54
PythonPython 2.7.6: C:\Python27\python.exe (prefix: C:\Python27)Tra
Looks very wrong
link=str(feed.get('link', None).encode('utf-8', 'replace')),
*should be*
link=str(feed.get('link', '').encode('utf-8', 'replace')),
On Sunday, 7 September 2014 12:01:10 UTC-5, Капылов Данил wrote:
>
> 'NoneType' object has no attribute
> 'encode'
> *Version *
> web2py™Versio
8 matches
Mail list logo