pyfilesystem
pyfilesystem copied to clipboard
tahoe: setattr(st, key, val) TypeError: an integer is required
> What steps will reproduce the problem?
1. mount https://tahoe-lafs.org/trac/tahoe-lafs/wiki/TestGrid
2. find(1) over it
> What is the expected output?
File listing, as the dirs are accessible fine via the tahoe web interface.
> What do you see instead?
.
./Fractal_Cheetah_1_by_artofpain.jpg
./count
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 333, in _wrapper_
return func(*args, **kwargs) or 0
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 464, in readdir
set_st_attrs(st, attrs)
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 282, in set_st_attrs
setattr(st, key, val)
TypeError: an integer is required
./juice
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 333, in _wrapper_
return func(*args, **kwargs) or 0
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 464, in readdir
set_st_attrs(st, attrs)
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 282, in set_st_attrs
setattr(st, key, val)
TypeError: an integer is required
./mdmf
./Crypto Research
./Crypto Research/SODA10_101_goodrichm.pdf
./Crypto Research/How to Break MD5 and Other Hash Functions.pdf
./Crypto Research/timelock.pdf
./Crypto Research/Maurer02b.pdf
./Crypto Research/407.pdf
./Crypto
Research/Carstensen-2011-Robust_Resource_Allocation_In_Distributed_Filesystem.pd
f
./Crypto Research/stebila.pdf
./TahoeGPG.key
./yllchi
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 333, in _wrapper_
return func(*args, **kwargs) or 0
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 464, in readdir
set_st_attrs(st, attrs)
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse_ctypes.py", line 282, in set_st_attrs
setattr(st, key, val)
TypeError: an integer is required
in the HEAD version it's quite the same except it hangs for a while and then
Traceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse3.py", line 293, in _wrapper_
return func(*args, **kwargs) or 0
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse3.py", line 423, in readdir
set_st_attrs(st, attrs)
File "/usr/lib64/python2.7/site-packages/fs/expose/fuse/fuse3.py", line 238, in set_st_attrs
setattr(st, key, val)
TypeError: an integer is required
> What version of the product are you using? On what operating system?
0.4.1.821 and HEAD on Gentoo.
Original issue reported on code.google.com by [email protected] on 15 Mar 2015 at 10:31
Looks like Tahoe must be returning some 'c_stat' attribute which isn't in the
expected integer format (but only for some files, not all of them).
Could you modify the 'set_st_attrs' function in fuse_ctypes.py (or fuse3.py
depending on which version you're testing with) and change the bit that says:
setattr(st, key, val)
to:
try:
setattr(st, key, val)
except:
print "Couldn't set %s attr %s to %s" % (type(key), key, val)
and then re-run your test?
Original comment by [email protected] on 15 Mar 2015 at 12:19
Couldn't set <type 'str'> attr st_size to None
Original comment by [email protected] on 15 Mar 2015 at 12:32
Are you able to determine what size the files (or directories?) returning
errors are *supposed* to have?
I've never even used Tahoe myself, but digging into the code, maybe 'getinfo'
in fs/contrib/tahoelafs/__init__.py or '_info' in fs/contrib/tahoelafs/util.py
needs some extra special-case code to correctly handle the 'size' attribute as
returned from Tahoe?
Original comment by [email protected] on 15 Mar 2015 at 1:03
First of all, its tahoe-lafs itself that hangs. I don't know why.
The web interface reports size as "?", tho the files are opened fine :/
Original comment by [email protected] on 15 Mar 2015 at 2:28
So perhaps this is a bug in tahoe-lafs then, which needs to be fixed there
rather than in pyfilesystem? *shrug*
Original comment by [email protected] on 15 Mar 2015 at 7:09
Seems like a deliberate design decision on their side:
https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2332
Original comment by [email protected] on 29 Mar 2015 at 11:48