Ticket #4472: proxy_unicode_error.txt

File proxy_unicode_error.txt, 780 bytes (added by sacre@…, 17 years ago)
Line 
1>>> from django.contrib.auth.models import AnonymousUser
2>>> from django.utils.encoding import smart_unicode,force_unicode
3>>> a = AnonymousUser()
4>>> # the same is for smart_unicode
5
6>>> force_unicode( a )
7Traceback (most recent call last):
8 File "<input>", line 1, in <module>
9 File "C:\python251\lib\site-packages\django\utils\encoding.py", line 38, in force_unicode
10 s = unicode(s)
11TypeError: coercing to Unicode: need string or buffer, __proxy__ found
12
13>>> force_unicode( a, strings_only=True )
14Traceback (most recent call last):
15 File "<input>", line 1, in <module>
16 File "C:\python251\lib\site-packages\django\utils\encoding.py", line 38, in force_unicode
17 s = unicode(s)
18TypeError: coercing to Unicode: need string or buffer, __proxy__ found
19
Back to Top