We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While under windows 10, I have got this error:
File "J:\測試\venv\lib\site-packages\dotenv\parser.py", line 41, in __init__ self.string = stream.read() UnicodeDecodeError: 'cp950' codec can't decode byte 0x98 in position 4: illegal multibyte sequence
I think dotenv try to get project path by
path = os.getcwd()
and under python3, the default encoding is utf-8.
Would you please modify the constructor of DotEnv() for us as below:
def __init__(self, dotenv_path, verbose=False, encoding=None): # type: (Union[Text, _PathLike, _StringIO], bool, Union[None, Text]) -> None self.dotenv_path = dotenv_path # type: Union[Text,_PathLike, _StringIO] self._dict = None # type: Optional[Dict[Text, Text]] self.verbose = verbose # type: bool # self.encoding = encoding # type: Union[None, Text] # <------ comment this line as change it as follows. if PY2: self.encoding = encoding # type: Union[None, Text] else: self.encoding = 'utf-8'
Thanks for your help.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While under windows 10, I have got this error:
I think dotenv try to get project path by
and under python3, the default encoding is utf-8.
Would you please modify the constructor of DotEnv() for us as below:
Thanks for your help.
The text was updated successfully, but these errors were encountered: