From 8119a09449d2418474a80dc31ab5ff0c37fa0661 Mon Sep 17 00:00:00 2001 From: Rob Weber Date: Fri, 18 Dec 2020 09:31:52 -0600 Subject: [PATCH] fix oauth import --- resources/lib/authorizers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/lib/authorizers.py b/resources/lib/authorizers.py index a46c34b..028b3f9 100644 --- a/resources/lib/authorizers.py +++ b/resources/lib/authorizers.py @@ -6,6 +6,7 @@ import resources.lib.utils as utils # don't die on import error yet, these might not even get used try: from dropbox import dropbox + from dropbox import oauth except ImportError: pass @@ -45,13 +46,13 @@ class DropboxAuthorizer: self._deleteToken() # copied flow from http://dropbox-sdk-python.readthedocs.io/en/latest/moduledoc.html#dropbox.oauth.DropboxOAuth2FlowNoRedirect - flow = dropbox.oauth.DropboxOAuth2FlowNoRedirect(self.APP_KEY, self.APP_SECRET) + flow = oauth.DropboxOAuth2FlowNoRedirect(self.APP_KEY, self.APP_SECRET) url = flow.start() # print url in log utils.log("Authorize URL: " + url) - xbmcgui.Dialog().ok(utils.getString(30010), '%s\n%s\n%s' % (utils.getString(30056), utils.getString(30057), tinyurl.shorten(url))) + xbmcgui.Dialog().ok(utils.getString(30010), '%s\n%s\n%s' % (utils.getString(30056), utils.getString(30057), str(tinyurl.shorten(url), 'utf-8'))) # get the auth code code = xbmcgui.Dialog().input(utils.getString(30027) + ' ' + utils.getString(30103))