Exaphis / HackQ-Trivia

Yet another HQ Trivia bot. Automatically scrapes HQ Trivia questions without OCR and answers them.
MIT License
89 stars 54 forks source link

Error with line #37. #25

Closed Krayphysh closed 6 years ago

Krayphysh commented 6 years ago

Getting this error, any idea where the issue lies? :-)

python3 hq_main.py

getting

Show not on. Traceback (most recent call last): File "hq_main.py", line 37, in next_time = datetime.strptime(response_data["nextShowTime"], "%Y-%m-%dT%H:%M:%S.000Z") KeyError: 'nextShowTime'

Exaphis commented 6 years ago

Could you post the log file?

Krayphysh commented 6 years ago

This issue is consistent, it happens during broadcasting as well.

Krayphysh commented 6 years ago

sure :-)

Krayphysh commented 6 years ago

I'm still in the learning phase at the moment, I've only had a few weeks worth of experience with this. Where would I locate the proper log? The information under data.log in the HackQ_Trivia directory only says this: INFO:root:{'error': 'Auth not valid', 'errorCode': 105}. I've taken care of the root issue so I don't believe that's the log that I'm looking for. I used the command import logging.basicConfig(level=logging.INFO} and got this info: bash: syntax error near unexpected token `(' Is there somewhere else that I should be looking for a proper log file? Thanks for your help! :-)

Exaphis commented 6 years ago

The log file you are looking at is the only one. I have updated the program so an error would be raised saying the connection settings are invalid when it is detected. Your bearer token is probably incorrect, which is causing HQ to not send you any information.

Krayphysh commented 6 years ago

Awesome, and thanks for the help! I'll check out my bearer token and see if that corrects my issue.

Exaphis commented 6 years ago

No problem. If you have trouble finding the correct bearer token and user ID, you can find 2 you can use in gjacobs314's HackQ for Swift repository: https://github.com/gjacobs314/HQTrivia.

Krayphysh commented 6 years ago

You were correct! It seems I didn't copy the entire bearer token. For reason's I can't quite explain, I copied about 99% of the token but left just a bit behind. Thanks again, everything is working great now!

Exaphis commented 6 years ago

That's great! Let me know if you have any more problems.