Skip to content
New issue

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

Setting ACPL headers on a root node fails due to new validation in python-chess #20

Closed
clicketyclack opened this issue Oct 26, 2018 · 0 comments

Comments

@clicketyclack
Copy link
Contributor

Running the annotator now gives an exception:

$ python3 -m annotator -f Olafsson.pgn -g 0.01

An unhandled exception occurred: <class 'TypeError'>
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/shifty/github/cc-python-chess-annotator/annotator/__main__.py", line 759, in <module>
    main()
  File "/home/shifty/github/cc-python-chess-annotator/annotator/__main__.py", line 749, in main
    raise e
  File "/home/shifty/github/cc-python-chess-annotator/annotator/__main__.py", line 743, in main
    analyzed_game = analyze_game(game, args.gametime, args.engine, args.threads)
  File "/home/shifty/github/cc-python-chess-annotator/annotator/__main__.py", line 642, in analyze_game
    game = add_acpl(game, root_node)
  File "/home/shifty/github/cc-python-chess-annotator/annotator/__main__.py", line 490, in add_acpl
    node.root().headers["WhiteACPL"] = round(acpl(white_cpl))
  File "/home/shifty/github/cc-python-chess-annotator/lib/python3.6/site-packages/chess/pgn.py", line 532, in __setitem__
    elif "\n" in value or "\r" in value:
TypeError: argument of type 'int' is not iterable
$ 

Seems to be due to value validation niklasf/python-chess@c19acb9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant