• Members 11 posts
    Sept. 27, 2019, 4:35 a.m.

    Hi~
    I'm settiing up a site with misago, when I run dev server with docker, something wrong happened.

    Error Message:

    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 118, in create
        cls = getattr(mod, cls_name)
    AttributeError: module 'misago' has no attribute 'markup'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/bin/celery", line 10, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.7/site-packages/celery/__main__.py", line 16, in main
        _main()
      File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 322, in main
        cmd.execute_from_commandline(argv)
      File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 496, in execute_from_commandline
        super(CeleryCommand, self).execute_from_commandline(argv)))
      File "/usr/local/lib/python3.7/site-packages/celery/bin/base.py", line 298, in execute_from_commandline
        return self.handle_argv(self.prog_name, argv[1:])
      File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 488, in handle_argv
        return self.execute(command, argv)
      File "/usr/local/lib/python3.7/site-packages/celery/bin/celery.py", line 420, in execute
        ).run_from_argv(self.prog_name, argv[1:], command=argv[0])
      File "/usr/local/lib/python3.7/site-packages/celery/bin/worker.py", line 223, in run_from_argv
        return self(*args, **options)
      File "/usr/local/lib/python3.7/site-packages/celery/bin/base.py", line 252, in __call__
        ret = self.run(*args, **kwargs)
      File "/usr/local/lib/python3.7/site-packages/celery/bin/worker.py", line 257, in run
        **kwargs)
      File "/usr/local/lib/python3.7/site-packages/celery/worker/worker.py", line 96, in __init__
        self.app.loader.init_worker()
      File "/usr/local/lib/python3.7/site-packages/celery/loaders/base.py", line 114, in init_worker
        self.import_default_modules()
      File "/usr/local/lib/python3.7/site-packages/celery/loaders/base.py", line 108, in import_default_modules
        raise response
      File "/usr/local/lib/python3.7/site-packages/celery/utils/dispatch/signal.py", line 288, in send
        response = receiver(signal=self, sender=sender, **named)
      File "/usr/local/lib/python3.7/site-packages/celery/fixups/django.py", line 84, in on_import_modules
        self.worker_fixup.validate_models()
      File "/usr/local/lib/python3.7/site-packages/celery/fixups/django.py", line 122, in validate_models
        self.django_setup()
      File "/usr/local/lib/python3.7/site-packages/celery/fixups/django.py", line 118, in django_setup
        django.setup()
      File "/usr/local/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
        apps.populate(settings.INSTALLED_APPS)
      File "/usr/local/lib/python3.7/site-packages/django/apps/registry.py", line 91, in populate
        app_config = AppConfig.create(entry)
      File "/usr/local/lib/python3.7/site-packages/django/apps/config.py", line 136, in create
        import_module(entry)
      File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "/srv/misago/misago/markup/__init__.py", line 2, in <module>
        from .flavours import common as common_flavour, signature as signature_flavour
      File "/srv/misago/misago/markup/flavours.py", line 1, in <module>
        from .parser import parse
      File "/srv/misago/misago/markup/parser.py", line 12, in <module>
        from .bbcode.inline import bold, image, italics, underline, url
      File "/srv/misago/misago/markup/bbcode/inline.py", line 6, in <module>
        from markdown.inlinepatterns import (
    ImportError: cannot import name 'ImagePattern' from 'markdown.inlinepatterns' (/usr/local/lib/python3.7/site-packages/markdown/inlinepatterns.py)
    

    I have no idea why these errors happened, please help me, thank you!

  • Sept. 27, 2019, 10:20 p.m.

    I cant reproduce this error. Can you write what you did to setup your Misago?

  • Members 11 posts
    Sept. 29, 2019, 12:43 p.m.

    Thank you for your answer, I solved the problem with those ' form... import ... ' in 'init.py' of misago.markup deleted. Maybe they are circular references.
    BTW, I find that double underline displays like bold face but not double underline it serf in this edit box.