Skip to content

Commit

Permalink
fixed unbound local error
Browse files Browse the repository at this point in the history
  • Loading branch information
wjm41 committed Mar 30, 2023
1 parent 680404a commit 71f5e9b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions molplotly/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ def add_molecules(
else:
colors = {0: "black"}

if not svg_height:
svg_height = svg_size
if not svg_width:
svg_width = svg_size

app = JupyterDash(__name__)
if smiles_col is None and mol_col is None:
raise ValueError("Either smiles_col or mol_col has to be specified!")
Expand Down Expand Up @@ -349,10 +354,6 @@ def display_hover(hoverData, value):
df_row = df.iloc[num]

hoverbox_elements = []
if not svg_height:
svg_height = svg_size
if not svg_width:
svg_width = svg_size

if show_img:
for col in chosen_smiles:
Expand Down

0 comments on commit 71f5e9b

Please sign in to comment.