potassco / clintest

🧪 A test framework for clingo programs
https://potassco.org/clintest/
MIT License
7 stars 1 forks source link

Encoding file value #6

Closed owrel closed 2 years ago

owrel commented 2 years ago

When value of the the key 'encodingFileList' is just a string, loading is not working properly

'list' object has no attribute 'encode'
Traceback (most recent call last):
  File "/home/owrel/miniconda3/envs/asp/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/owrel/miniconda3/envs/asp/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/owrel/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/__main__.py", line 45, in <module>
    cli.main()
  File "/home/owrel/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 444, in main
    run()
  File "/home/owrel/.vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/../debugpy/server/cli.py", line 285, in run_file
    runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
  File "/home/owrel/miniconda3/envs/asp/lib/python3.9/runpy.py", line 268, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/home/owrel/miniconda3/envs/asp/lib/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/home/owrel/miniconda3/envs/asp/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "runtest.py", line 47, in <module>
    raise e
  File "runtest.py", line 43, in <module>
    ct(display=False)
  File "/home/owrel/Documents/RESEARCH_WORK/clintest/clintest/__init__.py", line 217, in __call__
    self.runTest(test,c,mr)
  File "/home/owrel/Documents/RESEARCH_WORK/clintest/clintest/__init__.py", line 159, in runTest
    ctl.load(f)
  File "/home/owrel/miniconda3/envs/asp/lib/python3.9/site-packages/clingo/control.py", line 363, in load
    _handle_error(_lib.clingo_control_load(self._rep, path.encode()))
AttributeError: 'list' object has no attribute 'encode'