Not reading directory from absolute path

refDir = r'/media/banikr2/DATA/Diesel_block/4_refocus'
refFiles = sorted(glob(os.path.join(refDir, '*.tif')))#.sort()
len(refFiles)
>> 0

shows 0
But there are files in the directory.
If I manually go to the folder (using mouse clicks) /media/banikr2/DATA then the code works.

len(refFiles)
>> 294

So strange and weird behavior. Couldn’t find the reason.