Closed GabbySuwichaya closed 2 years ago
Hello, sorry for the late reply. Have you managed to solve your problem by now? If not, could you inspect what the offending name is (the ix
variable in line 68)?
@jatentaki I am back ... I debuged with pdb.set_trace()....
It shows that ix
is "/mnt" .. ?
I guess that "/mnt"is a part of my path to the saved descriptor : /mnt/HDD4TB2/Disk-NIPS2020/H5_destination
Could you please help? What does this actually mean? And how to solve it ...?
Line 69 def __getitem__(self, ix):
Line 70 pdb.set_trace()
Line 71 descriptors = self.ds_file[ix][()]
But is it really ix == mnt
that causes the exception or is it sometime later in the execution? Can you modify the code like this?
def __getitem__(self, ix):
try:
descriptors = self.ds_file[ix][()]
except AttributeError:
print(f'Offending attribute {ix=}')
raise
...
but you're right that this mnt
looks suspicious. In that case, I'd expect something wrong is going in detect.py. There are two relevant lines: splitting off the extension names would propagate the /mnt
absolute prefix, but that prefix shouldn't be there in the first place because of listdir which normally returns file/directory names and not their paths.
Could you please give some help to solve the following problem?
I have tested the matching with two images.
In
/mnt/HDD4TB2/Disk-NIPS2020/H5_destination
...there are three files generated bydetect.py
:I have executed the following command:
However, I have received the following problem: