Issues with http.client.BadStatusLine: ''

2019-08-09 11:05发布

I have a program that uses Dweepy (a Python module for using the dweet.io service) and it can't run the stream function (listen_for_dweets_from) for some reason.

Code:

    collabIncomingThread = threading.Thread(None, self.listenForCollabCommands, daemon=True)
    collabIncomingThread.start()

    def listenForCollabCommands(self):
        print("Getting dweets...")
        for dweet in dweepy.listen_for_dweets_from('reggie-next-codes-' + shareid):
            print(dweet)
            contentcourse = dweet['content']
            code = contentcourse['code']
            #sender = contentcourse['player']
            print("IN: " + code)
            #if sender != myname:
            mainWindow.HandleCollaborationLang(str(code))

When this runs, it eventually prints out this stuff: http://pastebin.com/MJdRriyH (the paste is infinite, I couldn't format it all for SO)

I'm pretty sure it has to do with the Threading stuff, but I'm not sure. Does anyone know?

0条回答
登录 后发表回答