zhoubolei / TRN-pytorch

Temporal Relation Networks
http://relation.csail.mit.edu/
Other
787 stars 190 forks source link

TypeError: expected str, bytes or os.PathLike object, not int #60

Open anti199994 opened 5 years ago

anti199994 commented 5 years ago

Traceback (most recent call last): File "/home/ubuntu/TRN-pytorch/process_dataset.py", line 38, in idx_categories.append(os.path.join(dict_categories[items[1]])) File "/home/ubuntu/anaconda3/lib/python3.6/posixpath.py", line 80, in join a = os.fspath(a) TypeError: expected str, bytes or os.PathLike object, not int

I want to kmow how to solve this problem?

Ego-J commented 4 years ago

idx_categories.append(os.path.join(dict_categories[items[1]]))

changing this line to idx_categories.append(dict_categories[items[1]]) may help