trapexit / mergerfs-tools

Optional tools to help manage data in a mergerfs pool
ISC License
385 stars 44 forks source link

UnicodeEncodeError: 'utf-8' codec can't encode characters #43

Closed ShapeShifter499 closed 7 years ago

ShapeShifter499 commented 7 years ago

I'm trying to make use of this on my server running Arch Linux and I get the following error message. Not really sure what this means, can someone please help?

[root@kumo ]# mergerfs.fsck /usr/share/webapps/nextcloud/data 
Traceback (most recent call last):
  File "/usr/bin/mergerfs.fsck", line 213, in <module>
    main()
  File "/usr/bin/mergerfs.fsck", line 202, in main
    check_consistancy(fullpath,verbose,size,fix)
  File "/usr/bin/mergerfs.fsck", line 148, in check_consistancy
    paths = lgetxattr(fullpath,"user.mergerfs.allpaths")
  File "/usr/bin/mergerfs.fsck", line 29, in lgetxattr
    path = path.encode('utf8')
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 117-118: surrogates not allowed
trapexit commented 7 years ago

Appears the path is has a file or directory with non UTF8 chars. I'll have to see how to go about handling that.

ShapeShifter499 commented 7 years ago

I suppose it's possible, some of these files came from my Android Phone and from older Linux systems I was running.

trapexit commented 7 years ago

Try the newest version I just uploaded.

ShapeShifter499 commented 7 years ago

testing it now

ShapeShifter499 commented 7 years ago

I ran

mergerfs.fsck /usr/share/webapps/nextcloud/data/

with the latest update and there were no output messages or errors. I'm guessing I should only see output when there is an issue right?

trapexit commented 7 years ago

No output means it didn't find any issues. And yes, if the issue was still there it'd error.

ShapeShifter499 commented 7 years ago

@trapexit I suppose this issue is fixed then. I'll go ahead and close this. Thank you for the awesome file system and tools.

trapexit commented 7 years ago

No problem. Feel free to reach out again if you run across any issues.