[GH-ISSUE #990] Error when running python manage.py migrate #843

Closed
opened 2026-02-27 11:13:51 +03:00 by kerem · 27 comments
Owner

Originally created by @axd on GitHub (Dec 19, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/990

Hi, I'm trying to install the Radicale module, but whenever I try to run python manage.py migrate it gives me this error:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/srv/modoboa/instance/instance/settings.py", line 255, in <module>
    from modoboa_amavis.settings import *
ImportError: No module named modoboa_amavis.settings

I got to say that this is a fresh installation.

Any idea what is missing?

Thanks.

Originally created by @axd on GitHub (Dec 19, 2016). Original GitHub issue: https://github.com/modoboa/modoboa/issues/990 Hi, I'm trying to install the Radicale module, but whenever I try to run `python manage.py migrate` it gives me this error: ``` Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 302, in execute settings.INSTALLED_APPS File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 55, in __getattr__ self._setup(name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 43, in _setup self._wrapped = Settings(settings_module) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 99, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/srv/modoboa/instance/instance/settings.py", line 255, in <module> from modoboa_amavis.settings import * ImportError: No module named modoboa_amavis.settings ``` I got to say that this is a fresh installation. Any idea what is missing? Thanks.
kerem 2026-02-27 11:13:51 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@tonioo commented on GitHub (Dec 19, 2016):

Hi, how did you install Modoboa? Your problem is you're trying to import the configuration of the modoboa-amavis plugin which is not installed on your system. If you want to use it, then install the missing plugin. If you don't want to use it, just remove the following line: from modoboa_amavis.settings import * from your settings.py file.

<!-- gh-comment-id:267970641 --> @tonioo commented on GitHub (Dec 19, 2016): Hi, how did you install Modoboa? Your problem is you're trying to import the configuration of the modoboa-amavis plugin which is not installed on your system. If you want to use it, then install the missing plugin. If you don't want to use it, just remove the following line: `from modoboa_amavis.settings import *` from your settings.py file.
Author
Owner

@axd commented on GitHub (Dec 19, 2016):

I've installed Modoboa using modoboa-installer and also I've modified installer.cfg to add those plugins during the installation.

So, you're telling me that I have to install modoboa-amavis plugin, I think that I have to do that using pip install modoboa-amavis, right?

I'll give it a try and all keep you posted.

Thanks.

<!-- gh-comment-id:268015657 --> @axd commented on GitHub (Dec 19, 2016): I've installed Modoboa using `modoboa-installer` and also I've modified `installer.cfg` to add those plugins during the installation. So, you're telling me that I have to install modoboa-amavis plugin, I think that I have to do that using `pip install modoboa-amavis`, right? I'll give it a try and all keep you posted. Thanks.
Author
Owner

@tonioo commented on GitHub (Dec 20, 2016):

Or you can try to run the installer one more time and make sure the modoboa-amavis extension is listed and that amavis is enabled.

<!-- gh-comment-id:268178386 --> @tonioo commented on GitHub (Dec 20, 2016): Or you can try to run the installer one more time and make sure the modoboa-amavis extension is listed and that amavis is enabled.
Author
Owner

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

@axd ping

<!-- gh-comment-id:270457629 --> @tonioo commented on GitHub (Jan 4, 2017): @axd ping
Author
Owner

@axd commented on GitHub (Jan 4, 2017):

Sorry @tonioo for didn't answer before.

It worked installing all dependencies through pip. I ran the installer with the plugins listed but it didn't install anything.

Thanks.

<!-- gh-comment-id:270479807 --> @axd commented on GitHub (Jan 4, 2017): Sorry @tonioo for didn't answer before. It worked installing all dependencies through pip. I ran the installer with the plugins listed but it didn't install anything. Thanks.
Author
Owner

@tonioo commented on GitHub (Jan 5, 2017):

Have you tried to run the installer with the --debug option?

<!-- gh-comment-id:270585807 --> @tonioo commented on GitHub (Jan 5, 2017): Have you tried to run the installer with the --debug option?
Author
Owner

@axd commented on GitHub (Jan 9, 2017):

@tonioo Yes I did... But the installer doesn't install all the needed packages, you have to install them individually after.

<!-- gh-comment-id:271321315 --> @axd commented on GitHub (Jan 9, 2017): @tonioo Yes I did... But the installer doesn't install all the needed packages, you have to install them individually after.
Author
Owner

@tonioo commented on GitHub (Jan 10, 2017):

The installer is in charge of installing everything. The only reason it did not make it is because of an error, that's why I asked for debug traces. Do you see something special inside ?

<!-- gh-comment-id:271513211 --> @tonioo commented on GitHub (Jan 10, 2017): The installer is in charge of installing everything. The only reason it did not make it is because of an error, that's why I asked for debug traces. Do you see something special inside ?
Author
Owner

@axd commented on GitHub (Jan 18, 2017):

@tonioo No, the installer says that those plugins were installed correctly, but for some reason they are not installed at all.

<!-- gh-comment-id:273342932 --> @axd commented on GitHub (Jan 18, 2017): @tonioo No, the installer says that those plugins were installed correctly, but for some reason they are not installed at all.
Author
Owner

@tonioo commented on GitHub (Jan 18, 2017):

@axd What system are you using?

<!-- gh-comment-id:273414484 --> @tonioo commented on GitHub (Jan 18, 2017): @axd What system are you using?
Author
Owner

@axd commented on GitHub (Jan 19, 2017):

@tonioo Debian 8 x64

<!-- gh-comment-id:273681878 --> @axd commented on GitHub (Jan 19, 2017): @tonioo Debian 8 x64
Author
Owner

@tonioo commented on GitHub (Jan 19, 2017):

@axd on a virtual machine? a container?

<!-- gh-comment-id:273706884 --> @tonioo commented on GitHub (Jan 19, 2017): @axd on a virtual machine? a container?
Author
Owner

@axd commented on GitHub (Jan 23, 2017):

@tonioo KVM

<!-- gh-comment-id:274406719 --> @axd commented on GitHub (Jan 23, 2017): @tonioo KVM
Author
Owner

@tonioo commented on GitHub (Jan 23, 2017):

I won't be able to reproduce your environment... Could you please try a fresh installation (new system) using the --debug switch and then send me the output?

<!-- gh-comment-id:274479381 --> @tonioo commented on GitHub (Jan 23, 2017): I won't be able to reproduce your environment... Could you please try a fresh installation (new system) using the --debug switch and then send me the output?
Author
Owner

@axd commented on GitHub (Jan 24, 2017):

Sure thing, just give some time while I setup the entire enviroment.

<!-- gh-comment-id:274700012 --> @axd commented on GitHub (Jan 24, 2017): Sure thing, just give some time while I setup the entire enviroment.
Author
Owner

@tonioo commented on GitHub (Jan 24, 2017):

Thank you.

<!-- gh-comment-id:274800375 --> @tonioo commented on GitHub (Jan 24, 2017): Thank you.
Author
Owner

@oconshaw commented on GitHub (Jan 28, 2017):

I am having the exact same issue. Fresh install on VM (xenserver) running CENTOS7 using the modoboa-installer. In my case I am trying to install the modoboa-imap-migration extension. I made sure that in the install.cfg file the "modoboa-amavis" extension is specified. I am about to rerun the installation. I will send you the debug output.

I also get the following error when running the setup.py install from /home//modoboa-imap-migration

Python setup.py install

Installed /usr/lib/python2.7/site-packages/greenlet-0.4.11-py2.7-linux-x86_64.egg
Searching for PyYAML>=3.10
Reading https://pypi.python.org/simple/PyYAML/
Best match: PyYAML 3.12
Downloading https://pypi.python.org/packages/6b/f0/a0250248ea260d55748fff586d89a32afbb22656f4498b08d2636a48d4ec/PyYAML-3.12.zip#md5=aa5e762e79b19bb80dbcf04f82178832
Processing PyYAML-3.12.zip
Writing /tmp/easy_install-GCBQcj/PyYAML-3.12/setup.cfg
Running PyYAML-3.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-GCBQcj/PyYAML-3.12/egg-dist-tmp-lpwh1V
build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
#include <yaml.h>
^
compilation terminated.

<!-- gh-comment-id:275868220 --> @oconshaw commented on GitHub (Jan 28, 2017): I am having the exact same issue. Fresh install on VM (xenserver) running CENTOS7 using the modoboa-installer. In my case I am trying to install the modoboa-imap-migration extension. I made sure that in the install.cfg file the "modoboa-amavis" extension is specified. I am about to rerun the installation. I will send you the debug output. I also get the following error when running the setup.py install from /home/<username>/modoboa-imap-migration Python setup.py install Installed /usr/lib/python2.7/site-packages/greenlet-0.4.11-py2.7-linux-x86_64.egg Searching for PyYAML>=3.10 Reading https://pypi.python.org/simple/PyYAML/ Best match: PyYAML 3.12 Downloading https://pypi.python.org/packages/6b/f0/a0250248ea260d55748fff586d89a32afbb22656f4498b08d2636a48d4ec/PyYAML-3.12.zip#md5=aa5e762e79b19bb80dbcf04f82178832 Processing PyYAML-3.12.zip Writing /tmp/easy_install-GCBQcj/PyYAML-3.12/setup.cfg Running PyYAML-3.12/setup.py -q bdist_egg --dist-dir /tmp/easy_install-GCBQcj/PyYAML-3.12/egg-dist-tmp-lpwh1V build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory #include <yaml.h> ^ compilation terminated.
Author
Owner

@tonioo commented on GitHub (Jan 30, 2017):

See my answer here: https://github.com/modoboa/modoboa-webmail/issues/55#issuecomment-275889698

<!-- gh-comment-id:276007070 --> @tonioo commented on GitHub (Jan 30, 2017): See my answer here: https://github.com/modoboa/modoboa-webmail/issues/55#issuecomment-275889698
Author
Owner

@oconshaw commented on GitHub (Jan 31, 2017):

Bump. Any thoughts?

On Jan 30, 2017 2:47 AM, "Antoine Nguyen" notifications@github.com wrote:

See my answer here: modoboa/modoboa-webmail#55 (comment)
https://github.com/modoboa/modoboa-webmail/issues/55#issuecomment-275889698


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/modoboa/modoboa/issues/990#issuecomment-276007070,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYMBgej17zbdO483GBtekm2Dl8lvHRbEks5rXaOygaJpZM4LQYQ_
.

<!-- gh-comment-id:276420281 --> @oconshaw commented on GitHub (Jan 31, 2017): Bump. Any thoughts? On Jan 30, 2017 2:47 AM, "Antoine Nguyen" <notifications@github.com> wrote: > See my answer here: modoboa/modoboa-webmail#55 (comment) > <https://github.com/modoboa/modoboa-webmail/issues/55#issuecomment-275889698> > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <https://github.com/modoboa/modoboa/issues/990#issuecomment-276007070>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AYMBgej17zbdO483GBtekm2Dl8lvHRbEks5rXaOygaJpZM4LQYQ_> > . >
Author
Owner

@cmdtstof commented on GitHub (Mar 14, 2017):

hi all
with modoboa 1.6.1
i tried an upgrad (in dev environment luckily :-) )

as in this thread suggested i removed "from modoboa_amavis.settings import" from settings.py (in /srv/modoboa/instance/instance/settings.py)

pip install --upgrade modoboa >>> works fine

python manage.py syncdb --migrate >>> produces again

Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 341, in execute django.setup() File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named modoboa_amavis
amavis is installed.

???

would be nice to have an update function in modoboa admin :-)

