Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a translation fails with DoesNotExist at /translate/tfms/MasterData/de/ #4850

Closed
PawelSpoon opened this issue Nov 13, 2020 · 8 comments
Labels
question This is more a question for the support than an issue.

Comments

@PawelSpoon
Copy link

Describe the bug
go to component click on language i.e. de, click on translate

A clear and concise description of what the bug is.

To Reproduce the bug
we used the intermediate files option, turned it back to normal (monolingual) and added the msgmerge addon.
i did it for 60 components.
one component now can not be edited in german, in english it works.
i did visit the machine at the files seems to be there.

Description should look similar to this:

Steps to reproduce the behavior:

  1. Go to component
  2. click on edit or translate button
  3. See error

Expected behavior

it is possible to translate the component

Screenshots

error screen, logfile attached
Server configuration and status

Weblate installation: Hosted service / Docker / PyPI

Weblate deploy checks

Exception traceback

Environment:

Request Method: GET
Request URL: https://weblate.avl.com/translate/tfms/MasterData/de/?q=state:%3Ctranslated

Django Version: 3.1.2
Python Version: 3.7.3
Installed Applications:
['customize',
'weblate.addons',
'weblate.auth',
'weblate.checks',
'weblate.formats',
'weblate.glossary',
'weblate.machinery',
'weblate.trans',
'weblate.lang',
'weblate.langdata',
'weblate.memory',
'weblate.screenshots',
'weblate.fonts',
'weblate.accounts',
'weblate.utils',
'weblate.vcs',
'weblate.wladmin',
'weblate',
'weblate.gitexport',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin.apps.SimpleAdminConfig',
'django.contrib.admindocs',
'django.contrib.sitemaps',
'django.contrib.humanize',
'social_django',
'crispy_forms',
'compressor',
'rest_framework',
'rest_framework.authtoken',
'django_filters']
Installed Middleware:
['weblate.middleware.RedirectMiddleware',
'weblate.middleware.ProxyMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'weblate.accounts.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'social_django.middleware.SocialAuthExceptionMiddleware',
'weblate.accounts.middleware.RequireLoginMiddleware',
'weblate.api.middleware.ThrottlingMiddleware',
'weblate.middleware.SecurityMiddleware']

Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/models/component.py", line 895, in get_source
return self._sources[id_hash]

During handling of the above exception (-4174358147823471029), another exception occurred:
File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.7/dist-packages/django/core/handlers/base.py", line 179, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/views/edit.py", line 554, in translate
"context_form": ContextForm(instance=unit.source_info, user=request.user),
File "/usr/local/lib/python3.7/dist-packages/django/utils/functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/models/unit.py", line 1010, in source_info
return self.translation.component.get_source(self.id_hash)
File "/usr/local/lib/python3.7/dist-packages/weblate/trans/models/component.py", line 901, in get_source
source = source_units.get(id_hash=id_hash)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/django/db/models/query.py", line 431, in get
self.model._meta.object_name

Exception Type: DoesNotExist at /translate/tfms/MasterData/de/
Exception Value: Unit matching query does not exist.

Additional context

Add any other context about the problem here.

@nijel
Copy link
Member

nijel commented Nov 13, 2020

Please upgrade, this code has been rewritten for next releases as it had occasional issues like this.

@nijel nijel added the question This is more a question for the support than an issue. label Nov 13, 2020
@github-actions
Copy link

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger. In case your question is already answered, making a donation is the right way to say thank you!

@PawelSpoon
Copy link
Author

PawelSpoon commented Nov 13, 2020

Hi
thanks for the swift response as usual !
should i wait for 4.4 or can i take 4.3.2 ?
Best Regards
Jan

.. and the documentation still says: gettext is the best supported file format. is that still true ?

@PawelSpoon
Copy link
Author

it was selfhealing. after 4 days the error is gone today. i will request an update on our side anyway.

@github-actions
Copy link

The issue you have reported is resolved now. If you don’t feel it’s right, please follow it’s labels to get a clue and take further steps.

  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

@nijel
Copy link
Member

nijel commented Nov 16, 2020

should i wait for 4.4 or can i take 4.3.2 ?

The rewrite was done for the 4.3 release.

.. and the documentation still says: gettext is the best supported file format. is that still true ?

Not really, where is it described this way?

@PawelSpoon
Copy link
Author

PawelSpoon commented Nov 16, 2020 via email

nijel added a commit that referenced this issue Nov 16, 2020
The Gettext format does not have any special place these days, most of the
formats are first class supported. See #4850
@nijel
Copy link
Member

nijel commented Nov 16, 2020

@PawelSpoon Thanks for pointing it out, I've adjusted the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is more a question for the support than an issue.
Projects
None yet
Development

No branches or pull requests

2 participants