Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carriage returns in response break in IRC #7

Open
bbriggs opened this issue Feb 17, 2017 · 1 comment
Open

Carriage returns in response break in IRC #7

bbriggs opened this issue Feb 17, 2017 · 1 comment
Labels

Comments

@bbriggs
Copy link
Member

bbriggs commented Feb 17, 2017

2017-02-17 03:11:35,069 - legos.xkcd - INFO - Retrieving URL: http://xkcd.com/info.0.json
2017-02-17 03:11:35,205 - Legobot.Connectors.IRC - INFO - {'should_log': False, 'text': '*xkcd #1799* \n This is probably the first projection in cartographic history that can be criticized for its disproportionate focus on Finland, Mongolia, and the Democratic Republic of the Congo. \n https://imgs.xkcd.com/comics/bad_map_projection_time_zones.png', 'metadata': {'dest': <IRCBot(Thread-2, started 140703120221952)>, 'source': <legos.xkcd.XKCD object at 0x7ff804da7908>, 'opts': {'target': '#social'}}}
Exception in thread Thread-11:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.5/site-packages/Legobot/Lego.py", line 31, in run
    self.handler(self.message)
  File "/usr/local/lib/python3.5/site-packages/Legobot/Connectors/IRC.py", line 158, in handle
    'target'], message['text'])
  File "/usr/local/lib/python3.5/site-packages/irc/client.py", line 885, in privmsg
    self.send_raw("PRIVMSG %s :%s" % (target, text))
  File "/usr/local/lib/python3.5/site-packages/irc/client.py", line 921, in send_raw
    sender(self._prep_message(string))
  File "/usr/local/lib/python3.5/site-packages/irc/client.py", line 903, in _prep_message
    raise InvalidCharacters(msg)
irc.client.InvalidCharacters: Carriage returns not allowed in privmsg(text)

Solution: Send two responses or remove carriage return.

@bbriggs bbriggs added the bug label Feb 17, 2017
@bbriggs
Copy link
Member Author

bbriggs commented Aug 15, 2017

This is fixed in Legobot/Legobot#140 and friends

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant