Open kusayuzayushko opened 1 year ago
index 200e4c7..96588c9 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,5 +5,4 @@ PyAutoGUI~=0.9.53
chess~=1.9.3
stockfish~=3.28.0
packaging~=21.3
-keyboard~=0.13.5
-PyQt5~=5.15.7
\ No newline at end of file
+PyQt5~=5.15.7
diff --git a/src/gui.py b/src/gui.py
index 3b1fab5..c91a1c1 100644
--- a/src/gui.py
+++ b/src/gui.py
@@ -12,7 +12,6 @@ from webdriver_manager.chrome import ChromeDriverManager
from overlay import run
from stockfish_bot import StockfishBot
from selenium.common import WebDriverException
-import keyboard
class GUI:
@@ -346,11 +345,6 @@ class GUI:
if not self.opened_browser:
continue
- if keyboard.is_pressed("1"):
- self.on_start_button_listener()
- elif keyboard.is_pressed("2"):
- self.on_stop_button_listener()
-
def on_open_browser_button_listener(self):
# Set Opening Browser button state to opening
self.opening_browser = True
diff --git a/src/stockfish_bot.py b/src/stockfish_bot.py
index 415c599..db08110 100644
--- a/src/stockfish_bot.py
+++ b/src/stockfish_bot.py
@@ -11,7 +11,6 @@ import re
from grabbers.chesscom_grabber import ChesscomGrabber
from grabbers.lichess_grabber import LichessGrabber
from utilities import char_to_num
-import keyboard
class StockfishBot(multiprocess.Process):
@@ -192,9 +191,6 @@ class StockfishBot(multiprocess.Process):
((int(move_start_pos[0]), int(move_start_pos[1])), (int(move_end_pos[0]), int(move_end_pos[1]))),
])
while True:
- if keyboard.is_pressed("3"):
- break
-
if len(move_list) != len(self.grabber.get_move_list()):
self_moved = True
move_list = self.grabber.get_move_list()
quick and dirty attempt to get rid of keyboard
. Bot is now starting but only detecting a game against bots. If I run it in a game against other players if i logged in to chess.com. Playing as a guest against other players work just fine.
<class 'selenium.common.exceptions.StaleElementReferenceException'> stockfish_bot.py 241
list index out of range
<class 'IndexError'> stockfish_bot.py 128
UPD: it works just fine with a fresh account.
Linux users can't just run it with sudo, this will cause issues with graphical apps that use X (chrome, for example).