-
Notifications
You must be signed in to change notification settings - Fork 465
Closed
Description
Hi, seems it cannot parse unicode values
example
.env file
SHARE_ENDPOINTS="'Bibliotēka', 'Reģistrētie dokumenti'"
settings.py file
#!/usr/bin/env python2
import os
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
SHARE_ENDPOINTS = os.getenv("SHARE_ENDPOINTS")
print(SHARE_ENDPOINTS)
Error traceback
Traceback (most recent call last):
File "./bin/settings.py", line 5, in <module>
load_dotenv(find_dotenv())
File "/home/rolla/.local/lib/python2.7/site-packages/dotenv/main.py", line 250, in load_dotenv
return DotEnv(f, verbose=verbose).set_as_environment_variables(override=override)
File "/home/rolla/.local/lib/python2.7/site-packages/dotenv/main.py", line 97, in set_as_environment_variables
os.environ[k] = v
File "/usr/lib/python2.7/os.py", line 473, in __setitem__
putenv(key, item)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0113' in position 8: ordinal not in range(128)
Is there some options to get this working?
Thanks.
Metadata
Metadata
Assignees
Labels
No labels