SoftwareUnderstanding / inspect4py

Static code analysis package for Python repositories
https://inspect4py.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
27 stars 10 forks source link

Combination of directory tree (-dt) and software invocation (-si) flags causes error #382

Closed WilliamsCJ closed 1 year ago

WilliamsCJ commented 1 year ago

Example using pyLODE repository:

inspect4py -i pyLODE -o pyLODE-out -dt -si

Output:

Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/miniforge/base/envs/inspect4py/bin/inspect4py", line 33, in <module>
    sys.exit(load_entry_point('inspect4py', 'console_scripts', 'inspect4py')())
  File "/opt/homebrew/Caskroom/miniforge/base/envs/inspect4py/lib/python3.8/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/inspect4py/lib/python3.8/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/inspect4py/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/homebrew/Caskroom/miniforge/base/envs/inspect4py/lib/python3.8/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/cjwilliams/GitHub/inspect4py/inspect4py/cli.py", line 1333, in main
    all_soft_invocation_info_list = extract_software_invocation(dir_info, directory_tree_info, input_path,
  File "/Users/cjwilliams/GitHub/inspect4py/inspect4py/utils.py", line 169, in extract_software_invocation
    if elem["main_info"]["main_flag"]:
TypeError: string indices must be integers
dgarijo commented 1 year ago

Can you please indicate your python version?

rosafilgueira commented 1 year ago

I have fixed the issue! It should work now