Question: I am trying to replace the valuse in a list with the long format name.

```
value_list = ['Gi1/0/8', 'Gi1/0/31', 'Gi1/0/32', 'Gi1/0/33', 'Gi1/0/34', 'Gi1/0/23', 'Gi1/0/27']

```

I am running the following script:

```
for value in value_list:
    value = re.sub(r'Gi', 'GigabitEthernet', value)
    print value
print value_list

```

This is my out put:

```
GigabitEthernet1/0/8
GigabitEthernet1/0/31
GigabitEthernet1/0/32
GigabitEthernet1/0/33
GigabitEthernet1/0/34
GigabitEthernet1/0/23
GigabitEthernet1/0/27

```

I just need to change the values in the list, it seems doing it all wrong. Can anyone help me do this in an efficient manner so i dont need to create another list from the individual outputs??

Answer: 
By looking at this line in the stack trace
`initdb: invalid locale settings; check LANG and LC_* environment variables`,

It seems you need to set env variables for locale as described here: <https://github.com/zonkyio/embedded-postgres/issues/11>.

```
export LC_CTYPE="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"

```
I had the same problem and I fixed it upgrading to the latest version of `otj-pg-embedded`.

for instance on gradle set:

```
testImplementation "com.opentable.components:otj-pg-embedded:1.0.0"

```

The initialization of the db faced a lot of problems with binaries, and finally at the end of this long commented ticket, [Fail on OSX suddenly. · Issue #136 · opentable/otj-pg-embedded](https://github.com/opentable/otj-pg-embedded/issues/136), I found the real solution.

On Jan 2022 the library switched to version 1, which conveniently uses [Testcontainers](https://www.testcontainers.org/). This finally solved my problems, and I didn't look at it any deeper. My understanding is that much of the compatibility problems between the library itself, Postgres, and the OS should have gone thanks to using isolated containers.