On 11/4/2012 8:41 AM, Roy Smith wrote:
In article ,
Roy Smith wrote:
print u.__unicode__()
None
print unicode(u)
Traceback (most recent call last):
File "", line 1, in
TypeError: coercing to Unicode: need string or buffer, NoneType found
What's going on here? I thought
(http://docs
In article ,
Roy Smith wrote:
>In article ,
> Roy Smith wrote:
>>
>> >>> print u.__unicode__()
>> None
>>
>> >>> print unicode(u)
>> Traceback (most recent call last):
>> File "", line 1, in
>> TypeError: coercing to Unicode: need string or buffer, NoneType found
>>
>> What's going on here?
On 4 November 2012 13:32, Roy Smith wrote:
> Environment:
> Python-2.7.3
> Ubuntu Precise
> mongoengine 0.6.20
>
> I have a class which includes a __unicode__() method:
>
> class User(mongoengine.Document):
> def __unicode__(self):
> return self.username
>
> If I create an insta
In article ,
Roy Smith wrote:
> >>> print u.__unicode__()
> None
>
> >>> print unicode(u)
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: coercing to Unicode: need string or buffer, NoneType found
>
> What's going on here? I thought
> (http://docs.python.org/2/libr
Environment:
Python-2.7.3
Ubuntu Precise
mongoengine 0.6.20
I have a class which includes a __unicode__() method:
class User(mongoengine.Document):
def __unicode__(self):
return self.username
If I create an instance of this class by calling the constructor
directly, self.usern