dn1z / pgn2gif

A small tool that generates gif of a chess game
MIT License
104 stars 13 forks source link

Error during execution #6

Closed sohrabtowfighi closed 6 years ago

sohrabtowfighi commented 6 years ago

Traceback (most recent call last): File "pgn2gif.py", line 311, in process_file(args.path, args.speed, args.out, args.reverse) File "pgn2gif.py", line 295, in process_file create_gif(pgn, name, duration, output_dir, reverse) File "pgn2gif.py", line 272, in create_gif update(move, i % 2) File "pgn2gif.py", line 58, in update to = point_of_square(move) File "pgn2gif.py", line 41, in point_of_square r = 7 - rows.index(move[-1]) ValueError: '0' is not in list

If anyone stumbles on this issue, I noticed that get_moves_from_pgn regex may fail if pgn tags have usernames or other info matching regex

I noticed that my pgn file has this line [White "bac02"], which when deleted makes the code run fine. Thanks!

dn1z commented 6 years ago

I updated regex and it should work now. But beware using chess-move like username. Thanks for reporting also.