[issue46735] gettext.translations crashes when locale is unset

2022-02-18 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

As 'crash', as used here, is when python exits abnormally *without* an 
exception traceback.  The traceback in the linked report is:

Traceback (most recent call last):
  File "video2x.py", line 53, in 
from upscaler import AVAILABLE_DRIVERS
  File "/home/meltonmb/video2x-4.6.1/src/upscaler.py", line 48, in 
language = gettext.translation(DOMAIN, LOCALE_DIRECTORY, [default_locale], 
fallback=True)
  File "/usr/lib/python3.8/gettext.py", line 583, in translation
mofiles = find(domain, localedir, languages, all=True)
  File "/usr/lib/python3.8/gettext.py", line 554, in find
for nelang in _expand_lang(lang):
  File "/usr/lib/python3.8/gettext.py", line 213, in _expand_lang
loc = locale.normalize(loc)
  File "/usr/lib/python3.8/locale.py", line 401, in normalize
code = localename.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Whether the bug is in the 3rd party module 'upscaler' or the stdlib module 
gettext depends on whether the DOMAIN, LOCALE_DIRECTORY, and [default_locale] 
arguments in upscaler's call to gettext.translation meet the documented 
requirements.  What are their values?

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46735] gettext.translations crashes when locale is unset

2022-02-13 Thread Eric V. Smith


Change by Eric V. Smith :


--
components: +Library (Lib) -Parser
type: crash -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46735] gettext.translations crashes when locale is unset

2022-02-13 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46735] gettext.translations crashes when locale is unset

2022-02-12 Thread unmellow the gamer


New submission from unmellow the gamer :

The issue listed below contains an example of this problem
I assume python programs crashing when an environment variable is unset
is unintended and thought after all this time i should probably bring it to 
your attention
https://github.com/k4yt3x/video2x/issues/349

--
components: Parser
messages: 413151
nosy: amazingminecrafter2015, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: gettext.translations crashes when locale is unset
type: crash
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com