jrabbit / pyborg-1up

:robot: A modern overhaul of an old favorite irc bot for multiple platforms
https://pyborg.readthedocs.io/en/latest/
GNU General Public License v3.0
33 stars 12 forks source link

pip pyborg --upgrade #48

Closed Austemagne closed 7 years ago

Austemagne commented 7 years ago

I've installed this inside and out. Easy install pip install pip3 install install from 1up git source. I've gotten it to connect to a few servers, but inconsistently. The biggest problem is it searches for pyborg.toml, which is not created nor given in any version of pyborg.

jrabbit commented 7 years ago

oops yeah that and the directory creation are known issues in the new 1.4

pyborg.toml should look like

[pyborg-core]
max_words = false
Austemagne commented 7 years ago

Thank you, that works. However now it's asking for "current.pyborg.json"

lionheart@io:/usr/local/lib/python2.7/dist-packages/pyborg$ pyborg irc Reading dictionary... ERROR:pyborg.pyborg:[Errno 2] No such file or directory: 'archive.zip' Error reading saves. New database created. INFO:pyborg.mod.mod_irc:Connected to IRC server. INFO:pyborg.mod.mod_irc:Joined channel: #anonchan INFO:pyborg.mod.mod_irc:Joined channel: #rekt ERROR:pyborg_experimental:can't concat bytes to str Traceback (most recent call last): File "/usr/local/bin/pyborg_experimental.py", line 262, in irc bot.start() File "/usr/local/lib/python3.5/dist-packages/irc/bot.py", line 325, in start super(SingleServerIRCBot, self).start() File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 1168, in start self.reactor.process_forever() File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 270, in process_forever consume(infinite_call(one)) File "/usr/local/lib/python3.5/dist-packages/moreitertools/recipes.py", line 158, in consume deque(iterator, maxlen=0) File "/usr/local/lib/python3.5/dist-packages/jaraco/itertools.py", line 386, in return (f() for in itertools.repeat(None)) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 251, in process_once self.process_data(i) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 215, in process_data c.process_data() File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 521, in process_data self._process_line(line) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 553, in _process_line handler(arguments, command, source, tags) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 585, in _handle_message self._handle_event(event) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 612, in _handle_event self.reactor._handle_event(self, event) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 348, in _handle_event result = handler.callback(connection, event) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 1131, in _dispatcher method(connection, event) File "/usr/local/lib/python3.5/dist-packages/pyborg/mod/mod_irc.py", line 161, in on_pubmsg self.learn(body) File "/usr/local/lib/python3.5/dist-packages/pyborg/mod/mod_irc.py", line 90, in learn self.my_pyborg.learn(body) File "/usr/local/lib/python3.5/dist-packages/pyborg/pyborg.py", line 1227, in learn body += " " TypeError: can't concat bytes to str INFO:pyborg.pyborg:Writing dictionary... INFO:pyborg.pyborg:Saving pyborg brain to archive.zip Traceback (most recent call last): File "/usr/local/bin/pyborg_experimental.py", line 262, in irc bot.start() File "/usr/local/lib/python3.5/dist-packages/irc/bot.py", line 325, in start super(SingleServerIRCBot, self).start() File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 1168, in start self.reactor.process_forever() File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 270, in process_forever consume(infinite_call(one)) File "/usr/local/lib/python3.5/dist-packages/moreitertools/recipes.py", line 158, in consume deque(iterator, maxlen=0) File "/usr/local/lib/python3.5/dist-packages/jaraco/itertools.py", line 386, in return (f() for in itertools.repeat(None)) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 251, in process_once self.process_data(i) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 215, in process_data c.process_data() File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 521, in process_data self._process_line(line) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 553, in _process_line handler(arguments, command, source, tags) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 585, in _handle_message self._handle_event(event) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 612, in _handle_event self.reactor._handle_event(self, event) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 348, in _handle_event result = handler.callback(connection, event) File "/usr/local/lib/python3.5/dist-packages/irc/client.py", line 1131, in _dispatcher method(connection, event) File "/usr/local/lib/python3.5/dist-packages/pyborg/mod/mod_irc.py", line 161, in on_pubmsg self.learn(body) File "/usr/local/lib/python3.5/dist-packages/pyborg/mod/mod_irc.py", line 90, in learn self.my_pyborg.learn(body) File "/usr/local/lib/python3.5/dist-packages/pyborg/pyborg.py", line 1227, in learn body += " " TypeError: can't concat bytes to str

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/pyborg", line 11, in sys.exit(cli_base()) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in call return self.main(args, kwargs) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1066, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke return callback(args, **kwargs) File "/usr/local/bin/pyborg_experimental.py", line 274, in irc bot.teardown() File "/usr/local/lib/python3.5/dist-packages/pyborg/mod/mod_irc.py", line 166, in teardown self.my_pyborg.save_all() File "/usr/local/lib/python3.5/dist-packages/pyborg/pyborg.py", line 250, in save_all self.save_brain() File "/usr/local/lib/python3.5/dist-packages/pyborg/pyborg.py", line 242, in save_brain with open(tmp_file, 'w') as f: FileNotFoundError: [Errno 2] No such file or directory: '/home/lionheart/.config/pyborg/tmp/current.pyborg.json'

jrabbit commented 7 years ago

you need to create the tmp directory. I've patched that in master

jrabbit commented 7 years ago

I just patched this and some other behaviors that were counter-UX and released a new 1.4.0b2