Giter Club home page Giter Club logo

pyborg's Introduction

#
# PyBorg: The python AI bot.
#
# Copyright (c) 2000, 2006 Tom Morton, Sébastien Dailly
#
# This bot was inspired by the PerlBorg, by Eric Bock.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
# Tom Morton <[email protected]>
#


#############################################################################

This version has been customized so all data and configuration is stored into data/
To startup just run './start.sh'

#############################################################################


PyBorg 1.1.0 needs Python 1.5.2 or greater (www.python.org).
The 'irclib' and 'ircbot' modules in the PyBorg archive were written by Joel
Rosdahl (www.rosdahl.net). PyBorg has been tested on linux, windows and BSD
and /may/ work on other Python platforms.

'python pyborg-linein.py' to chat with the bot offline.
'python pyborg-irc.py' for irc mode.

Use convert2.py to convert pyborg olders dictionaries to pyborg 1.1.0
format. The dictionary is stored in lines.dat and words.dat and saved in a zip
file.

Orders :
--------

All the orders start with one “!”. According to whether the bot is connected to
IRC or not, the list of the order is not the same one. Here the list of the
orders which are usable all the time:

    * !help: post the whole of the orders available
    * !version: post the version of the bot
    * !quit: leave the program
    * !save: safeguard the dictionary and the files of configuration

    * !words: post the number of words and sentences known
    * !known [Word]: post if the word [Word] is known and numbers it sentences
       in which it appears

    * !unlearn [Word]: erase the word of the dictionary
    * !purge: Post the number of words which appear only in one context
    * !purge [a number]: erase [a number] words of the dictionary, among the
       least frequent words
    * !replace [word1] [word2]: replace all the events of [word1] by [word2]
    * !censor [Word]: censure the word [Word]
    * !uncensor [Word]: withdraw [Word] list of censure

    * !learning [on|off]: authorize or not the training of new words
    * !limit [a number]: limit the number of words known with [a number]
       (by defect 6000)

    * !alias: List all alias what exists
    * !alias [alias]: List all the words which refer to {alias]
    * !alias [alias] [word1] [wordN]: create alias which replaces all the events
       of [Word] by [alias]

The following orders are available only on IRC:

    * !nick [nick]: change nick the bot
    * !shutup: prevent the bot from speaking on the channels
    * !wakeup: cancel one! shutup
    * !replyrate [a number]: probability that the bot answers a message diffused
       on the channel
    * !talk [nick] [message]: send the message [message] with [nick] on behalf
       of the bot

    * !join [channel]: connect the bot to [channel]
    * !leaves [channel]: fact of leaving the channel [channel]
    * !chans: list the channels where the bot is connected

    * !ignore of [nick]: ignore nick
    * !unignore [nick]: withdraw nick list of the people to be ignored

    * !owner password: allows to be added to the list of the owners (the
       password is defined in the file pyborg-irc.cfg)

Configuration files :
---------------------

Edit pyborg.cfg, and pyborg-irc.cfg (created the first time you run pyborg-irc)
to configure the bot.

