Andygmb / twitchy_the_bot

A reddit bot that gets twitch.tv streams from wiki pages and adds them to the subreddit's sidebar if they are live.
MIT License
18 stars 12 forks source link

Start bugs #7

Open pascalo7 opened 9 years ago

Andygmb commented 9 years ago

Sorry - this was my fault for not including required modules (of which PRAW is one) in the readme. Did you get your issue sorted?

pascalo7 commented 9 years ago

Yeah but i came across a few others, let me go find what they were

pascalo7 commented 9 years ago
:0: UserWarning: The keyword `bot` in your user_agent may be problematic.
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\twitchy_the_bot-master\setup.py", line 12
, in <module>
    r.login(username=username, password=password)
  File "c:\Python27\lib\site-packages\praw\__init__.py", line 1331, in login
    self.request_json(self.config['login'], data=data)
  File "c:\Python27\lib\site-packages\praw\decorators.py", line 189, in wrapped
    raise error_list[0]
praw.errors.InvalidUserPass: `wrong password` on field `passwd`
Andygmb commented 9 years ago

The warning about the usage of the word "bot" in the useragent string should no longer happen. The other error is due to an invalid password - did you update config.py with the bot's username/password/subreddit?

https://github.com/Andygmb/twitchy_the_bot/blob/master/config.py#L1-L2

pascalo7 commented 9 years ago
:0: UserWarning: The keyword `bot` in your user_agent may be problematic.
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\twitchy_the_bot-master\setup.py", line 15
, in <module>
    with open("default_wiki_config.json", "r") as configjson:
IOError: [Errno 2] No such file or directory: 'default_wiki_config.json'

and i updated to the latest version of the bot (if it had been updated)

Andygmb commented 9 years ago

Unfortunately that's an issue with running the bot on windows currently - https://github.com/Andygmb/twitchy_the_bot/issues/2 I haven't had time to switch to windows to test it out.

However you can fix it yourself by adding the absolute path to the file on this line:

https://github.com/Andygmb/twitchy_the_bot/blob/master/setup.py#L15

Judging by your previous tracebacks you would want to change it to

with open("C:\Users\Administrator\Desktop\twitchy_the_bot-master\default_wiki_config.json", "r") as configjson:
pascalo7 commented 9 years ago

Thanks, I'll try that out in a bit

Andygmb commented 9 years ago

Cool - let me know if it works out or if you have any other issues.

pascalo7 commented 9 years ago
:0: UserWarning: The keyword `bot` in your user_agent may be problematic.
Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\twitchy_the_bot-master\setup.py", line 15
, in <module>
    with open("C:\Users\Administrator\Desktop\twitchy_the_bot-master\default_wik
i_config.json", "r") as configjson:
IOError: [Errno 22] invalid mode ('r') or filename: 'C:\\Users\\Administrator\\D
esktop\twitchy_the_bot-master\\default_wiki_config.json'
Andygmb commented 9 years ago

Will fix this later today when I get to a windows machine.