Page MenuHomeAleph Objects Inc

i18nCatalogProxy.i18nc "is not a function" on NixOS; UI text missing from Cura
Closed, ResolvedPublic


Cura LE Version: 3.6.8

Operating System: NixOS 2019.03

Printer: N/A (attempting to get a working software stack in anticipation of Lulzbot Pro order #213871, but bug occurs w/o any hardware involved)

Tool Head: N/A

Description of issue: Qt components using i18nCatalogProxy fail: User agreement window buttons are unlabeled, numerous other UI components are missing text.

Steps to reproduce:

  1. Install Nix. (In theory, should reproduce with Cura installed via Nix on a non-NixOS operating system, but this is not tested).
  2. Run a git clone of, and a checkout of the modernize-cura-lulzbot branch (which revs the Lulzbot branch of Cura to 3.6.8; today, NixOS is shipping the Lulzbot branch with version 15.02.1, and the upstream Ultimaker branch with version 4.0.0). See also a textual comparison between the branch and upstream at
  3. Run nix-build -A curaLulzbot (which builds cura and dependencies, putting each package into a location containing a hash of its dependencies and build steps under /nix/store, wraps the /bin/* files to set a Python sys.path pointing to immutable-store locations appropriate to those dependencies, and creates a symlink named result into that store).
  4. Run ./result/bin/cura-lulzbot, with no ~/.config/cura-lulzbot/master/cura-lulzbot.cfg specifying that the license has already been accepted.
  5. Observe a license window pop up for which the buttons which should contain text *I understand and agree* and *I don't agree* are completely empty.

Moreover, the logs contain numerous complaints of the form TypeError: Property 'i18nc' of object i18nCatalogProxy(0x3c87350) is not a function

Both result/share/cura/resources/i18n and result/share/uranium/resources/i18n directories exist. My LANG=en_US.UTF-8.

This strikes me as likely to be a combination of a packaging issue (should any environment variables need to be set to allow cura to find the translation tables) and a code bug (as having a non-function object in a context where a function is expected is never appropriate, even if it takes place only in conjunction with other problems). Guidance on where to start wrt. possible packaging fixes (so I can get the PR with this updated submitted, and thus make a modern Cura version available to Lulzbot users on NixOS) would be greatly appreciated.

Event Timeline

alexei claimed this task.May 6 2019, 8:01 AM
alexei triaged this task as Normal priority.
alexei changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
alexei added a comment.May 6 2019, 8:10 AM

@charles-dyfis-net ,

This error is happening most probably because you are trying to build CuraLE against Qt/PyQt 5.12.
The SIP handling in v5.12 changed, in addition to ECMAScript handling.
You would need to apply these 3 patches:
rU70b73ba0a270799b9eacf78e400aa8b8ab3fb2ee for Uranium
rLSee8ada42c55f54727ce4d275c294ba426d3d8234 for libSavitar
rLAaeda02d7727f45b657afb72cef203283fbf09325 for libArcus

Please let us know if it would fix the problems for you.

The Uranium patch resolves the issue this ticket was raised about, and the libSavatar patch moots the need for another bit of hackery I was applying in my build (putting import Savatar prior to import cura.CuraApplication).

I think it's fair to close this ticket. Thank you!

alexei closed this task as Resolved.May 13 2019, 12:44 PM