-
Notifications
You must be signed in to change notification settings - Fork 17
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
[BUG] babel TypeError: Unexpected value for identifier: None #53
Labels
bug
Something isn't working
Comments
This has been fixed in #50, but I forgot to release a new version. The patch will be released soon. |
Hi, I'm using v2.2.9 and still have this error:
|
liang2kl
added a commit
that referenced
this issue
Jul 21, 2023
This may be fixed with a fallback to a default language code. if sys.version_info[:2] < (3, 11):
_locale = locale.getdefaultlocale()[0]
else:
_locale = locale.getlocale()[0]
# Fallback to en_US if locale environment is not set
if not _locale:
_locale = "en_US" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Plugin version
latest version
Python version
3.10
Additional environment information (optional)
No response
What happened?
File "/Users/jackiexiao/miniconda3/lib/python3.10/site-packages/mkdocs_blogging_plugin/util.py", line 150, in get_localized_date
return format_datetime(time, format="short", locale=_locale)
File "/Users/jackiexiao/miniconda3/lib/python3.10/site-packages/babel/dates.py", line 719, in format_datetime
locale = Locale.parse(locale)
File "/Users/jackiexiao/miniconda3/lib/python3.10/site-packages/babel/core.py", line 317, in parse
raise TypeError(f"Unexpected value for identifier: {identifier!r}")
TypeError: Unexpected value for identifier: None
What should have happened? (optional)
No response
How to reproduce the bug?
in macos
so _locale get None which is wrong in mkdocs_blogging_plugin/util.py
Additional context (optional)
No response
Relevant log output (optional)
No response
The text was updated successfully, but these errors were encountered: