From b793b23197814ddb2d8716c67e14ab173e40ef83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Ho=CC=88nicke?= Date: Thu, 20 Apr 2023 11:14:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9C=20fix:=20encoding=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gptdeploy.py | 1 + src/cli.py | 1 - src/env.py | 3 +++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 src/env.py diff --git a/gptdeploy.py b/gptdeploy.py index 47b20ef..870e445 100644 --- a/gptdeploy.py +++ b/gptdeploy.py @@ -1,3 +1,4 @@ +from src import env # noqa: F401 to make sure certain environment variables are set from src import main if __name__ == "__main__": diff --git a/src/cli.py b/src/cli.py index 0485bf5..4a2bb0b 100644 --- a/src/cli.py +++ b/src/cli.py @@ -2,7 +2,6 @@ import functools import os import click -from langchain.callbacks import get_openai_callback from src.apis.jina_cloud import jina_auth_login from src.options.configure.key_handling import set_api_key diff --git a/src/env.py b/src/env.py new file mode 100644 index 0000000..5acd11d --- /dev/null +++ b/src/env.py @@ -0,0 +1,3 @@ +import os + +os.environ['PYTHONIOENCODING']='utf-8' \ No newline at end of file