-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError in SkypeEventLoop when a new contact sends a message #213
Comments
This traceback looks incomplete -- it doesn't have any reference to your own code, and the exception in question is caught on the next line. Either you're looking at the caught exception (which is expected to happen) or I need a full traceback to go on. |
You are right, the trackback is incomplete, I thought that the rest would be irrelevant, but it is not. Also there was a missing print statement in the code that I provided in the issue. I edited the original description above, and added the print statement. Anyway I found the issue... the issue was that I was trying to print Here is the full traceback:
|
So the Skype APIs are saying that the conversation you got a message in doesn't exist, which isn't very helpful and also not reproducible here -- if I delete a chat (either through SkPy or in Skype for Web), I can still retrieve the basic chat info: >>> sk.chats['8:fred.2'].delete()
<= [20/10 21:44:33] DELETE https://azwus2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/8:fred.2/messages
{}
=> [20/10 21:44:34] 200
...
>>> sk.chats.cache.clear()
>>> sk.chats['8:fred.2']
<= [20/10 21:44:48] GET https://azwus2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/8:fred.2
{'params': {'view': 'msnp24Equivalent'}}
=> [20/10 21:44:48] 200
...
{'id': '8:fred.2', ...}
SkypeSingleChat(id='8:fred.2', alerts=True, userId='fred.2') |
I am using the event example from the README, using the SkypeEventLoop.
When a new user that is not in my contact list writes me, the program crashes. The trackback is at the bottom of this report.
When I start the script again, it works as expected.
Account type
Live Account, created several days ago
Conversation details
1:1 chat with a new (not approved) contact
Steps to reproduce
Run the following script, and write to Skype account from a new, previously unapproved contact.
In order to test it, so you don't need to create an account, you can delete the contact (Right click on the Contact > Profile > Delete Contact ), and afterwards delete the conversation, and restart the script.
Result or traceback
{{---skype-id---}}
is the Skype ID of the sender account, removed from the traceback for privacy issuesThe text was updated successfully, but these errors were encountered: