Skip to content

Commit 6c0a66d

Browse files
committed
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`
1 parent 364321f commit 6c0a66d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: plotly/tools.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1280,10 +1280,10 @@ def get_config_plotly_server_url():
12801280
try:
12811281
config_dict = json.load(f)
12821282
if not isinstance(config_dict, dict):
1283-
data = {}
1283+
config_dict = {}
12841284
except:
12851285
# TODO: issue a warning and bubble it up
1286-
data = {}
1286+
config_dict = {}
12871287

12881288
return config_dict.get('plotly_domain', default_server_url)
12891289

0 commit comments

Comments
 (0)