question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug upgrading to modoboa-1.3.0

See original GitHub issue

Impacted versions

  • Modoboa: 1.12.2

When I try to upgrade, I got this:

(env) modoboa@mailhub:~/instance$ python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/config.py", line 123, in create
    import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named admin
(env) modoboa@mailhub:~/instance$ python manage.py collectstatic
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/config.py", line 123, in create
    import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named admin
(env) modoboa@mailhub:~/instance$ python manage.py check --deploy
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
    app_config = AppConfig.create(entry)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/apps/config.py", line 123, in create
    import_module(entry)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named admin

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
makakkencommented, Jan 31, 2019

@tonioo today i’ve updated modoboa and all extensions from 1.10.X to 1.13.0 and i got following errors:

(security.W001) You do not have 'django.middleware.security.SecurityMiddleware' in your MIDDLEWARE so the SECURE_HSTS_SECONDS, SECURE_CONTENT_TYPE_NOSNIFF, SECURE_BROWSER_XSS_FILTER, and SECURE_SSL_REDIRECT settings will have no effect.

If this is normal, wouldn’t it be nice to have this in the update instructions? (https://github.com/modoboa/modoboa/blob/master/doc/upgrade.rst#1130)

(modoboa-amavis.W001) AMAVIS_DEFAULT_DATABASE_ENCODING does not match the character encoding used by the Amavis database.
	HINT: Check your database character encoding and set/update AMAVIS_DEFAULT_DATABASE_ENCODING.

i fixed it by changing settings[“AMAVIS_DEFAULT_DATABASE_ENCODING”] from LATIN1 to UTF8 in modoboa_amavis/settings.py, but why isn’t it written in the update instructions? are there any extension specific upgrade instructions i’ve missed? (https://github.com/modoboa/modoboa/blob/master/doc/upgrade.rst#1130)

If you think my suggestions would be useful, let me know and i’ll prepare a merge request for the upgrade instuctions.

0reactions
stefawebcommented, Jan 21, 2019

Got this by mail?

Traceback (most recent call last):
  File "/srv/modoboa/instance/manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/subcommand/base.py", line 53, in run_from_argv
    return super(SubcommandCommand, self).run_from_argv(argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/subcommand/base.py", line 84, in handle
    return command.run_from_argv(argv)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/admin/management/commands/subcommands/_mx.py", line 264, in handle
    self.check_domain(domain, **options)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/admin/management/commands/subcommands/_mx.py", line 199, in check_domain
    domain, "spf", ttl)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/dnstools/models.py", line 35, in get_or_create_for_domain
    record.check_syntax(ttl)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/dnstools/models.py", line 70, in check_syntax
    result = func(self.value)
  File "/srv/modoboa/env/local/lib/python2.7/site-packages/modoboa/dnstools/lib.py", line 169, in check_spf_syntax
    if part[0] in ["+", "-", "~", "?"]:
IndexError: string index out of range
Read more comments on GitHub >

github_iconTop Results From Across the Web

Regex error when upgrading from version 2.8.1 to 3.0.0 #9495
Since the upgrade to 3.0.0, I receive a regex parse error which I believe should still work, the errors produced are not listed...
Read more >
Solved: CSCvv83510 - ISE 3.0 Upgrade failing at step ...
The bug says that ISE 3.0 patch 1 fixes the issue, but you can't upgrade to a patch. It also says there is...
Read more >
Release notes for ArcGIS Pro 3.0
Each major, minor, and patch release of ArcGIS Pro includes fixes for bugs that were reported to Esri Technical Support. The bugs that...
Read more >
VMware Skyline Collector v3.1.0.0 does not auto upgrade on ...
A bug in one of the Auto-Upgrade scripts in the virtual appliance prevents Skyline Collectors version 3.1.0.0 to perform automatic upgrades, ...
Read more >
3.0 - Bugzilla
Release Notes for Bugzilla 3.0. Introduction; Minimum Requirements; New Features and Improvements; Outstanding Issues; How to Upgrade From An Older Version ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found