Trying to run my own instance of djangobot to monitor an internal, developer IRC channel.
What steps will reproduce the problem? 1. download djangobot & syncdb 2. cd to djangobot directory 3. python bin/djangobot_runner.py
What is the expected output? What do you see instead? I'm expecting to see the djangobot come up and start logging an IRC channel. Instead I see a big traceback:
sandford@dev:~/djangobot$ python bin/djangobot_runner.py
/var/lib/python-support/python2.6/MySQLdb/init.py:34:
DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.2-
py2.6.egg/djangosphinx/init.py:65: DeprecationWarning:
djangosphinx.SphinxSearch
is deprecated. Please use
djangosphinx.models.SphinxSearch
instead.
warnings.warn('djangosphinx.%s
is deprecated. Please use %s
instead.'
% (parts[1], location), DeprecationWarning)
Traceback (most recent call last):
File "bin/djangobot_runner.py", line 33, in <module>
dbs.getFactory(),
File "/home/sandford/djangobot/bot/init.py", line 348, in getFactory
self.nickname, joined=True))
File "/home/sandford/djangobot/bot/init.py", line 117, in init
self.db_obj, created =
models.Channel.objects.get_or_create(name=self.name)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/manager.py", line 96, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/query.py", line 332, in get_or_create
return self.get(**kwargs), False
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/query.py", line 303, in get
clone = self.filter(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/query.py", line 489, in filter
return self._filter_or_exclude(False, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/query.py", line 507, in _filter_or_exclude
clone.query.add_q(Q(*args, **kwargs))
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/sql/query.py", line 1258, in add_q
can_reuse=used_aliases)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/sql/query.py", line 1133, in add_filter
negate=negate, process_extras=process_extras)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/sql/query.py", line 1309, in setup_joins
field, model, direct, m2m = opts.get_field_by_name(name)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/options.py", line 281, in get_field_by_name
cache = self.init_name_map()
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/options.py", line 311, in init_name_map
for f, model in self.get_all_related_m2m_objects_with_model():
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/options.py", line 388, in
get_all_related_m2m_objects_with_model
cache = self._fill_related_many_to_many_cache()
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/options.py", line 402, in
_fill_related_many_to_many_cache
for klass in get_models():
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/loading.py", line 136, in get_models
self._populate()
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/loading.py", line 57, in _populate
self.load_app(app_name, True)
File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-
py2.6.egg/django/db/models/loading.py", line 72, in load_app
mod = import(app_name, {}, {}, ['models'])
ImportError: No module named logger
sandford@dev:~/djangobot$
What version of the product are you using? On what operating system? Latest djangobot source. Ubuntu 9.04 server.
Please provide any additional information below. I fixed a few import problems w.r.t. the settings module. I'm sure that this problem is related, but there isn't much of anything in the way of docs to help me figure out what I'm doing wrong in the big picture. I had to edit bin/djangobot_runner.py like this:
import sys sys.path.append("/home/sandford/")
from django.core.management import setup_environ import djangobot.settings as settings_mod
to eliminate some of the import errors. I'm pretty confident that this latest error I'm getting is related, but now I don't know what to do to fix it. Any help is greatly appreciated.
Status: New
Labels:
Type-Defect
Priority-Medium