Topic: ImportError: cannot import name settings
==== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PostgreSQL
- Linux/BSD distribution name and version: Ubuntu 14.04 LTS
- Related log if you're reporting an issue:
====
Please note: I am a fairly seasoned Python developer, and I know my way around Apache and mod_wsgi fairly well.
Same issue as the following posts, settings.py not found, even though permissions are correct:
* http://www.iredmail.org/forum/topic6622 … rface.html
* http://www.iredmail.org/forum/topic6602 … rrors.html
* http://www.iredmail.org/forum/topic6565 … ation.html
[Tue Apr 22 19:55:08.400732 2014] [:error] [pid 9541] [client x.x.x.x] mod_wsgi (pid=9541): Target WSGI script '/usr/share/apache2/iredadmin/iredadmin.py' cannot be loaded as Python module.
[Tue Apr 22 19:55:08.400778 2014] [:error] [pid 9541] [client x.x.x.x] mod_wsgi (pid=9541): Exception occurred processing WSGI script '/usr/share/apache2/iredadmin/iredadmin.py'.
[Tue Apr 22 19:55:08.400802 2014] [:error] [pid 9541] [client x.x.x.x] Traceback (most recent call last):
[Tue Apr 22 19:55:08.400823 2014] [:error] [pid 9541] [client x.x.x.x] File "/usr/share/apache2/iredadmin/iredadmin.py", line 9, in <module>
[Tue Apr 22 19:55:08.400898 2014] [:error] [pid 9541] [client x.x.x.x] from libs import iredbase
[Tue Apr 22 19:55:08.400914 2014] [:error] [pid 9541] [client x.x.x.x] File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 18, in <module>
[Tue Apr 22 19:55:08.401015 2014] [:error] [pid 9541] [client x.x.x.x] import iredutils
[Tue Apr 22 19:55:08.401030 2014] [:error] [pid 9541] [client x.x.x.x] File "/usr/share/apache2/iredadmin/libs/iredutils.py", line 13, in <module>
[Tue Apr 22 19:55:08.401225 2014] [:error] [pid 9541] [client x.x.x.x] import settings
[Tue Apr 22 19:55:08.401252 2014] [:error] [pid 9541] [client x.x.x.x] ImportError: cannot import name settings
-r-------- 1 iredadmin iredadmin 3914 Apr 22 10:29 settings.py
I wondered if the file permissions meant that Apache can't read the file, changed it to 444, but that didn't help. I also went and added WSGIPythonPath /usr/share/apache2/iredadmin/ to the default-ssl.conf file, but that didn't help either.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.