ardamavi / Game-Bot

Artificial intelligence learn playing any game with watching you.
Apache License 2.0
450 stars 117 forks source link

Lots of errors #39

Open Scarlet729 opened 1 year ago

Scarlet729 commented 1 year ago

Hey guys sorry if this is a stupid question but i have everything set up-i think_ and when i run the create dataset file all that comes up is a bunch of errors:

C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py:33: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead. img = img.resize((img.size[0] / 12, img.size[1] / 12), resample=Image.BICUBIC) Unhandled exception in listener callback Traceback (most recent call last): File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util__init.py", line 228, in inner return f(self, *args, kwargs) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput\keyboard_win32.py", line 287, in _process self.on_press(key) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util__init.py", line 144, in inner if f(*args) is False: File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 128, in on_press save_event_keyboard(data_path, 1, key) File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 48, in save_event_keyboard screenshot = get_screenshot() File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 33, in get_screenshot img = img.resize((img.size[0] / 12, img.size[1] / 12), resample=Image.BICUBIC) File "C:\Users\redHe\anaconda3\lib\site-packages\PIL\Image.py", line 2082, in resize return self._new(self.im.resize(size, resample, box)) TypeError: integer argument expected, got float Traceback (most recent call last): File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 151, in main() File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 147, in main listen_keyboard() File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 134, in listen_keyboard listener.join() File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util__init__.py", line 276, in join six.reraise(exc_type, exc_value, exc_traceback) File "C:\Users\redHe\anaconda3\lib\site-packages\six.py", line 718, in reraise raise value.with_traceback(tb) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\init__.py", line 228, in inner return f(self, *args, kwargs) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput\keyboard_win32.py", line 287, in _process self.on_press(key) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\init__.py", line 144, in inner if f(*args) is False: File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 128, in on_press save_event_keyboard(data_path, 1, key) File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 48, in save_event_keyboard screenshot = get_screenshot() File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 33, in get_screenshot img = img.resize((img.size[0] / 12, img.size[1] / 12), resample=Image.BICUBIC) File "C:\Users\redHe\anaconda3\lib\site-packages\PIL\Image.py", line 2082, in resize return self._new(self.im.resize(size, resample, box)) TypeError: integer argument expected, got float Unhandled exception in listener callback Traceback (most recent call last): File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\win32.py", line 386, in _handler converted = self._convert(code, msg, lpdata) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\win32.py", line 401, in _convert raise NotImplementedError() NotImplementedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util__init.py", line 228, in inner return f(self, *args, **kwargs) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\win32.py", line 390, in _handler self._handle(code, msg, lpdata) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput\mouse_win32.py", line 208, in _handle self.on_move(data.pt.x, data.pt.y) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\init__.py", line 144, in inner if f(*args) is False: TypeError: on_move() takes 1 positional argument but 2 were given Process Process-1: Traceback (most recent call last): File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\win32.py", line 386, in _handler converted = self._convert(code, msg, lpdata) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\win32.py", line 401, in _convert raise NotImplementedError() NotImplementedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\redHe\anaconda3\lib\multiprocessing\process.py", line 315, in _bootstrap self.run() File "C:\Users\redHe\anaconda3\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, *self._kwargs) File "C:\Users\redHe\PycharmProjects\pythonProject\venv\create_dataset.py", line 115, in listen_mouse listener.join() File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util__init.py", line 276, in join six.reraise(exc_type, exc_value, exc_traceback) File "C:\Users\redHe\anaconda3\lib\site-packages\six.py", line 718, in reraise raise value.with_traceback(tb) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\init__.py", line 228, in inner return f(self, args, *kwargs) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util\win32.py", line 390, in _handler self._handle(code, msg, lpdata) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput\mouse_win32.py", line 208, in _handle self.on_move(data.pt.x, data.pt.y) File "C:\Users\redHe\anaconda3\lib\site-packages\pynput_util__init__.py", line 144, in inner if f(args) is False: TypeError: on_move() takes 1 positional argument but 2 were given