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

python3 test.py findbest tests/mate1.fen raises IndexError #32

Closed
rodrigob opened this issue Aug 25, 2015 · 1 comment
Closed

python3 test.py findbest tests/mate1.fen raises IndexError #32

rodrigob opened this issue Aug 25, 2015 · 1 comment

Comments

@rodrigob
Copy link

python3 test.py findbest tests/mate1.fen returns

Calibrating search speed...
Running benchmark with 3897.0 nodes per second...
------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 392, in <module>
    main()
  File "test.py", line 385, in main
    args, unknown = parser.parse_known_args()
  File "/usr/lib/python3.4/argparse.py", line 1758, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.4/argparse.py", line 1967, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/usr/lib/python3.4/argparse.py", line 1923, in consume_positionals
    take_action(action, args)
  File "/usr/lib/python3.4/argparse.py", line 1832, in take_action
    action(self, namespace, argument_values, option_string)
  File "/usr/lib/python3.4/argparse.py", line 1134, in __call__
    namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
  File "/usr/lib/python3.4/argparse.py", line 1758, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python3.4/argparse.py", line 1967, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/usr/lib/python3.4/argparse.py", line 1923, in consume_positionals
    take_action(action, args)
  File "/usr/lib/python3.4/argparse.py", line 1832, in take_action
    action(self, namespace, argument_values, option_string)
  File "test.py", line 321, in __call__
    f(namespace)
  File "test.py", line 383, in <lambda>
    add_action(p, lambda n: findbest(n.file, n.times))
  File "test.py", line 291, in findbest
    fen, opts = parseEPD(line)
  File "test.py", line 275, in parseEPD
    opts = dict(p.split(maxsplit=1) for p in parts[6].split(';'))
IndexError: list index out of range
@thomasahle
Copy link
Owner

Findbest is actually supposed to be used just for 'epd' files with tags indicating the best move.

However, I've made it work anyways. Thanks!

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

2 participants