weblate icon indicating copy to clipboard operation
weblate copied to clipboard

File content merge failed

Open martinpucik opened this issue 10 years ago • 7 comments

Hi,

uploading translated XLIFF for existing language ends with this error:

File content merge failed: get() returned more than one Unit

Currently I don't have access to logs from Weblate.

Is there fix for this?

Thanks

martinpucik avatar Apr 19 '16 12:04 martinpucik

This really sounds as a bug. What Weblate version is that?

nijel avatar Apr 19 '16 12:04 nijel

So far I can tell is Weblate-2.6. I'll try to get to the server soon.

martinpucik avatar Apr 19 '16 12:04 martinpucik

Ok, I got setup output:

 * Weblate weblate-2.5-58-gfeef730
 * Python 2.7.5
 * Django 1.9.1
 * six 1.10.0
 * python-social-auth 0.2.13
 * Translate Toolkit 1.11.0
 * Whoosh 2.7.2
 * Git 1.8.3.1
 * Pillow (PIL) 1.1.7
 * dateutil 1.5
 * lxml 3.2.1
 * django-crispy-forms 1.6.0
 * compressor 1.6
 * pyuca N/A
 * Database backends: django.db.backends.mysql

martinpucik avatar Apr 19 '16 13:04 martinpucik

And in the logs is only:

ERROR Handled exception MultipleObjectsReturned: get() returned more than one Unit -- it returned 2!

martinpucik avatar Apr 20 '16 13:04 martinpucik

That matches what I've expected. Can you try reimporting the translations? That should at least give better hint what causes the problem:

./manage.py loadpo --force --all

(Or you just problematic project/component instead of --all)

nijel avatar Apr 20 '16 13:04 nijel

I get the same error on uploading an iOS string resource - related? Weblate version 2.5.0

What else do you need from me to check this?

GrotzkyD avatar Apr 24 '16 10:04 GrotzkyD

@GrotzkyD The above comment applies to you as well. This is most likely caused by wrong import or duplicate strings in the source. Both will be detected by current Weblate versions, but older versions could have missed that and generate duplicate units.

Anyway this will not happen since 8944bc8dd7db50e73f94349dd13e44022c6b0f1a, so I'm closing this issue as it's fixed in git.

nijel avatar May 20 '16 15:05 nijel