You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: %u format: a real number is required, not dict
(13 additional frame(s) were not displayed)
...
File "core/views.py", line 138, in year_2016_2017
return render(
The text was updated successfully, but these errors were encountered:
The TypeError: %u format: a real number is required, not dict error occurs when you're attempting to use a format specifier %u (unsigned integer) with an argument that is not a valid number, such as a dictionary.
1 :- To fix this issue, you need to:
Locate the error in the core/views.py file, line 138.
2:- Review the render() function call.
Identify where the %u formatting is being used and inspect the variable(s) being passed to it.
Ensure the argument matches the expected type.
Thanks for your suggestions, @ZubairAli999. The view works fine for en and other locales and doesn't need fixing. This is only happening because the de translations for templates/core/2015.html and templates/core/2016-2017.html did not escape %, where we have percentages causing the errors for /de/2015/ and /de/2016-2017/ urls when the gettext function is called.
For example, 71% should be escaped as 71%% so that it is treated as a string and not a string interpolation, where the template expects a value to be passed to it.
@marksweb, may you please alert the team responsible for German translations of this issue?
Sentry Issue: DJANGO-GIRLS-WEBSITE-71
The text was updated successfully, but these errors were encountered: