Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions gaitalytics/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,10 @@ def _get_sections(self, section_base):
A list containing the sections of the specified type.
"""
sections = []
for section in self._c3d["parameters"]["EVENT"].keys():
if section.startswith(section_base):
sections.append(section)
if "parameters" in self._c3d and "EVENT" in self._c3d["parameters"]:
for section in self._c3d["parameters"]["EVENT"].keys():
if section.startswith(section_base):
sections.append(section)
Comment thread
nicolaswenk marked this conversation as resolved.
return sections

def _concat_sections(self, section_base: str) -> list:
Expand Down