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

Contribute: Fix RecursionError for xblock translations #955

Open
OmarIthawi opened this issue Jun 22, 2021 · 0 comments
Open

Contribute: Fix RecursionError for xblock translations #955

OmarIthawi opened this issue Jun 22, 2021 · 0 comments
Labels
upstream-contribution A suggestion for contributing changes to Open edX

Comments

@OmarIthawi
Copy link

OmarIthawi commented Jun 22, 2021

Contribute both #953 and #956

This exception below is raised because there's an attempt to make the ModuleI18nService fallback to itself due to the use of the magical ModuleI18nService.__getattr__ which returns django.utils.translation._fallback when asked for ModuleI18nService._fallback. RED-2263.

This creates a infinite recursion that needs to break.

File "xblockutils/templatetags/i18n.py", line 41, in merge_translation
    translation.merge(i18n_service)
...
File "python3.5/gettext.py", line 169, in add_fallback
    self._fallback.add_fallback(fallback)
RecursionError: maximum recursion depth exceeded"

Tests

I wasn't able to reproduce the issue via scripts or tests. The issue has extended beyond the regular bug timebox of 4 hours.

@OmarIthawi OmarIthawi added the upstream-contribution A suggestion for contributing changes to Open edX label Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream-contribution A suggestion for contributing changes to Open edX
Projects
None yet
Development

No branches or pull requests

1 participant