JohnDoee / autotorrent

Matches torrents with files and gets them seeded
MIT License
269 stars 34 forks source link

Can't build database #20

Closed mpk99 closed 4 years ago

mpk99 commented 6 years ago

I can't build my initial database -- i get this error:



autotorrent-env/bin/autotorrent -r

Rebuilding database
Traceback (most recent call last):
  File "autotorrent-env/bin/autotorrent", line 11, in <module>
    sys.exit(commandline_handler())
  File "/home/user/temp/autotorrent-env/lib/python3.5/site-packages/autotorrent/cmd.py", line 197, in commandline_handler
    db.rebuild()
  File "/home/user/temp/autotorrent-env/lib/python3.5/site-packages/autotorrent/db.py", line 163, in rebuild
    self.insert_into_database(root, f, 'exact', 'f')
  File "/home/user/temp/autotorrent-env/lib/python3.5/site-packages/autotorrent/db.py", line 49, in insert_into_database
    self._insert_into_database(root, f, mode, prefix, unsplitable_name)
  File "/home/user/temp/autotorrent-env/lib/python3.5/site-packages/autotorrent/db.py", line 63, in _insert_into_database
    key = self.keyify(prefix, f)
  File "/home/user/temp/autotorrent-env/lib/python3.5/site-packages/autotorrent/db.py", line 282, in keyify
    return hashlib.sha256(key.encode('utf-8')).hexdigest()
UnicodeEncodeError: 'utf-8' codec can't encode character '\udce9' in position 6: surrogates not allowed`
ordinarygulp commented 5 years ago

I had similar issues here: https://github.com/JohnDoee/autotorrent/issues/21 which turned out to be bad folder names/not supported encoding for the name.

sachk commented 5 years ago

I've also had this previously. Ignoring folders with invalid characters should work for now.

impo commented 4 years ago

I've also had this previously. Ignoring folders with invalid characters should work for now.

How would I do that?

JohnDoee commented 4 years ago

Thanks for reporting this.

This is folded into #45