pyborg.cfg:

    * num_aliases: variable of the program, not to change, indicates the number
      of known alias
    * num_contexts: variable of the program, not to change, indicates the number
      of known sentences
    * ignore_list: indicate the list of words which are not relevant in a
      sentence (ex: [“one”, “a”, “of”, “some”]
    * max_words: maximum limit with the number of known words, can be changed
      thanks to the order !limit
    * learning: indicate if the bot must learn or not. Can be changed thanks to
      the order !learning
    * aliases: the list of alias. Can be changed with the order! alias
    * censored: the list of the censured words. Can be changed with the order
      !censor !uncensor
    * num_words: variable of the program, not to change, indicates the number of
      known words
    * no_save: if True, the program will not do any saves on disk.

pyborg-irc.cfg:

    * owners: a list of owners of the bot
    * reply_chance: percentage of chance that the bot answers a message diffused
      on the channel. Can be changed with the order! replyrate (see the order!
      replyrate)
    * reply_to_ignored: 0 or 1 make it possible to answer or not the people who
      in the list of are ignored
    * chans: a list channels one where the bot must be connected (is not
      modified by the order !join)
    * servers: a list of waiters where the bot must be connected
    * ignorelist: a list of people which the bot will not answer (see the order!
      be unaware of! unignore)
    * quit_message: message of exit to the disconnection
    * password: password for the order! owner
    * !speakin: 0 or 1 indicate if the bot must chatter on the channels, can be
      changed with the orders! shutup! wakeup

The aliases and censored words are regular expression. This mean that you can
set an aliases like '~hello': ['hell?o'] and each time pyborg will read 'hello'
or 'helo', it will replace the world by hello. The '~' as now role for now, but
says to pyborg that the word is an alias and can be used in the future.

NOTE: Terminate the borg with the !quit command or CTRL-C in the
console. Do not simply close the console window or the dictionary
will not be saved.

-- 
Tom Morton <[email protected]>
Sébastien Dailly <[email protected]>

pyborg's People

Contributors

bdrewery avatar leoverto avatar omnidan avatar samjoan avatar trixarian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyborg's Issues

Crash on 64bit in pack

Was a new bot, first sentences seen:

what the
an imposter

Stack trace

Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 595, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 159, in our_start
    self.start()
  File "/home/bryan/git/pyborg/lib/pyborg/ircbot.py", line 251, in start
    SimpleIRCClient.start(self)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 1114, in start
    self.ircobj.process_forever()
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 229, in process_forever
    self.process_once(timeout)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 214, in process_once
    self.process_data(i)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 183, in process_data
    c.process_data()
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 581, in process_data
    self._handle_event(Event(command, prefix, target, [m]))
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 604, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 325, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 1049, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 227, in on_pubmsg
    self.on_msg(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 333, in on_msg
    self.pyborg.process_msg(self, body, replyrate, learn, (body, source, target, c, e), owner=1)
  File "/home/bryan/git/pyborg/lib/pyborg/pyborg.py", line 348, in process_msg
    self.learn( body )
  File "/home/bryan/git/pyborg/lib/pyborg/pyborg.py", line 1093, in learn
    [learn_line( self, x, num_context ) for x in body.split( ". " )]
  File "/home/bryan/git/pyborg/lib/pyborg/pyborg.py", line 1079, in learn_line
    self.words[words[x]] = [ struct.pack( "iH", hashval, x ) ]
error: 'i' format requires -2147483648 <= number <= 2147483647

Crash on regaining nickname on disconnect

FROM SERVER: :[email protected] QUIT :Ping timeout: 240 seconds
command: quit, source: [email protected], target: None, arguments: ['Ping timeout: 240 seconds']
FROM SERVER: :irc.underworld.no 731 * :cutie578
command: monoffline, source: irc.underworld.no, target: *, arguments: ['cutie578']
Attempting to regain nickname cutie578
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 687, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 174, in our_start
    self.start()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/ircbot.py", line 253, in start
    SimpleIRCClient.start(self)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1115, in start
    self.ircobj.process_forever()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 230, in process_forever
    self.process_once(timeout)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 215, in process_once
    self.process_data(i)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 184, in process_data
    c.process_data()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 601, in process_data
    self._handle_event(Event(command, prefix, target, arguments))
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 605, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 326, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1050, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 600, in on_monoffline
    self._try_regain(self.wanted_myname)
  File "../lib/pyborg/pyborg-irc.py", line 586, in _try_regain
    self.connection.nick(self.settings.myname)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 734, in nick
    self.send_raw("NICK " + newnick)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 786, in send_raw
    raise ServerNotConnectedError, "Not connected."
ServerNotConnectedError: Not connected.
Ooops! It looks like Pyborg has crashed. Would you like to save its dictionary? (y/n) Writing dictionary...

Automatic save timer

Please include a function for the PyBorg to auto save its dictionary.

Regards
Domin

error: unpack requires a string argument of length 6

it was using a few hundred MB of ram
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 595, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 159, in our_start
    self.start()
  File "/home/bryan/PyBorg/lib/pyborg/ircbot.py", line 251, in start
    SimpleIRCClient.start(self)
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 1114, in start
    self.ircobj.process_forever()
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 229, in process_forever
    self.process_once(timeout)
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 214, in process_once
    self.process_data(i)
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 183, in process_data
    c.process_data()
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 581, in process_data
    self._handle_event(Event(command, prefix, target, [m]))
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 604, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 325, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/home/bryan/PyBorg/lib/pyborg/irclib.py", line 1049, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 227, in on_pubmsg
    self.on_msg(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 333, in on_msg
    self.pyborg.process_msg(self, body, replyrate, learn, (body, source, target, c, e), owner=1)
  File "/home/bryan/PyBorg/lib/pyborg/pyborg.py", line 372, in process_msg
    message = self.reply( body )
  File "/home/bryan/PyBorg/lib/pyborg/pyborg.py", line 861, in reply
    l, w = struct.unpack( "lH", self.words[word][x] )
error: unpack requires a string argument of length 6

Crash in pyborg.py:1010

cause i know how much you love ascii and i wanted to share
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 595, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 159, in our_start
    self.start()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/ircbot.py", line 251, in start
    SimpleIRCClient.start(self)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1114, in start
    self.ircobj.process_forever()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 229, in process_forever
    self.process_once(timeout)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 214, in process_once
    self.process_data(i)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 183, in process_data
    c.process_data()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 581, in process_data
    self._handle_event(Event(command, prefix, target, [m]))
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 604, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 325, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1049, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 227, in on_pubmsg
    self.on_msg(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 333, in on_msg
    self.pyborg.process_msg(self, body, replyrate, learn, (body, source, target, c, e), owner=1)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 372, in process_msg
    message = self.reply( body )
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 1010, in reply
    sentence[x + 1] = ""
IndexError: list assignment index out of range
Ooops! It looks like Pyborg has crashed. Would you like to save its dictionary? (y/n)

Crash when saving on exit

Writing dictionary...
^Cdeconnection
Cannot save because currently saving.

It exits after this without finishing the save.

Crash in irclib.py line 590

  File "../lib/pyborg/pyborg-irc.py", line 595, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 159, in our_start
    self.start()
  File "/export/home/cutie578/PyBorg/lib/pyborg/ircbot.py", line 251, in start
    SimpleIRCClient.start(self)
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1114, in start
    self.ircobj.process_forever()
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 229, in process_forever
    self.process_once(timeout)
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 214, in process_once
    self.process_data(i)
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 183, in process_data
    c.process_data()
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 590, in process_data
    target = arguments[0]
TypeError: 'NoneType' object is unsubscriptable

Crash in reply

Error: couldn't connect..Try again later http://tinyurl.com/68xb8xq
lool
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 594, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 159, in our_start
    self.start()
  File "/export/home/cutie578/PyBorg/lib/pyborg/ircbot.py", line 251, in start
    SimpleIRCClient.start(self)
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1114, in start
    self.ircobj.process_forever()
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 229, in process_forever
    self.process_once(timeout)
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 214, in process_once
    self.process_data(i)
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 183, in process_data
    c.process_data()
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 581, in process_data
    self._handle_event(Event(command, prefix, target, [m]))
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 604, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 325, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/export/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1049, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 227, in on_pubmsg
    self.on_msg(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 333, in on_msg
    self.pyborg.process_msg(self, body, replyrate, learn, (body, source, target, c, e), owner=1)
  File "/export/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 372, in process_msg
    message = self.reply( body )
  File "/export/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 998, in reply
    sentence[x + 1] = ""
IndexError: list assignment index out of range

Crash in pyborg.py line 962

hot
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 619, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 168, in our_start
    self.start()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/ircbot.py", line 252, in start
    SimpleIRCClient.start(self)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1115, in start
    self.ircobj.process_forever()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 230, in process_forever
    self.process_once(timeout)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 215, in process_once
    self.process_data(i)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 184, in process_data
    c.process_data()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 582, in process_data
    self._handle_event(Event(command, prefix, target, [m]))
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 605, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 326, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1050, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 236, in on_pubmsg
    self.on_msg(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 342, in on_msg
    self.pyborg.process_msg(self, body, replyrate, learn, (body, source, target, c, e), owner=1)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 389, in process_msg
    message = self.reply( body )
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 962, in reply
    context = self.lines[l][0]
KeyError: -1134786698

error: unpack requires a string argument of length 10

19:56:59 <@bryan> 14:00:26 < cutie5781> I know 238066 words (15380840 contexts, 64.61 per word), 2333469 lines.     
19:57:04 <@bryan> 16:24:08 < cutie578> I know 238066 words (15380857 contexts, 64.61 per word), 2333477 lines.      
19:57:05 <@bryan> 19:56:48 < cutie578> I know 238066 words (15384352 contexts, 64.62 per word), 2334240 lines.      
19:57:09 <@bryan> .............................                                                                     
14:00:26 < cutie5781> I know 238066 words (15380840 contexts, 64.61 per word), 2333469 lines.
1
nevar isnt true
#nick #nick.. SMOKE!
16:24:08 < #nick> I know 238066 words (15380857 contexts, 64.61 per word), 2333477 lines.
#nick exposed
19:56:48 < #nick> I know 238066 words (15384352 contexts, 64.62 per word), 2334240 lines.
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 594, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 159, in our_start
    self.start()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/ircbot.py", line 251, in start
    SimpleIRCClient.start(self)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1114, in start
    self.ircobj.process_forever()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 229, in process_forever
    self.process_once(timeout)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 214, in process_once
    self.process_data(i)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 183, in process_data
    c.process_data()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 581, in process_data
    self._handle_event(Event(command, prefix, target, [m]))
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 604, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 325, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1049, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 227, in on_pubmsg
    self.on_msg(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 333, in on_msg
    self.pyborg.process_msg(self, body, replyrate, learn, (body, source, target, c, e), owner=1)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 372, in process_msg
    message = self.reply( body )
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 854, in reply
    l, w = struct.unpack( "lH", self.words[word][x] )
error: unpack requires a string argument of length 10
Ooops! It looks like Pyborg has crashed. Would you like to save its dictionary? (y/n)

MODE -lvvvv crash

11:17:28 -!- mode/#pyborg-test [-lvvvv Arlington Benjamine Brittanie CUTIE578] by bryan
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 595, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 159, in our_start
    self.start()
  File "/home/bryan/git/pyborg/lib/pyborg/ircbot.py", line 251, in start
    SimpleIRCClient.start(self)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 1114, in start
    self.ircobj.process_forever()
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 229, in process_forever
    self.process_once(timeout)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 214, in process_once
    self.process_data(i)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 183, in process_data
    c.process_data()
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 600, in process_data
    self._handle_event(Event(command, prefix, target, arguments))
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 604, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 325, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/home/bryan/git/pyborg/lib/pyborg/ircbot.py", line 139, in _on_mode
    f(mode[1], mode[2])
  File "/home/bryan/git/pyborg/lib/pyborg/ircbot.py", line 399, in clear_mode
    del self.voiceddict[value]
  File "/home/bryan/git/pyborg/lib/pyborg/ircbot.py", line 285, in __delitem__
    ck = irc_lower(key)
  File "/home/bryan/git/pyborg/lib/pyborg/irclib.py", line 1195, in irc_lower
    return s.translate(_ircstring_translation)
AttributeError: 'NoneType' object has no attribute 'translate'

Crash in pyborg.py 883

Ignoring suikoden
i used to think ...
Traceback (most recent call last):
  File "../lib/pyborg/pyborg-irc.py", line 619, in 
    bot.our_start()
  File "../lib/pyborg/pyborg-irc.py", line 168, in our_start
    self.start()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/ircbot.py", line 252, in start
    SimpleIRCClient.start(self)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1115, in start
    self.ircobj.process_forever()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 230, in process_forever
    self.process_once(timeout)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 215, in process_once
    self.process_data(i)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 184, in process_data
    c.process_data()
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 582, in process_data
    self._handle_event(Event(command, prefix, target, [m]))
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 605, in _handle_event
    self.irclibobj._handle_event(self, event)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 326, in _handle_event
    if handler[1](connection, event) == "NO MORE":
  File "/usr/home/cutie578/PyBorg/lib/pyborg/irclib.py", line 1050, in _dispatcher
    getattr(self, m)(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 236, in on_pubmsg
    self.on_msg(c, e)
  File "../lib/pyborg/pyborg-irc.py", line 342, in on_msg
    self.pyborg.process_msg(self, body, replyrate, learn, (body, source, target, c, e), owner=1)
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 389, in process_msg
    message = self.reply( body )
  File "/usr/home/cutie578/PyBorg/lib/pyborg/pyborg.py", line 883, in reply
    context = self.lines[l][0]
KeyError: -242754201
Ooops! It looks like Pyborg has crashed. Would you like to save its dictionary? (y/n) deconnection
Writing dictionary...

Install pyborg

I've tried easy_install pip install pip3 install and pyborg.irc install. With very limited success. currently it is looking for pyborg.toml file that is not created nor supplied.

root@USERNAME:/home/USER/pyborg-1up/pyborg# pyborg version
I am a version 1.4.0b1 pyborg!
I'm running on CPython 2.7.12/Linux-4.4.0-93-generic-x86_64-with-Ubuntu-16.04-xenial
root@USERNAME:/home/USER/pyborg-1up/pyborg# pyborg irc
Traceback (most recent call last):
File "/usr/local/bin/pyborg", line 9, in
load_entry_point('pyborg==1.4.0b1', 'console_scripts', 'pyborg')()
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click-6.7-py2.7.egg/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyborg-1.4.0b1-py2.7.egg/EGG-INFO/scripts/pyborg_experimental.py", line 258, in irc

File "build/bdist.linux-x86_64/egg/pyborg/mod/mod_irc.py", line 48, in init
File "build/bdist.linux-x86_64/egg/pyborg/pyborg.py", line 279, in init
File "build/bdist.linux-x86_64/egg/pyborg/pyborg.py", line 254, in load_settings
File "build/bdist.linux-x86_64/egg/toml.py", line 39, in load
IOError: [Errno 2] No such file or directory: '/root/.config/pyborg/pyborg.toml'

sudo find / -name "pyborg.toml" 2>&1 | grep -v Permission
results in no files on the system names pyborg.toml

Dynamic intervals

Configure windows where the bot is more active, which more mimics normal people.

Bad lib paths on first startup

$ ./start.sh
ERROR !!!!
ircbot.py and irclib.py not found, please install them
( http://python-irclib.sourceforge.net/ )

Proactive socializing

Have bot say good morning same time every day, or randomly say hi to active people

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.