Jon Stewart on Fri, 10 Dec 2004 01:36:46 -0600 (CST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [nimh-dev] virtual member functions


> This revealed another problem, one for which I haven't been able to decipher 
> the stack trace:
> 
> [uckelman@scylla bin]$ ./scan.py
> Traceback (most recent call last):
>   File "./scan.py", line 41, in ?
>     if 'Subject' in msg: short_subject = msg['Subject'][0:40]
>   File "/usr/src/build/475206-i386/install/usr/lib/python2.3/email/Message.py
> ", line 327, in __contains__
> AttributeError: nimh_message instance has no attribute '_headers'
> 
> Yeah. So the problem claims to be in a file which was part of the _build_ for
>  Python, and doesn't even exist on my system.


The file exists. Try looking in /usr/lib/python2.3/email. The line number 
makes sense. It references _headers.


> When I change the second line of message.py to 'import email.Message', and th
> e base class in the constructor to 'email.Message', I get the following:
> 
>   File "/home/uckelman/projects/nimh/trunk/lib/nimh/Message.py", line 4, in ?
>     class Message(email.Message):
> TypeError: function takes at most 2 arguments (3 given)
> 
> I don't see how I'm giving 3 arguments here. I think I'm giving 1.


I don't think you are dealing with the constructor correctly. I think 
that's what it's complaining about.


Jon
-- 
Jon Stewart                                 Advanced Los Angeles C++
stew1@xxxxxxxxxxx                           http://www.alacpp.org
_______________________________________________
nimh-dev mailing list
nimh-dev@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/nimh-dev