Skip to content

Initial installation of AI quality evaluation add-on fails with server error #22174

Closed

Description

@JustSwiftIt

Describe the issue

When installing the AI quality evaluation add-on for the first time, it fails with a server error.

The reason might be that this code runs also for the first install and fails because no pk exists yet.

I already tried

  • I've read and searched the documentation.
  • I've searched for similar filed issues in this repository.

Steps to reproduce the behavior

  1. On a Weblate instance with at least one configured AI suggestion service, go to Manage > Add-ons.
  2. Click Install for the AI quality evaluation add-on.
  3. Save the config.

Expected behavior

Add-on installed and config saved.

Screenshots

No response

Exception traceback

[2026-10-15 13:59:02,939: ERROR/174] Internal Server Error: /manage/addons/
Traceback (most recent call last):
  File "/app/venv/lib/python3.14/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/app/venv/lib/python3.14/site-packages/django/core/handlers/base.py", line 198, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/app/venv/lib/python3.14/site-packages/weblate/auth/decorators.py", line 66, in sync_wrapper
    return view(request, *args, **kwargs)
  File "/app/venv/lib/python3.14/site-packages/django/views/generic/base.py", line 106, in view
    return self.dispatch(request, *args, **kwargs)
           ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.14/site-packages/django/views/generic/base.py", line 145, in dispatch
    return handler(request, *args, **kwargs)
  File "/app/venv/lib/python3.14/site-packages/weblate/addons/views.py", line 346, in post
    instance = form.save()
  File "/app/venv/lib/python3.14/site-packages/weblate/addons/forms.py", line 132, in save
    self._addon.configure(self.serialize_form())
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.14/site-packages/weblate/addons/ai.py", line 201, in configure
    type(self.instance).objects.select_for_update().get(pk=self.instance.pk)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.14/site-packages/django/db/models/query.py", line 639, in get
    raise self.model.DoesNotExist(
        "%s matching query does not exist." % self.model._meta.object_name
    )

How do you run Weblate?

Docker container

Weblate version

2026.10.1

Weblate deploy checks

Additional context

No response

Activity

  1. added
    Waiting for: TriageAssigned automatically for any new issue, needs attention from a Weblate member.
    on Oct 15, 2026
  2. self-assigned this
    on Oct 15, 2026
  3. added theissue type on Oct 15, 2026
  4. changed the issue type fromtoon Oct 15, 2026
  5. added this to the 2026.11 milestone on Oct 15, 2026
  6. added
    Waiting for: ImplementationAdded to a milestone, will be resolved according to the milestone timeline.
    and removed
    Waiting for: TriageAssigned automatically for any new issue, needs attention from a Weblate member.
    on Oct 15, 2026
  7. added a commit that references this issue on Oct 15, 2026
    f032fea
  8. added
    Waiting for: ReleaseThe issue is fixed and waiting to be released.
    and removed
    Waiting for: ImplementationAdded to a milestone, will be resolved according to the milestone timeline.
    on Oct 15, 2026
  9. github-actions commented on Oct 15, 2026

    @github-actions

    Thank you for your report — the issue has now been resolved.

    The fix has been merged into the repository and will be included in the upcoming Weblate 2026.11 release.

    • If you encounter any issues with the fix, please comment in this thread.
    • If you experience a similar but separate issue, open a new report so we can track it properly.
    • If you find Weblate helpful, consider supporting its development.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: Add-onsAdd-on features or new add-on ideas.

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions