diff --git a/boxes/generators/typetray.py b/boxes/generators/typetray.py index 80fd7010..5719cbac 100644 --- a/boxes/generators/typetray.py +++ b/boxes/generators/typetray.py @@ -114,7 +114,6 @@ def __init__(self) -> None: else: label_group.add_argument( "--label_file", action="store", type=argparse.FileType('r'), - default="labels.txt", help="file with compartment labels. One line per compartment") self.addSettingsArgs(FingerHoleEdgeSettings) @@ -234,11 +233,13 @@ def render(self): bh = self.back_height if self.top_edge == "e" else 0.0 + self.textcontent = [] if hasattr(self, "label_text"): self.textcontent = self.label_text.split("\r\n") else: - with open(self.label_file) as f: - self.textcontent = f.readlines() + if self.label_file: + with open(self.label_file) as f: + self.textcontent = f.readlines() self.textnumber = 0 # x sides