PO import fails with ForbiddenAttribute instead of failing with AssertionError

Bug #129295 reported by Данило Шеган
2
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Medium
Jeroen T. Vermeulen

Bug Description

When we've got approved entry in the translation import queue which has no place to be imported into, instead of getting assertion error, we get a ForbiddenAttribute on entry_to_import.displayname().

First thing that I can think of is that it shouldn't be a method (it's a property), so it should be called without "()" at the end.

Tracebacks available on launchpad-error-list.

Revision history for this message
Данило Шеган (danilo) wrote :

Assertion was added by jtv (so assigning to him), and it doesn't seem serious enough if the queue continues running (though, it would be preferrable if the code didn't break like this).

Changed in rosetta:
assignee: nobody → jtv
importance: Undecided → Medium
Changed in rosetta:
assignee: jtv → carlos
status: New → Confirmed
Revision history for this message
Данило Шеган (danilo) wrote :

displayname is not defined in TranslationImportQueueEntry (neither interface nor database class).

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

One of the drawbacks of dynamic languages... For the record, the bug is in lib/canonical/launchpad/scripts/po_import.py (line 71 in my version).

AFAICS we can just use entry_to_import.id in the error message, since it's for internal consumption only. A unique identification is more useful than a user-friendly one. So I suggest saying something like "Translation import queue entry with id %s is broken" (etc.)

Revision history for this message
Данило Шеган (danilo) wrote :

And adding a direct URL to edit the entry in question would be very helpful. Like https://translations.launchpad.net/+imports/555

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Fixed in RF 4855.

Changed in rosetta:
assignee: carlos → jtv
status: Confirmed → Fix Committed
Changed in rosetta:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.