beaston02 / CamsodaRecorder

52 stars 78 forks source link

seems like getting error on status when connecting to Camsoda #4

Open tsauce opened 6 years ago

tsauce commented 6 years ago

Started happening about 2 weeks ago ? Just didn't have time post earlier. Any suggestions?

side$ CamsodaRecorder (master) $ python3.5 CamsodaRecorder.py Traceback (most recent call last): File "CamsodaRecorder.py", line 80, in getOnlineModels() File "CamsodaRecorder.py", line 29, in getOnlineModels if line['username'].lower() not in recording and line['status'] != 'connected': KeyError: 'status'

ghost commented 6 years ago

I don't know but I am getting the same error. Glad it is not just my comptuer

longsack commented 6 years ago

Same error here..... I think Beaston02 is busy, i'm looking at seeing if I can find a programmer to fix this issue. I looked at it but I have no idea what i'm looking at. will post an update if I get a solution.

nickartis commented 6 years ago

i got the error to leave and it detects the model at the start of the countdown, but it doesnt anything nor does it detect the model after 1 second. This is the change i made, "if line['username'].lower() not in recording and line.get('status') != 'connected':".

asap1en commented 6 years ago

So as far as i can tell there are a couple errors, one is that they seem to leave off status: connected if its connected, and the other is that the stream url isnt being created properly. I changed line 30 to ; if line['username'].lower() not in recording and line.get('status') != 'connected': as nickartis suggested and line 48 to elif modelData['status'] == 'online' or not hasattr(modelData,'status'): rather than checking if it has status; connected it checks if status doesn't exist.

so line 41 doesn't seem to being retaining the online models name but I think its related to the next error.

and then 42- 43 is the big error

 videoapi = requests.get(
                "https://www.camsoda.com/api/v1/video/vtoken/{model}?username=guest_{num}".format(model=modelData['username'], num=num), headers=headers)

is returning "response[200]" instead of what i think should be server urls. Even figureing out this much is stretching my debugging skills (actually learned out to sort of use liclipse for it). If someone can figure out the requests line, I think everything would work.