From 6c0a66d01ec33cc57239193caaedba07e19b161c Mon Sep 17 00:00:00 2001 From: Jon Mease Date: Mon, 6 May 2019 06:35:34 -0400 Subject: [PATCH] Fix get_config_plotly_server_url on .config load error If .config is not found or not loaded it should be treated as empty, but it's resulting in an `UnboundLocalError` --- plotly/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index 89204d0581..7e695b3099 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1280,10 +1280,10 @@ def get_config_plotly_server_url(): try: config_dict = json.load(f) if not isinstance(config_dict, dict): - data = {} + config_dict = {} except: # TODO: issue a warning and bubble it up - data = {} + config_dict = {} return config_dict.get('plotly_domain', default_server_url)