Skip to content

exceptions.KeyError: 10 from disconnections #55

@alleus

Description

@alleus

I got another disconnect in the same manner as in #54, but this time something was recorded and I'm attempting to fetch the disconnections list. That, however, results in the following exception.

2013-09-06 07:05:46+0000 [HTTPChannel,51,127.0.0.1] Unhandled Error
    Traceback (most recent call last):
      File "/home/appcorn/lib/python2.7/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/protocols/basic.py", line 581, in dataReceived
        why = self.lineReceived(line)
      File "/home/appcorn/lib/python2.7/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/web/http.py", line 1611, in lineReceived
        self.allContentReceived()
      File "/home/appcorn/lib/python2.7/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/web/http.py", line 1686, in allContentReceived
        req.requestReceived(command, path, version)
      File "/home/appcorn/lib/python2.7/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/web/http.py", line 790, in requestReceived
        self.process()
    --- <exception caught here> ---
      File "/home/appcorn/lib/python2.7/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/web/server.py", line 192, in process
        self.render(resrc)
      File "/home/appcorn/lib/python2.7/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/web/server.py", line 241, in render
        body = resrc.render(self)
      File "/home/appcorn/lib/python2.7/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/web/resource.py", line 250, in render
        return m(request)
      File "build/bdist.linux-x86_64/egg/pyapns/rest_service.py", line 171, in render_GET

      File "build/bdist.linux-x86_64/egg/pyapns/model.py", line 282, in to_simple

    exceptions.KeyError: 10

2013-09-06 07:05:46+0000 [HTTPChannel,51,127.0.0.1] 127.0.0.1 - - [06/Sep/2013:07:05:46 +0000] "GET /apps/***/production/disconnections HTTP/1.1" 500 4948 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/1.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2"

The crashing line of code: https://github.com/samuraisam/pyapns/blob/v50/pyapns/model.py#L282

I guess I can try to do some kind of workaround myself, but can I close the service without the disconnections list being cleared?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions