0

tried to run docly to auto generate some comments for my python code. installation went smooth:

pip install -U PyYAML pip install docly

however, when trying to process the first file via:

docly-gen first_file.py

there keeps coming the error

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/docly-gen", line 11, in <module>
    load_entry_point('docly==0.3.0', 'console_scripts', 'docly-gen')()
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/docly/cli/docly_gen.py", line 237, in main
    table_rows, docstr_loc, ipynb_files = _process(args, model, tokenizer, ts_lib_path, config)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/halo/halo.py", line 132, in wrapped
    return f(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/docly/cli/docly_gen.py", line 154, in _process
    for code_tokens, params, start_index, function_name, ds in process_file(f_path, ts_lib_path, args.use_old_model):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/docly/ioutils/__init__.py", line 125, in process_file
    result, parser_obj = py_parser.parse(file_path, ts_lib_path)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/docly/parser/parser.py", line 11, in parse
    python_parser = PythonParser(library_loc=tslib_path)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tree_hugger/core/parser/python/python_parser.py", line 35, in __init__
    super(PythonParser, self).__init__('python', 'python_queries', PythonParser.QUERY_FILE_PATH, library_loc)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tree_hugger/core/code_parser.py", line 41, in __init__
    self.parser.set_language(self.language)
ValueError: Incompatible Language version 11. Must be between 13 and 14

already tried playing around with different versions of tree-sitter anyone has an idea for a fix?

thanks. much appreciated.

0 Answers0