Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when launching with no controller and clicking on left DPAD to edit #42

Open
C0rn3j opened this issue Oct 4, 2024 · 0 comments
Open

Comments

@C0rn3j
Copy link
Owner

C0rn3j commented Oct 4, 2024

  File "/home/c0rn3j/Projects/sc-controller/scc/gui/action_editor.py", line 286, in on_action_type_changed
    component.set_action(self._mode, self._action)
  File "/home/c0rn3j/Projects/sc-controller/scc/gui/ae/dpad.py", line 71, in set_action
    self.update_button_desc(action)
  File "/home/c0rn3j/Projects/sc-controller/scc/gui/ae/dpad.py", line 82, in update_button_desc
    self.set_button_desc(i)
  File "/home/c0rn3j/Projects/sc-controller/scc/gui/ae/dpad.py", line 86, in set_button_desc
    desc = describe_action(Action.AC_BUTTON, None, self.actions[i])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/c0rn3j/Projects/sc-controller/scc/gui/ae/__init__.py", line 110, in describe_action
    dsc = v.describe(mode)
          ^^^^^^^^^^^^^^^^
  File "/home/c0rn3j/Projects/sc-controller/scc/actions.py", line 747, in describe
    axis, neg, pos = AxisAction.get_axis_description(self.id)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/c0rn3j/Projects/sc-controller/scc/actions.py", line 631, in get_axis_description
    axis, neg, pos = "%s %s" % (id.name, _("Axis")), _("Negative"), _("Positive")
                                ^^^^^^^
AttributeError: 'int' object has no attribute 'name'

Maybe using id which is a python builtin everywhere is really not that great an idea.

I love not having return types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant