Skip to content

Commit

Permalink
Exception handle
Browse files Browse the repository at this point in the history
  • Loading branch information
agahkarakuzu committed Sep 24, 2024
1 parent cdec899 commit dce3e7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/neuroxlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,9 @@ def get_plotly_data(self, label: str) -> Optional[pd.DataFrame]:
# Handle cases where x, y, or z might be None
for key in ['x', 'y', 'z']:
if key not in trace_data:
trace_data[key] = [None] * max(len(trace_data.get('x', [])),
len(trace_data.get('y', [])),
len(trace_data.get('z', [])))
trace_data[key] = [None] * max(len(trace_data.get('x', []) or []),
len(trace_data.get('y', []) or []),
len(trace_data.get('z', []) or []))

data_list.append(pd.DataFrame(trace_data))

Expand Down

0 comments on commit dce3e7d

Please sign in to comment.