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

MCprep 3.6.1 Update is Missing Compiled Translations #627

Closed
2 tasks done
StandingPadAnimations opened this issue Aug 23, 2024 · 1 comment · Fixed by #628 or #630
Closed
2 tasks done

MCprep 3.6.1 Update is Missing Compiled Translations #627

StandingPadAnimations opened this issue Aug 23, 2024 · 1 comment · Fixed by #628 or #630
Labels
bug Known issue This is an existing MCprep behavior that, while not a bug, is known to be problematic for some users

Comments

@StandingPadAnimations
Copy link
Collaborator

Did the issue happen after restarting Blender?

  • Yes, the issue indeed continued after restarting Blender

Check known issues

  • I have checked known issues, and my problem is different

What happened?

MCprep 3.6.1 is missing compiled translation files, which causes the following erorr for end users:

Traceback (most recent call last):
  File "/usr/share/blender/4.2/scripts/modules/addon_utils.py", line 407, in enable
    mod = importlib.import_module(module_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/mahid/.config/blender/4.2/scripts/addons/MCprep_addon/__init__.py", line 59, in <module>
    from . import load_modules
  File "/home/mahid/.config/blender/4.2/scripts/addons/MCprep_addon/load_modules.py", line 28, in <module>
    from . import conf
  File "/home/mahid/.config/blender/4.2/scripts/addons/MCprep_addon/conf.py", line 325, in <module>
    env = MCprepEnv()
          ^^^^^^^^^^^
  File "/home/mahid/.config/blender/4.2/scripts/addons/MCprep_addon/conf.py", line 149, in __init__
    self.languages[language.name] = gettext.translation("mcprep",
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/gettext.py", line 538, in translation
    t = _translations.setdefault(key, class_(fp))
                                      ^^^^^^^^^^
  File "/usr/lib/python3.12/gettext.py", line 272, in __init__
    self._parse(fp)
  File "/usr/lib/python3.12/gettext.py", line 424, in _parse
    catalog[str(msg, charset)] = str(tmsg, charset)

This causes the following to occur:

  • Blender registers MCprep, this results in MCprepEnv being constructed
  • MCprepEnv, during the initialization sequence, notices that translations.py doesn't exist. As such, it falls back to using the compiled MO files
  • However, because the compiled MO files also do not exist, when it attempts to do this, gettext returns an exception

What steps are needed to produce the bug?

  1. Update MCprep 3.6 to MCprep 3.6.1*
  2. Restart Blender
  3. Enable MCprep

*Oddly enough, this doesn't seem to happen when manually installing MCprep 3.6.1

What version of MCprep are you using?

MCprep 3.6.1

What version of Blender are you using?

Blender 4.2, though this has also been observed in Blender 3.3

@StandingPadAnimations StandingPadAnimations added user-troubleshoot bug Known issue This is an existing MCprep behavior that, while not a bug, is known to be problematic for some users and removed user-troubleshoot labels Aug 23, 2024
@StandingPadAnimations
Copy link
Collaborator Author

Closing as 3.6.1 is now pulled from releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Known issue This is an existing MCprep behavior that, while not a bug, is known to be problematic for some users
Projects
Status: Done
2 participants