clinton-hall / nzbToMedia

Provides NZB and Torrent postprocessing To CouchPotatoServer, SickBeard/SickRage, HeadPhones, Mylar and Gamez
GNU General Public License v3.0
674 stars 176 forks source link

non-ascii chars in video filenames causes problems #1810

Closed qorron closed 3 years ago

qorron commented 3 years ago

Describe the bug the filename of the video ist converted into ascii and this fails if the filename contains non-ascii chars the file that revealed the problem contained the string Rosé

Technical Specs

  1. Running on (Windows, Linux, NAS Model etc) 'debian stable'
  2. Python version 'Python 3.7.3'
  3. Download Client (NZBget, SABnbzd, Transmission) 'SABnbzd'
  4. Intended Media Management (SickChill, CouchPotoato, Radarr, Sonarr) 'sickgear'

Expected behavior A clear and concise description of what you expected to happen. file is processed as usual. perhaps convert it to utf8 instead? depends on what happens with the bytes after that.

Log Please provide an extract, or full debug log that indicates the issue.

Traceback (most recent call last):
File "/opt/nzbToMedia/sabToSickBeard.py", line 30, in <module>
autoProcessTV.process_files(sys.argv[1], sys.argv[2], sys.argv[7])
File "/opt/sickgear/autoProcessTV/autoProcessTV.py", line 141, in process_files
print(line.strip())
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 44: ordinal not in range(128)
qorron commented 3 years ago

important update: the file ends up where it should. so, function is not impaired. just an error is reported back to SABnbzd

clinton-hall commented 3 years ago

While I can't say I have fixed all encoding issues, I can say that your issue does not look to be related to nzbToMedia.

nzbToMedia has not had any files called sabToSickBeard.py or autoProcessTV.py for quite some time. I believe you may be using a very old version, or more likely you are using the built in version of sabToSickBeard.py that is supplied with SickGear https://github.com/SickGear/SickGear/blob/master/autoProcessTV/autoProcessTV.py

All of the nzbToMedia executable scripts will either start with nzbTo*.py or TorrentToMedia.py

If you try a clean install of nzbToMedia, configured to be called from SABnzbd, or otherwise provide fill logs from nzbToMedia showing that in-fact it is this software, I'm happy to look further into this.

qorron commented 3 years ago

oh.. the sabnzbd config was outdated. it referred to sabToSickBeard.py which was still present because it was once in the repo. no idea why it was not deleted. for sickgear do I use nzbToSickBeard.py or nzbToMedia.py ?

qorron commented 3 years ago

nzbToMedia.py works.