thanks

<!-- gh-comment-id:286347973 --> @cmdtstof commented on GitHub (Mar 14, 2017): hi all with modoboa 1.6.1 i tried an upgrad (in dev environment luckily :-) ) as in this thread suggested i removed "from modoboa_amavis.settings import" from settings.py (in /srv/modoboa/instance/instance/settings.py) pip install --upgrade modoboa >>> works fine python manage.py syncdb --migrate >>> produces again `Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 341, in execute django.setup() File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 90, in create module = import_module(entry) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: No module named modoboa_amavis ` amavis is installed. ??? would be nice to have an update function in modoboa admin :-) thanks
Author
Owner

@tonioo commented on GitHub (Mar 14, 2017):

@cmdtstof pip install --upgrade modoboa is not the way to go. As the documentation says, you should specify the version you want to install instead (http://modoboa.readthedocs.io/en/latest/upgrade.html).

About amavis, why do you want to remove it if you are using it? If you really want to, don't forget to update MODOBOA_APPS also.

<!-- gh-comment-id:286350016 --> @tonioo commented on GitHub (Mar 14, 2017): @cmdtstof `pip install --upgrade modoboa` is not the way to go. As the documentation says, you should specify the version you want to install instead (http://modoboa.readthedocs.io/en/latest/upgrade.html). About amavis, why do you want to remove it if you are using it? If you really want to, don't forget to update MODOBOA_APPS also.
Author
Owner

@cmdtstof commented on GitHub (Mar 14, 2017):

sorry, got an old link to the docu.

maybe in docu "you should specify the version you want to install instead" or "where is the modoboa version which should be installed"
should be added?
(sorry, i'm bit lazy to send you a patch)

will try...
thanks

<!-- gh-comment-id:286369175 --> @cmdtstof commented on GitHub (Mar 14, 2017): sorry, got an old link to the docu. maybe in docu "you should specify the version you want to install instead" or "where <VERSION> is the modoboa version which should be installed" should be added? (sorry, i'm bit lazy to send you a patch) will try... thanks
Author
Owner

@cmdtstof commented on GitHub (Mar 14, 2017):

no chance!
pip install modoboa==1.7.1 >>> ok
python manage.py migrate >>> ImportError: No module named modoboa_amavis.settings

amavis fronted is installed with v1.0.10.
i did remove it from settings.py because it was suggested on top of this thread.

can i provide some more info?
thanks

<!-- gh-comment-id:286384936 --> @cmdtstof commented on GitHub (Mar 14, 2017): no chance! pip install modoboa==1.7.1 >>> ok python manage.py migrate >>> ImportError: No module named modoboa_amavis.settings amavis fronted is installed with v1.0.10. i did remove it from settings.py because it was suggested on top of this thread. can i provide some more info? thanks
Author
Owner

@tonioo commented on GitHub (Mar 16, 2017):

@cmdtstof You also need to update the amavis plugin.

Can you paste your settings.py file somewhere?

<!-- gh-comment-id:287004780 --> @tonioo commented on GitHub (Mar 16, 2017): @cmdtstof You also need to update the amavis plugin. Can you paste your settings.py file somewhere?
Author
Owner

@tonioo commented on GitHub (Apr 20, 2017):

@cmdtstof ping

<!-- gh-comment-id:295655444 --> @tonioo commented on GitHub (Apr 20, 2017): @cmdtstof ping
Author
Owner

@cmdtstof commented on GitHub (Apr 25, 2017):

@tonioo pong :-)

hi
on the test environment i tried a 1.6.1 update like descripted under http://modoboa.readthedocs.io/en/latest/upgrade.html#id3
with django 1.11
and got the same problem noted under
https://groups.google.com/forum/#!topic/modoboa-users/WJuZ5wZhR3o

sorry, this can't be the way an app must be updatet!
i suggest to close this task
and i will think how to get further ...
thanks

<!-- gh-comment-id:296925506 --> @cmdtstof commented on GitHub (Apr 25, 2017): @tonioo pong :-) hi on the test environment i tried a 1.6.1 update like descripted under http://modoboa.readthedocs.io/en/latest/upgrade.html#id3 with django 1.11 and got the same problem noted under https://groups.google.com/forum/#!topic/modoboa-users/WJuZ5wZhR3o sorry, this can't be the way an app must be updatet! i suggest to close this task and i will think how to get further ... thanks
Author
Owner

@tonioo commented on GitHub (Apr 25, 2017):

Did you install django 1.11 manually? Because modoboa is not compatible with this version. Actually, it should not be installed at all if you followed the procedure. Anyway, I'll close this issue as you suggested, do not hesitate to open a new one if needed.

<!-- gh-comment-id:296933105 --> @tonioo commented on GitHub (Apr 25, 2017): Did you install django 1.11 manually? Because modoboa is not compatible with this version. Actually, it should not be installed at all if you followed the procedure. Anyway, I'll close this issue as you suggested, do not hesitate to open a new one if needed.
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#843
No description provided.