Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NameError: name 'vJoyButtonError' is not defined #26

@SimonMeersschaut

Description

@SimonMeersschaut

When I try to set a button that is out of the range of my vjoy controller, I get this error:

  ...
  File "C:\anaconda\lib\site-packages\pyvjoy\vjoydevice.py", line 34, in set_button
    return self._sdk.SetBtn(state,self.rID,buttonID)
  File "C:\anaconda\lib\site-packages\pyvjoy\_sdk.py", line 128, in SetBtn
    raise vJoyButtonError()
NameError: name 'vJoyButtonError' is not defined

In stead of getting a vJoyButtonError-error, I get a NameError stating that vJoyButtonError is not defined.
When taking a look at the code that is raising this exception, I saw that it was importing all exceptions from 'exceptions.py' which did not contain vJoyButtonError, only these.
For my code I just added this in the exceptions.py, which resolved the problem but I thought someone could add this in the package for all.

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