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

examples/array_backed_grid.py: TypeError: on_mouse_scroll() takes 3 positional arguments but 5 were given #143

Closed
iacopy opened this Issue Nov 26, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@iacopy

iacopy commented Nov 26, 2017

It happens when clicking on an already green cell.

$ python array_backed_grid.py
Click coordinates: (80, 447). Grid coordinates: (12, 2)
Click coordinates: (188, 359). Grid coordinates: (10, 5)
Click coordinates: (159, 377). Grid coordinates: (10, 4)
Click coordinates: (199, 418). Grid coordinates: (11, 5)
Click coordinates: (224, 361). Grid coordinates: (10, 6)
Traceback (most recent call last):
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/event.py", line 367, in dispatch_event
    if getattr(self, event_type)(*args):
TypeError: on_mouse_scroll() takes 3 positional arguments but 5 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1121, in objc_method
    result = f(py_self, *args)
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/window/cocoa/pyglet_view.py", line 239, in scrollWheel_
    self._window.dispatch_event('on_mouse_scroll', x, y, scroll_x, scroll_y)
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/window/__init__.py", line 1220, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/event.py", line 371, in dispatch_event
    event_type, args, getattr(self, event_type))
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/event.py", line 392, in _raise_dispatch_exception
    inspect.getargspec(handler)
  File "/Users/iacopomarmorini/.pyenv/versions/3.6.3/lib/python3.6/inspect.py", line 1072, in getargspec
    raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use getfullargspec() API which can support them
Traceback (most recent call last):
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/event.py", line 367, in dispatch_event
    if getattr(self, event_type)(*args):
TypeError: on_mouse_scroll() takes 3 positional arguments but 5 were given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 234, in 'calling callback function'
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/libs/darwin/cocoapy/runtime.py", line 1121, in objc_method
    result = f(py_self, *args)
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/window/cocoa/pyglet_view.py", line 239, in scrollWheel_
    self._window.dispatch_event('on_mouse_scroll', x, y, scroll_x, scroll_y)
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/window/__init__.py", line 1220, in dispatch_event
    if EventDispatcher.dispatch_event(self, *args) != False:
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/event.py", line 371, in dispatch_event
    event_type, args, getattr(self, event_type))
  File "/Users/iacopomarmorini/.virtualenvs/arcade/lib/python3.6/site-packages/pyglet/event.py", line 392, in _raise_dispatch_exception
    inspect.getargspec(handler)
  File "/Users/iacopomarmorini/.pyenv/versions/3.6.3/lib/python3.6/inspect.py", line 1072, in getargspec
    raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use getfullargspec() API which can support them
Click coordinates: (224, 361). Grid coordinates: (10, 6)

@pvcraven pvcraven added the bug label Nov 26, 2017

@pvcraven pvcraven added this to the 1.2.2 milestone Nov 26, 2017

@pvcraven

This comment has been minimized.

Show comment
Hide comment
@pvcraven

pvcraven Nov 26, 2017

Owner

Already fixed in the 1.2.2 branch with this check in: b207a46

Owner

pvcraven commented Nov 26, 2017

Already fixed in the 1.2.2 branch with this check in: b207a46

@pvcraven

This comment has been minimized.

Show comment
Hide comment
@pvcraven

pvcraven Dec 2, 2017

Owner

Closed, implemented in 1.2.2 which is now deployed on PyPi.

Owner

pvcraven commented Dec 2, 2017

Closed, implemented in 1.2.2 which is now deployed on PyPi.

@pvcraven pvcraven closed this Dec 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment