Help me understand this trace from the twisted.words msn example

I am running the twisted.words msn protocol example from the twisted documentation located here: http://twistedmatrix.com/projects/words/documentation/examples/msn_example.py

I know there is another question about this .py example in stackoverflow, but this is a completely different problem. When I run the example, it behaves as expected. Logging into the account and displaying user information in buddylist, but after she did this, she spits out this trace

> Traceback (most recent call last):  
> File
> "c:\python26\lib\site-packages\twisted\python\log.py",
> line 84, in callWithLogger
>     return callWithContext({"system": lp}, func, *args, **kw)   File
> "c:\python26\lib\site-packages\twisted\python\log.py",
> line 69, in callWithContext
>     return context.call({ILogContext: newCtx}, func, *args, **kw)   File
> "c:\python26\lib\site-packages\twisted\python\context.py",
> line 59, in callWithContext
>     return self.currentContext().callWithContext(ctx,
> func, *args, **kw)   File
> "c:\python26\lib\site-packages\twisted\python\context.py",
> line 37, in callWithContext
>     return func(*args,**kw)
> --- <exception caught here> ---   File "c:\python26\lib\site-packages\twisted\internet\selectreactor.py",
> line 146, in _doReadOrWrite
>     why = getattr(selectable, method)()   File
> "c:\python26\lib\site-packages\twisted\internet\tcp.py",
> line 463, in doRead
>     return self.protocol.dataReceived(data)  
> File
> "c:\python26\lib\site-packages\twisted\protocols\basic.py", line 239, indataReceived
>     return self.rawDataReceived(data)   File
> "c:\python26\lib\site-packages\twisted\words\protocols\msn.py",
> line 676 in rawDataReceived
>     self.gotMessage(m)   File "c:\python26\lib\site-packages\twisted\words\protocols\msn.py",
> line 699, in gotMessage
>     raise NotImplementedError exceptions.NotImplementedError:

can someone help me understand what this means?

+3
source share
2 answers

, MSN, . , MSN , Twisted words .

, msn_example.py http://twistedmatrix.com/projects/words/documentation/examples/, , , ( listSynchronized):

def gotMessage(self, message):
    print message.headers
    print message.getMessage()

, , :

...
2009-08-25 00:03:23-0700 [Notification,client] {'Content-Type': 'text/x-msmsgsinitialemailnotification; charset=UTF-8', 'MIME-Version': '1.0'}
2009-08-25 00:03:23-0700 [Notification,client] Inbox-Unread: 1
2009-08-25 00:03:23-0700 [Notification,client] Folders-Unread: 0
2009-08-25 00:03:23-0700 [Notification,client] Inbox-URL: /cgi-bin/HoTMaiL
2009-08-25 00:03:23-0700 [Notification,client] Folders-URL: /cgi-bin/folders
2009-08-25 00:03:23-0700 [Notification,client] Post-URL: http://www.hotmail.com
2009-08-25 00:03:23-0700 [Notification,client]

, , , .

, !

+1

gotMessage , . , , , , getMessage , .

0

Source: https://habr.com/ru/post/1714609/


All Articles