Skip to content

load_dotenv() UnicodeDecodeError #207

@wucong60

Description

@wucong60

in .evn file

app_key = '201909128757' account_name = '中国股份有限公司'
in home.py
`
from dotenv import load_dotenv, find_dotenv
import os

load_dotenv(find_dotenv())

print(os.getenv('account_name'))
`

error:

File "C:\Python37\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 447: character maps to

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions