dvalters / fuse-netcdf

ESoWC project to develop a Python utility to mount NetCDF files as a file-system in user space. (FUSE)
Other
8 stars 3 forks source link

Error in getattr #6

Closed dvalters closed 6 years ago

dvalters commented 6 years ago

Running python fuse-netcdf/fusenetcdf.py trial/testsource/ trial/mntpoint/

At current commit 9f292d5, mounting the netcdf file results in (going through the pdb debugger):

(fusepy27) [dav@dav-crew-204-workstation fuse-netcdf]$ python fuse-netcdf/fusenetcdf.py trial/testsource/ trial/mntpoint/
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(80)getattr()
-> if self.dataset_file != None:
(Pdb) > /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(80)getattr()
-> if self.dataset_file != None:
n
(Pdb) > /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(83)getattr()
-> st = os.lstat(self.fullpath)
n
(Pdb) > /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(83)getattr()
-> st = os.lstat(self.fullpath)
n
(Pdb) OSError: (2, 'No such file or directory', '/home/dav/devel/fuse-netcdf/trial/testsource/.Trash')
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(83)getattr()
-> st = os.lstat(self.fullpath)

(Pdb) > /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(85)getattr()
-> statdict = dict((key, getattr(st, key)) for key in ('st_atime', 'st_ctime',

(Pdb) --Return--
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(83)getattr()->None
-> st = os.lstat(self.fullpath)

(Pdb) > /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(86)getattr()
-> 'st_gid', 'st_mode', 'st_mtime', 'st_nlink', 'st_size', 'st_uid'))

(Pdb) OSError: (2, 'No such file or directory', '/home/dav/devel/fuse-netcdf/trial/testsource/.Trash')
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(155)getattr()
-> return self.PotentialNetCDFFile(path).getattr()

(Pdb) > /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(88)getattr()
-> if self.dataset_file != None:

(Pdb) --Return--
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(155)getattr()->None
-> return self.PotentialNetCDFFile(path).getattr()

(Pdb) > /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(95)getattr()
-> return statdict

(Pdb) OSError: (2, 'No such file or directory', '/home/dav/devel/fuse-netcdf/trial/testsource/.Trash')
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(800)__call__()
-> return getattr(self, op)(*args)

(Pdb) --Return--
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(95)getattr()->{'st_atime': 1528991465.1927907, 'st_ctime': 1528990904.473378, 'st_gid': 1000, 'st_mode': 16893, ...}
-> return statdict

(Pdb) --Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(800)__call__()->None
-> return getattr(self, op)(*args)

(Pdb) --Return--
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(155)getattr()->{'st_atime': 1528991465.1927907, 'st_ctime': 1528990904.473378, 'st_gid': 1000, 'st_mode': 16893, ...}
-> return self.PotentialNetCDFFile(path).getattr()

(Pdb) OSError: (2, 'No such file or directory', '/home/dav/devel/fuse-netcdf/trial/testsource/.Trash')
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(27)__call__()
-> return super(NetCDFFUSE, self).__call__(operation, self.filerootdir + path, *args)

(Pdb) --Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(800)__call__()->{'st_atime': 1528991465.1927907, 'st_ctime': 1528990904.473378, 'st_gid': 1000, 'st_mode': 16893, ...}
-> return getattr(self, op)(*args)

(Pdb) --Return--
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(27)__call__()->None
-> return super(NetCDFFUSE, self).__call__(operation, self.filerootdir + path, *args)

(Pdb) --Return--
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(27)__call__()->{'st_atime': 1528991465.1927907, 'st_ctime': 1528990904.473378, 'st_gid': 1000, 'st_mode': 16893, ...}
-> return super(NetCDFFUSE, self).__call__(operation, self.filerootdir + path, *args)

(Pdb) OSError: (2, 'No such file or directory', '/home/dav/devel/fuse-netcdf/trial/testsource/.Trash')
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(759)fgetattr()
-> attrs = self.operations('getattr', self._decode_optional_path(path), fh)

(Pdb) > /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(760)fgetattr()
-> set_st_attrs(st, attrs)

(Pdb) --Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(759)fgetattr()->None
-> attrs = self.operations('getattr', self._decode_optional_path(path), fh)

(Pdb) > /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(761)fgetattr()
-> return 0

(Pdb) OSError: (2, 'No such file or directory', '/home/dav/devel/fuse-netcdf/trial/testsource/.Trash')
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(511)getattr()
-> return self.fgetattr(path, buf, None)

(Pdb) --Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(761)fgetattr()->0
-> return 0

(Pdb) --Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(511)getattr()->None
-> return self.fgetattr(path, buf, None)

(Pdb) --Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(511)getattr()->0
-> return self.fgetattr(path, buf, None)

(Pdb) OSError: (2, 'No such file or directory', '/home/dav/devel/fuse-netcdf/trial/testsource/.Trash')
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(495)_wrapper()
-> return func(*args, **kwargs) or 0

(Pdb) --Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(495)_wrapper()->0
-> return func(*args, **kwargs) or 0

(Pdb) > /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(496)_wrapper()
-> except OSError as e:

(Pdb) 
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(497)_wrapper()
-> return -(e.errno or EFAULT)
(Pdb) 
--Return--
> /home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py(497)_wrapper()->-2
-> return -(e.errno or EFAULT)
(Pdb) 
> /home/dav/devel/fuse-netcdf/fuse-netcdf/fusenetcdf.py(80)getattr()
-> if self.dataset_file != None:

Then on exit of pdb:

Traceback (most recent call last):
  File "/home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py", line 495, in _wrapper
    return func(*args, **kwargs) or 0
  File "/home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py", line 511, in getattr
    return self.fgetattr(path, buf, None)
  File "/home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py", line 759, in fgetattr
    attrs = self.operations('getattr', self._decode_optional_path(path), fh)
  File "fuse-netcdf/fusenetcdf.py", line 27, in __call__
    return super(NetCDFFUSE, self).__call__(operation, self.filerootdir + path, *args)
  File "/home/dav/venvs/fusepy27/lib/python2.7/site-packages/fuse.py", line 800, in __call__
    return getattr(self, op)(*args)
  File "fuse-netcdf/fusenetcdf.py", line 155, in getattr
    return self.PotentialNetCDFFile(path).getattr()
  File "fuse-netcdf/fusenetcdf.py", line 80, in getattr
    if self.dataset_file != None:
  File "fuse-netcdf/fusenetcdf.py", line 80, in getattr
    if self.dataset_file != None:
  File "/home/dav/anaconda2/lib/python2.7/bdb.py", line 49, in trace_dispatch
    return self.dispatch_line(frame)
  File "/home/dav/anaconda2/lib/python2.7/bdb.py", line 68, in dispatch_line
    if self.quitting: raise BdbQuit
BdbQuit

(repeated)

dvalters commented 6 years ago

Was fixed during intensive debugging session, probably typo related....