-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
- Error when a Python file is located in the project root directory
Traceback (most recent call last):
File "/root/huangjinpeng/RepoGraph/./repograph/construct_graph.py", line 538, in <module>
tags, G = code_graph.get_code_graph(chat_fnames_new)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/huangjinpeng/RepoGraph/./repograph/construct_graph.py", line 82, in get_code_graph
tags = self.get_tag_files(other_files, mentioned_fnames)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/huangjinpeng/RepoGraph/./repograph/construct_graph.py", line 89, in get_tag_files
tags = self.get_ranked_tags(other_files, mentioned_fnames)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/huangjinpeng/RepoGraph/./repograph/construct_graph.py", line 410, in get_ranked_tags
tags = list(self.get_tags(fname, rel_fname))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/huangjinpeng/RepoGraph/./repograph/construct_graph.py", line 197, in get_tags
data = list(self.get_tags_raw(fname, rel_fname))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/huangjinpeng/RepoGraph/./repograph/construct_graph.py", line 206, in get_tags_raw
s = s[fname_part]
Fix:Add the following lines after s = deepcopy(self.structure) in the get_tags_raw function:
if len(ref_fname_lst) == 1:
s = s[self.root.split('/')[-1]]
tag['name']causes an error intag_to_graph.py
Fix:Change tag['name'] to tag.name.
Dilrevx, No1res and Hazer-BJTU
Metadata
Metadata
Assignees
Labels
No labels