Car-Recognition icon indicating copy to clipboard operation
Car-Recognition copied to clipboard

Typo in analyze.py

Open JamesMDe opened this issue 4 years ago • 1 comments

Hello,

My coworker and I were trying to run analyze.py and received the following error:

Traceback (most recent call last): File "analyze.py", line 106, in y_pred, y_test = predict('data/valid', model) File "analyze.py", line 44, in predict class_id = int(tokens[-2]) IndexError: list index out of range

It appears that os.pathsep that is passed into the split function on line 44 in analyze.py is using a ':' as a delimiter instead of a '/'. Replacing this with os.path.sep fixes the issue.

JamesMDe avatar Apr 21 '20 19:04 JamesMDe

Use this instead of the one in the code it will solve the problem. tokens=img_path.split('\')

(Use back Slash twice)

Usman-Ghani123 avatar Apr 22 '20 04:04 Usman-Ghani123