[GH-ISSUE #506] Cannot resolve 'modoboa.core.loggers.SQLHandler' when updating to 1.1.0 #489

Closed
opened 2026-02-27 11:12:01 +03:00 by kerem · 5 comments
Owner

Originally created by @jossensei on GitHub (Jan 3, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/506

Updating from 1.0.1 to 1.1.0, I've changed the settings.py like the documentation said, I've run the commands :
pip install --upgrade modoboa
printed "Successfully installed modoboa django south lxml rfc6266 factory-boy"
Then I've run :
python manage.py syncdb
But I've got :
ValueError: Unable to configure handler 'modoboa': Cannot resolve 'modoboa.core.loggers.SQLHandler': No module named loggers

Originally created by @jossensei on GitHub (Jan 3, 2014). Original GitHub issue: https://github.com/modoboa/modoboa/issues/506 Updating from 1.0.1 to 1.1.0, I've changed the settings.py like the documentation said, I've run the commands : pip install --upgrade modoboa printed "Successfully installed modoboa django south lxml rfc6266 factory-boy" Then I've run : python manage.py syncdb But I've got : ValueError: Unable to configure handler 'modoboa': Cannot resolve 'modoboa.core.loggers.SQLHandler': No module named loggers
kerem closed this issue 2026-02-27 11:12:01 +03:00
Author
Owner

@tonioo commented on GitHub (Jan 3, 2014):

Can you try to import the SQLHandler class in a python shell like this :

from modoboa.core.loggers import SQLHandler

to see if an error occurs ?

<!-- gh-comment-id:31534398 --> @tonioo commented on GitHub (Jan 3, 2014): Can you try to import the SQLHandler class in a python shell like this : from modoboa.core.loggers import SQLHandler to see if an error occurs ?
Author
Owner

@jossensei commented on GitHub (Jan 4, 2014):

with "from modoboa.core.loggers import SQLHandler", I get :
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named loggers

with "from modoboa.lib.logutils import SQLHandler", I get :
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/modoboa/lib/logutils.py", line 2, in
from models import Log
File "/usr/local/lib/python2.7/dist-packages/modoboa/lib/models.py", line 1, in
import reversion
File "/usr/local/lib/python2.7/dist-packages/reversion/init.py", line 11, in
from reversion.revisions import default_revision_manager, revision_context_manager, VersionAdapter
File "/usr/local/lib/python2.7/dist-packages/reversion/revisions.py", line 10, in
from django.contrib.contenttypes.models import ContentType
File "/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py", line 1, in
from django.db import models
File "/usr/local/lib/python2.7/dist-packages/django/db/init.py", line 11, in
if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/usr/local/lib/python2.7/dist-packages/django/conf/init.py", line 53, in getattr
self._setup(name)
File "/usr/local/lib/python2.7/dist-packages/django/conf/init.py", line 46, in _setup
% (desc, ENVIRONMENT_VARIABLE))
django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

<!-- gh-comment-id:31575647 --> @jossensei commented on GitHub (Jan 4, 2014): with "from modoboa.core.loggers import SQLHandler", I get : Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named loggers with "from modoboa.lib.logutils import SQLHandler", I get : Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/modoboa/lib/logutils.py", line 2, in <module> from models import Log File "/usr/local/lib/python2.7/dist-packages/modoboa/lib/models.py", line 1, in <module> import reversion File "/usr/local/lib/python2.7/dist-packages/reversion/**init**.py", line 11, in <module> from reversion.revisions import default_revision_manager, revision_context_manager, VersionAdapter File "/usr/local/lib/python2.7/dist-packages/reversion/revisions.py", line 10, in <module> from django.contrib.contenttypes.models import ContentType File "/usr/local/lib/python2.7/dist-packages/django/contrib/contenttypes/models.py", line 1, in <module> from django.db import models File "/usr/local/lib/python2.7/dist-packages/django/db/**init**.py", line 11, in <module> if settings.DATABASES and DEFAULT_DB_ALIAS not in settings.DATABASES: File "/usr/local/lib/python2.7/dist-packages/django/conf/**init**.py", line 53, in **getattr** self._setup(name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 46, in _setup % (desc, ENVIRONMENT_VARIABLE)) django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Author
Owner

@tonioo commented on GitHub (Jan 4, 2014):

It seems you're still using old files from 1.0.1... Could you try to manually remove all modoboa related files in /usr/local/lib/python2.7/dist-packages and then reinstall modoboa ?

<!-- gh-comment-id:31578235 --> @tonioo commented on GitHub (Jan 4, 2014): It seems you're still using old files from 1.0.1... Could you try to manually remove all modoboa related files in /usr/local/lib/python2.7/dist-packages and then reinstall modoboa ?
Author
Owner

@jossensei commented on GitHub (Jan 4, 2014):

Solved ! I had to delete the /tmp/pip-build-root/modoboa folder to be able to install 1.1.0 instead of 1.0.1
Thanks :)

<!-- gh-comment-id:31579068 --> @jossensei commented on GitHub (Jan 4, 2014): Solved ! I had to delete the /tmp/pip-build-root/modoboa folder to be able to install 1.1.0 instead of 1.0.1 Thanks :)
Author
Owner

@tonioo commented on GitHub (Jan 4, 2014):

That's a good news :)

<!-- gh-comment-id:31579172 --> @tonioo commented on GitHub (Jan 4, 2014): That's a good news :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#489
No description provided.