We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Eel version 0.16.0
Describe the bug At seemingly random, eel never exits the loading page To Reproduce Steps to reproduce the behavior:
Expected behavior The page should have loaded properly every time System Information
Additional context as reccomended by #393, i added the print statement. Every file parses even when it doesnt load properly.
import chess import eel board = chess.Board() print("Initialised") @eel.expose def _validate_move(source, destination, piece) -> bool: if not (board.turn == chess.WHITE and piece[0] == "w" or board.turn == chess.BLACK and piece[0] == "b") or source == destination: return False if chess.Move.from_uci(f"{source}{destination}") in board.legal_moves: board.push(chess.Move.from_uci(f"{source}{destination}")) print(board.fen()) return True else: return False print("F") eel.init(r"D:\coding\Python\chess\opening_trainer\eel_app\web") eel.start("main.html",disable_cache=True) print("G")
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/chessboard-1.0.0.min.css"> <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script src="js/chessboard-1.0.0.min.js"></script> <script src="mainjs.js" defer></script> <script type="text/javascript" src="/eel.js"></script> <link rel="stylesheet" href="main.css"></linkt> </head> <body> <div id="main-container" class="main-horizongal-flex"> <div id="board-and-pgn-container"> <div id="board" style="width: 400px"></div> <div id="pgn">PGN HERE</div> </div> <div id="moves-container"> <ul id="moves" class="moves-options"> <li>Move 1</li> <li>Move 2</li> </ul> </div> </div> </body> </html>
let config = { draggable: true, position: 'start', onDrop: onDrop } let board = ChessBoard("board", config); function move(source, target, piece, newPos){ board.position(newPos,false); if(piece=="wK"&&source=="e1"&&(target=="g1"||target=="c1")){ if(target=="g1"){ board.move("h1-f1"); } else{ board.move("a1-d1"); } } else if(piece=="bK"&&source=="e8"&&(target=="g8"||target=="c8")){ if(target=="g8"){ board.move("h8-f8"); } else{ board.move("a8-d8"); } } } async function moveIfValid(source, target, piece, newPos){ await eel._validate_move(source, target, piece)(function(result){ if(result==true){ move(source, target, piece,newPos); } }) } function onDrop(source, target, piece, newPos, oldPos, orientation){ moveIfValid(source, target,piece, newPos); return "snapback"; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Eel version
0.16.0
Describe the bug
At seemingly random, eel never exits the loading page
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The page should have loaded properly every time
System Information
Additional context
as reccomended by #393, i added the print statement. Every file parses even when it doesnt load properly.
The text was updated successfully, but these errors were encountered: