Skip to content

Unusable because tuple has no attribute 'endswith' #17

@dbs4261

Description

@dbs4261

Im guessing this is some issue with versioning, but when adding any component to the canvas, I get a failure because the line_width variable is a tuple. My guess is some function got updated to return a tuple of values and only one is needed for this function.
Full trace:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/matplotlib/cbook/__init__.py", line 307, in process
    func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/ui/tk/lcapytk.py", line 416, in on_key_press_event
    self.model.key_bindings_with_key[key](key)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/ui/uimodelmph.py", line 246, in on_add_cpt
    self.cpt_create(cpt_key, x1, y1, x2, y2)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/ui/uimodelbase.py", line 180, in cpt_create
    return self.thing_create(cpt_type, x1, y1, x2, y2)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/ui/uimodelbase.py", line 562, in thing_create
    self.cpt_draw(cpt)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/ui/uimodelbase.py", line 207, in cpt_draw
    gcpt.draw(self)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/components/component.py", line 241, in draw
    kwargs = self.make_kwargs(model, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/components/component.py", line 303, in make_kwargs
    lw = self._line_width_to_lw(model, line_width)
  File "/usr/local/lib/python3.10/dist-packages/lcapygui/components/component.py", line 288, in _line_width_to_lw
    if line_width.endswith('pt'):
AttributeError: 'tuple' object has no attribute 'endswith'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions