From 19675820204dae14b52f1726a2ca315e9e592711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Thu, 21 Nov 2019 23:33:07 -0500 Subject: [PATCH] Fix for environment variable containing unicode string. --- bazarr/init.py | 6 +++--- bazarr/main.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bazarr/init.py b/bazarr/init.py index 0b8cd0013..51bc67df0 100644 --- a/bazarr/init.py +++ b/bazarr/init.py @@ -20,11 +20,11 @@ os.environ["SZ_USER_AGENT"] = "Bazarr/1" # set anti-captcha provider and key if settings.general.anti_captcha_provider == 'anti-captcha' and settings.anticaptcha.anti_captcha_key != "": os.environ["ANTICAPTCHA_CLASS"] = 'AntiCaptchaProxyLess' - os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = settings.anticaptcha.anti_captcha_key + os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = str(settings.anticaptcha.anti_captcha_key) elif settings.general.anti_captcha_provider == 'death-by-captcha' and settings.deathbycaptcha.username != "" and settings.deathbycaptcha.password != "": os.environ["ANTICAPTCHA_CLASS"] = 'DeathByCaptchaProxyLess' - os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = ':'.join( - {settings.deathbycaptcha.username, settings.deathbycaptcha.password}) + os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = str(':'.join( + {settings.deathbycaptcha.username, settings.deathbycaptcha.password})) else: os.environ["ANTICAPTCHA_CLASS"] = '' diff --git a/bazarr/main.py b/bazarr/main.py index 8b9f2ed1c..37012f62b 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -1334,11 +1334,11 @@ def save_settings(): # set anti-captcha provider and key if settings.general.anti_captcha_provider == 'anti-captcha': os.environ["ANTICAPTCHA_CLASS"] = 'AntiCaptchaProxyLess' - os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = settings.anticaptcha.anti_captcha_key + os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = str(settings.anticaptcha.anti_captcha_key) elif settings.general.anti_captcha_provider == 'death-by-captcha': os.environ["ANTICAPTCHA_CLASS"] = 'DeathByCaptchaProxyLess' - os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = ':'.join( - {settings.deathbycaptcha.username, settings.deathbycaptcha.password}) + os.environ["ANTICAPTCHA_ACCOUNT_KEY"] = str(':'.join( + {settings.deathbycaptcha.username, settings.deathbycaptcha.password})) else: os.environ["ANTICAPTCHA_CLASS"] = ''