• Members 1 post
    Jan. 22, 2026, 12:52 p.m.

    Hi @rafalp,
    I've cloned the 0.40 repo and run it in the dev mode in docker. So far so good the instance is working just fine, but then I run the loaddevfixture script to fill my instance with the test data, and it responded with this error:

    [radek@radek-thinkpad Misago]$ ./dev loaddevfixture
    WARN[0000] /home/radek/git/radziszcze-git/workspace/Misago/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
    WARN[0000] No services to build                         
    [+]  2/2t 2/22
     ✔ Container misago-redis-1    Running                          0.0s 
     ✔ Container misago-postgres-1 Running                          0.0s 
    WARN[0000] No services to build                         
    Container misago-misago-run-905ba79b6c86 Creating 
    Container misago-misago-run-905ba79b6c86 Created 
    Created new categories hierarchy.
    Traceback (most recent call last):
      File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
        return self.cursor.execute(sql, params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/psycopg/cursor.py", line 732, in execute
        raise ex.with_traceback(None)
    psycopg.errors.UniqueViolation: duplicate key value violates unique constraint "misago_users_user_slug_key"
    DETAIL:  Key (slug)=(moderator) already exists.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/app/manage.py", line 23, in <module>
        execute_from_command_line(sys.argv)
      File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
        utility.execute()
      File "/usr/local/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv
        self.execute(*args, **cmd_options)
      File "/usr/local/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute
        output = self.handle(*args, **options)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/app/plugins/misago-dev-site-fixture/misago_dev_site_fixture/management/commands/loaddevfixture.py", line 119, in handle
        moderator = User.objects.create_user(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/app/misago/users/models/user.py", line 124, in create_user
        return self._create_user(username, email, password, **extra_fields)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/app/misago/users/models/user.py", line 106, in _create_user
        user.save(using=self._db)
      File "/usr/local/lib/python3.12/site-packages/django/contrib/auth/base_user.py", line 76, in save
        super().save(*args, **kwargs)
      File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 814, in save
        self.save_base(
      File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 877, in save_base
        updated = self._save_table(
                  ^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 1020, in _save_table
        results = self._do_insert(
                  ^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/models/base.py", line 1061, in _do_insert
        return manager._insert(
               ^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/models/manager.py", line 87, in manager_method
        return getattr(self.get_queryset(), name)(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/models/query.py", line 1805, in _insert
        return query.get_compiler(using=using).execute_sql(returning_fields)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql
        cursor.execute(sql, params)
      File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 102, in execute
        return super().execute(sql, params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 67, in execute
        return self._execute_with_wrappers(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers
        return executor(sql, params, many, context)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 84, in _execute
        with self.db.wrap_database_errors:
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/django/db/utils.py", line 91, in __exit__
        raise dj_exc_value.with_traceback(traceback) from exc_value
      File "/usr/local/lib/python3.12/site-packages/django/db/backends/utils.py", line 89, in _execute
        return self.cursor.execute(sql, params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/usr/local/lib/python3.12/site-packages/psycopg/cursor.py", line 732, in execute
        raise ex.with_traceback(None)
    django.db.utils.IntegrityError: duplicate key value violates unique constraint "misago_users_user_slug_key"
    DETAIL:  Key (slug)=(moderator) already exists.
    

    Is there a chance you can take a look at it and tell me what's wrong? Is it maybe related to the fact that the 0.40 version is still under development (I know the latest stable is 0.39.4).

  • Jan. 22, 2026, 1:08 p.m.
    check_box

    Marked as best answer by Jan. 22, 2026, 3:08 p.m..

    Thanks for bringing this up.

    Devfixture is currently broken by the changes introduced in the 0.40 and I have higher priority work that prevented me from fixing it.

    I wouldn’t worry about it too much however. It only created a few example categories, test users and forum threads. I may revisit it when new threads work is finally conpleted, but that will still take a while to do.

    I am open to somebody else fixing it sooner if they want to.