1stvamp / hippybot

Hipchat.com bot written in Python with a simple plugin API
Other
95 stars 42 forks source link

Not able to find modules #27

Open wuk519 opened 8 years ago

wuk519 commented 8 years ago

Hi,

After the config, I ran the bot but got the following errors:

23:27 $ hippybot -c hippybot.conf ERROR: <slot wrapper 'init' of 'object' objects> is not a Python function Traceback (most recent call last): File "/Users/kanwu/Documents/workspace/itsi_bot/lib/python2.7/site-packages/hippybot-1.2.7-py2.7.egg/hippybot/bot.py", line 325, in run bot = HippyBot(self.config._sections) File "/Users/kanwu/Documents/workspace/itsi_bot/lib/python2.7/site-packages/hippybot-1.2.7-py2.7.egg/hippybot/bot.py", line 89, in init self.load_plugins() File "/Users/kanwu/Documents/workspace/itsi_bot/lib/python2.7/site-packages/hippybot-1.2.7-py2.7.egg/hippybot/bot.py", line 235, in load_plugins getattr(module, 'Plugin').init) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 816, in getargspec raise TypeError('{!r} is not a Python function'.format(func)) TypeError: <slot wrapper 'init' of 'object' objects> is not a Python function

Here is what my conf file looks like: [plugins] load_path = /Users/kanwu/Documents/workspace/itsi_bot/hippybot-1.2.7/hippybot/plugins/ load = rot13

If I change my config file to the following: [plugins] load_path = /Users/kanwu/Documents/workspace/itsi_bot/hippybot-1.2.7 load = hippybot.plugins.rot13

I got the following errors _3:29 $ hippybot -c hippybot.conf ERROR: No module named rot13 Traceback (most recent call last): File "/Users/kanwu/Documents/workspace/itsi_bot/lib/python2.7/site-packages/hippybot-1.2.7-py2.7.egg/hippybot/bot.py", line 325, in run bot = HippyBot(self.config._sections) File "/Users/kanwu/Documents/workspace/itsi_bot/lib/python2.7/site-packages/hippybot-1.2.7-py2.7.egg/hippybot/bot.py", line 89, in init self.load_plugins() File "/Users/kanwu/Documents/workspace/itsi_bot/lib/python2.7/site-packages/hippybot-1.2.7-py2.7.egg/hippybot/bot.py", line 222, in load_plugins (file, filename, data) = imp.find_module(name, self._load_path) ImportError: No module named rot13

Is it because my python path was not set properly?

arnauorriols commented 8 years ago

This is an issue with version 1.2.7, which apparently should not yet be released [1] although it has made it into pypi [2]. I suggest you and anybody else to stick with 1.2.6

[1] https://github.com/1stvamp/hippybot/blob/master/CHANGELOG [2] https://pypi.python.org/pypi/hippybot/1.2.7

1stvamp commented 8 years ago

Yes this is entirely true, seems I had a total brainfart and accidentally pushed this to pypi as part of a release script (now scrapped), I'll pull 1.2.7 from pypi and look at fixing with a further 1.2.8 release (so anyone can easily upgrade a broken 1.2.7 installation).