RhetTbull / osxmetadata

Python package to read and write various MacOS extended attribute metadata such as tags/keywords and Finder comments from files. Includes CLI tool for reading/writing metadata.
MIT License
125 stars 4 forks source link

Value for get_xattr encode must be bytes #70

Open RhetTbull opened 2 years ago

RhetTbull commented 2 years ago

json.dumps fails as an encode method because the value must be a bytes. If value is str, it should be converted to bytes for writing so json.dumps and json.loads can be used directly.