xattr Crashing (Is This a Bug?)

Status
Not open for further replies.

ewhac

Contributor
Joined
Aug 20, 2013
Messages
177
I copied a video file over a CIFS share from a Linux client to the (new) FreeNAS box (v11.1-U4). Upon inspecting it from a FreeNAS shell, it had acquired an xattr named DOSATTRIB (where did it come from?). When I tried to inspect it using xattr, it crashed:

Code:
[ewhac@freenas ~]$ ls -l
total 325819
-rw-r--r--+ 1 ewhac  ewhac  868824677 Apr 21 17:23 2017-03-19 17-36-31.mkv
[ewhac@freenas ~]$ xattr 2017-03-19\ 17-36-31.mkv
DOSATTRIB
[ewhac@freenas ~]$ xattr -p DOSATTRIB 2017-03-19\ 17-36-31.mkv
Traceback (most recent call last):
  File "/usr/local/bin/xattr", line 11, in <module>
	load_entry_point('xattr==0.7.8', 'console_scripts', 'xattr')()
  File "/usr/local/lib/python3.6/site-packages/xattr/tool.py", line 202, in main
	print("".join((file_prefix, attr_value)))
TypeError: sequence item 1: expected str instance, bytes found
[ewhac@freenas ~]$ xattr -l 2017-03-19\ 17-36-31.mkv
Traceback (most recent call last):
  File "/usr/local/bin/xattr", line 11, in <module>
	load_entry_point('xattr==0.7.8', 'console_scripts', 'xattr')()
  File "/usr/local/lib/python3.6/site-packages/xattr/tool.py", line 194, in main
	if attr_value.find('\0') >= 0:
TypeError: a bytes-like object is required, not 'str'


This feels like an incomplete port from Python 2.7 to 3.x.
 
D

dlavigne

Guest
This has been fixed in the Nightlies (which will become the next version).
 
Status
Not open for further replies.
Top