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
initdb: error: invalid locale settings; check LANG and LC_* environment variables
pg_ctl: database system initialization failed
What are the expected results
The test runs successfully.
It looks like for pg_ctl calls that are going through TCPExecutor, there is an override being passed for the locale env vars. But for the pg_ctl calls which are directly in PostgreSQLExecutor, no such thing is done.
I guess a quick solution would be to create a private method for running subprocesses instead of calling subprocess.check_output directly in init_directory and version. This method could then override the env and set LC_ALL, LC_CTYPE and LANG (although it looks like only LANG is necessary). If this solution sounds OK to you, I'll be happy to try to create a PR.
The text was updated successfully, but these errors were encountered:
@jjudas-resistant I think that would be acceptable, with probably some warning left. Since I'm not sure if that would be the desired solution. the LANG might change the output message language (for debugging purpose certain language might be more desirable for the user)
What action do you want to perform
Run a unit test with the
postgresql_proc
fixture, for exampleWhat are the results
What are the expected results
The test runs successfully.
It looks like for
pg_ctl
calls that are going throughTCPExecutor
, there is an override being passed for the locale env vars. But for thepg_ctl
calls which are directly inPostgreSQLExecutor
, no such thing is done.I guess a quick solution would be to create a private method for running subprocesses instead of calling
subprocess.check_output
directly ininit_directory
andversion
. This method could then override the env and setLC_ALL
,LC_CTYPE
andLANG
(although it looks like onlyLANG
is necessary). If this solution sounds OK to you, I'll be happy to try to create a PR.The text was updated successfully, but these errors were encountered: