Code Monkey home page Code Monkey logo

Comments (11)

1stvamp avatar 1stvamp commented on July 30, 2024

@medoix could you paste in the full output? Can't replicate on my machine.

from hippybot.

1stvamp avatar 1stvamp commented on July 30, 2024

@medoix also your full hippybot.conf might be handy too, ta!

from hippybot.

medoix avatar medoix commented on July 30, 2024

Error:

(hippybot)steven@server:/data/programs/hippybot/hippybot$ hippybot -c hippybot.conf
ERROR: No module named hello_world
Traceback (most recent call last):
  File "/data/programs/hippybot/local/lib/python2.7/site-packages/hippybot-1.0.0-py2.7.egg/hippybot/bot.py", line 256, in run
    bot = HippyBot(self.config._sections)
  File "/data/programs/hippybot/local/lib/python2.7/site-packages/hippybot-1.0.0-py2.7.egg/hippybot/bot.py", line 69, in __init__
    self.load_plugins()
  File "/data/programs/hippybot/local/lib/python2.7/site-packages/hippybot-1.0.0-py2.7.egg/hippybot/bot.py", line 190, in load_plugins
    module = do_import(path)
  File "/data/programs/hippybot/local/lib/python2.7/site-packages/hippybot-1.0.0-py2.7.egg/hippybot/bot.py", line 26, in do_import
    mod = __import__(name)
  File "/data/programs/hippybot/local/lib/python2.7/site-packages/lazy_reload.py", line 83, in _lazy_reload_import
    m = _real_import(name, globals, locals, fromlist, level)
ImportError: No module named hello_world

from hippybot.

medoix avatar medoix commented on July 30, 2024

Conf:

[connection]
username = 22974_157931
password = PASSWORD
nickname = HC Bot
channels = Test
           Infrastructure
[plugins]
load = hcbot.plugins.hello_world
       hcbot.plugins.mexican_wave
[hipchat]
api_auth_token = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
respond_to_all = true

from hippybot.

medoix avatar medoix commented on July 30, 2024

Might be worth noting that i am running this using virtualenv on ubuntu it works if i change hello_world to rot13 so im really confused.

from hippybot.

1stvamp avatar 1stvamp commented on July 30, 2024

@medoix the only thing I can see that might be iffy is the fact your namespace paths in plugins.load config point to hcbot rather than hippybot if you're putting them in hippybot/plugins/ rather than in an importable module named hcbot in your PYTHON_PATH.

from hippybot.

medoix avatar medoix commented on July 30, 2024

ahh sorry i posted the wrong config (trying different things) the correct config says hippybot in the plugin path.

from hippybot.

1stvamp avatar 1stvamp commented on July 30, 2024

Aha. That makes sense. Can you post the contents of hello_world.py? Only other thing the module might fail to load is if it fails to compile. I know you said it was just the contents of the example from the readme, but I just copied it in tried it myself and it was fine.

from hippybot.

medoix avatar medoix commented on July 30, 2024

hello_world.py located in /data/programs/hippbot/hippybot/hippybot/plugins

# hello_world.py
from hippybot.decorators import botcmd, directcmd
class Plugin(object):
    global_commands = ['hello_world']
    command_aliases = {'hi!': 'hello'}
    @botcmd
    def hello_world(self, mess, args):
        return u'Hello world!'
    @directcmd
    def hello(self, mess, args):
        return u'Well hello there..'

from hippybot.

1stvamp avatar 1stvamp commented on July 30, 2024

Ah, I'd actually re-tested the class based example, however changing "hcbot" back to "hippybot":

from hippybot.decorators import directcmd

@directcmd
def hello_world(bot, mess, args):
    return u'Hello world!'

It still works. :-/

from hippybot.

medoix avatar medoix commented on July 30, 2024

It is all hippybot now, i actually deleted everything and just started fresh, i did have it working at one point but now im testing again and it just fails to load the hello_world plugin. I have it running (not really running) on an EC2 instance if you like i can give you access but im at a loss as to what is actually happening.

from hippybot.

Related Issues (17)

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.