Python Easy Chess GUI

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Ferdy
Posts: 4113
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Sat Oct 12, 2019 9:28 am


dannyb
Posts: 60
Joined: Mon Jul 09, 2018 4:08 pm
Full name: Daniel Bennett

Re: Python Easy Chess GUI

Post by dannyb » Sun Oct 13, 2019 5:12 pm

thank you Ferdinand for this release. I used it a bit in june when you first released it and really liked it. Looking forward to see what are the changes in this new version.

User avatar
Ovyron
Posts: 2833
Joined: Tue Jul 03, 2007 2:30 am

Re: Python Easy Chess GUI

Post by Ovyron » Sun Oct 13, 2019 6:05 pm

I was wondering if it'd be possible to make Python Easy Chess GUI accessible from a web page? chessdb.cn/queryc_en/ has shown that you don't need to download or install anything, you go there and it works, and works well.

ChessDB looks to me like "the future" and I dream of a day where people don't need to install Chess GUIs or engines in their system anymore, they go to a webpage like that and they can use the engines directly from their browser (maybe even from other people's computers?! :shock: Imagine someone from their mobile accessing someone's 40cores machine), and if this is going to happen I wonder who will do it first.
Great spirits have always encountered violent opposition from mediocre minds.

JohnWoe
Posts: 103
Joined: Sat Mar 02, 2013 10:31 pm

Re: Python Easy Chess GUI

Post by JohnWoe » Sun Oct 13, 2019 10:34 pm

Great work!
I tried to play on it Sapeli. After installing tons of stuff I got into this.
Image

Ferdy
Posts: 4113
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Mon Oct 14, 2019 2:46 am

JohnWoe wrote:
Sun Oct 13, 2019 10:34 pm
Great work!
I tried to play on it Sapeli. After installing tons of stuff I got into this.
Image
What OS do you use? This GUI is powered by python-chess to run the engine. Could you post the relevant log?


On windows 7 using gui exe file, it worked just fine.

Image

Ferdy
Posts: 4113
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Mon Oct 14, 2019 3:17 am

Ovyron wrote:
Sun Oct 13, 2019 6:05 pm
I was wondering if it'd be possible to make Python Easy Chess GUI accessible from a web page? chessdb.cn/queryc_en/ has shown that you don't need to download or install anything, you go there and it works, and works well.
PECG is based from PySimpleGUI and there is PySimpleGUIWeb, perhaps it is possible to make it run in a web page. But have not researched it deeply yet. But I can query ChessDB and show it in the GUI. I did try it before and it worked. After v1.0, its GUI design will be revised as analysis mode and other stuff will be added.
ChessDB looks to me like "the future" and I dream of a day where people don't need to install Chess GUIs or engines in their system anymore, they go to a webpage like that and they can use the engines directly from their browser (maybe even from other people's computers?! :shock: Imagine someone from their mobile accessing someone's 40cores machine), and if this is going to happen I wonder who will do it first.
A user on mobile accessing more powerful remote computer was already done by chess for android, droidfish and chess repertoire manager, perhaps there are others.

JohnWoe
Posts: 103
Joined: Sat Mar 02, 2013 10:31 pm

Re: Python Easy Chess GUI

Post by JohnWoe » Mon Oct 14, 2019 6:22 am

OS on this comp:

Code: Select all

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
I needed to install tons of python stuff w/ pip3.
Then run python3 that GUI.

Code: Select all

python3 python_easy_chess_gui.py
It barely runs on Linux.
This experience reminds why I abandoned my GUI project for Sapeli :lol:

This is the error log:

Code: Select all

2019-10-14 08:41:15,635 :: play_game :: line: 2126 :: WARNING :: GUI book is missing.
2019-10-14 08:41:15,636 :: run :: line: 450 :: ERROR :: Failed to start sapeli.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 443, in run
    creationflags=subprocess.CREATE_NO_WINDOW)
AttributeError: module 'subprocess' has no attribute 'CREATE_NO_WINDOW'
2019-10-14 08:41:15,740 :: update_text_box :: line: 1249 :: ERROR :: Engine sent None.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 1247, in update_text_box
    best_move = chess.Move.from_uci(msg.split()[1])
  File "/home/comp/.local/lib/python3.6/site-packages/chess/__init__.py", line 512, in from_uci
    from_square = SQUARE_NAMES.index(uci[0:2])
ValueError: 'No' is not in list
2019-10-14 08:41:23,070 :: play_game :: line: 2235 :: INFO :: engine msg: bestmove None
2019-10-14 08:41:23,071 :: quit_engine :: line: 597 :: INFO :: quit engine
2019-10-14 08:41:23,071 :: quit_engine :: line: 601 :: INFO :: AttributeError, self.engine is already None
2019-10-14 08:41:23,071 :: play_game :: line: 2322 :: INFO :: Saving game automatically
2019-10-14 08:41:27,097 :: main_loop :: line: 2566 :: INFO :: Quit app from main loop, X is pressed.
I tried Sapeli on Pychess.

PyChess vs Sapeli 1.53. Normal chess.
Image

PyChess vs Sapeli 1.53. Chess960.
Image

Sapeli also supports KOTH but PyChess doesn't recognize it. Can't play matches etc.

Ferdy
Posts: 4113
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: Python Easy Chess GUI

Post by Ferdy » Mon Oct 14, 2019 6:48 am

JohnWoe wrote:
Mon Oct 14, 2019 6:22 am
OS on this comp:

Code: Select all

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
I needed to install tons of python stuff w/ pip3.
Then run python3 that GUI.

Code: Select all

python3 python_easy_chess_gui.py
It barely runs on Linux.
This experience reminds why I abandoned my GUI project for Sapeli :lol:

This is the error log:

Code: Select all

2019-10-14 08:41:15,635 :: play_game :: line: 2126 :: WARNING :: GUI book is missing.
2019-10-14 08:41:15,636 :: run :: line: 450 :: ERROR :: Failed to start sapeli.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 443, in run
    creationflags=subprocess.CREATE_NO_WINDOW)
AttributeError: module 'subprocess' has no attribute 'CREATE_NO_WINDOW'
2019-10-14 08:41:15,740 :: update_text_box :: line: 1249 :: ERROR :: Engine sent None.
Traceback (most recent call last):
  File "python_easy_chess_gui.py", line 1247, in update_text_box
    best_move = chess.Move.from_uci(msg.split()[1])
  File "/home/comp/.local/lib/python3.6/site-packages/chess/__init__.py", line 512, in from_uci
    from_square = SQUARE_NAMES.index(uci[0:2])
ValueError: 'No' is not in list
2019-10-14 08:41:23,070 :: play_game :: line: 2235 :: INFO :: engine msg: bestmove None
2019-10-14 08:41:23,071 :: quit_engine :: line: 597 :: INFO :: quit engine
2019-10-14 08:41:23,071 :: quit_engine :: line: 601 :: INFO :: AttributeError, self.engine is already None
2019-10-14 08:41:23,071 :: play_game :: line: 2322 :: INFO :: Saving game automatically
2019-10-14 08:41:27,097 :: main_loop :: line: 2566 :: INFO :: Quit app from main loop, X is pressed.
One issue is this.
Traceback (most recent call last):
File "python_easy_chess_gui.py", line 443, in run
creationflags=subprocess.CREATE_NO_WINDOW)
AttributeError: module 'subprocess' has no attribute 'CREATE_NO_WINDOW'
It seems like your python is below 3.7.

PECG is designed for Python 3.7 and up, see other requirements at https://github.com/fsmosca/Python-Easy-Chess-GUI.

Post Reply