Bazarr: ordinal not in range(128)

Created on 1 May 2019  路  12Comments  路  Source: morpheus65535/bazarr

When I want to look at the movies-list, I get the error below. It looks like one entry is causing this. (Which remembers me I can watch this show on Netflix since it is also there, so I can probably solve this by deleting it. ;-) )

Error: 500 Internal Server Error
Sorry, the requested URL 'http://diskstation:6767/movies' caused an error:

Internal Server Error
Exception:
UnicodeEncodeError('ascii', u'/volume1/remote/media/Movies/Acda & De Munnik Afscheid in Carr\xe9 (2015)/Acda_en_De_Munnik-Afscheid_in_Carr_#233_(2015)-griNdSMAN.mp4', 62, 63, 'ordinal not in range(128)')
Traceback:
Traceback (most recent call last):
  File "/volume1/@appstore/bazarr/bazarr/../libs/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/volume1/@appstore/bazarr/bazarr/../libs/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "bazarr/main.py", line 137, in wrapper
    return func(*a, **ka)
  File "bazarr/main.py", line 758, in movies
    single_language=single_language, page_size=page_size, current_port=settings.general.port)
  File "/volume1/@appstore/bazarr/bazarr/../libs/bottle.py", line 3619, in template
    return TEMPLATES[tplid].render(kwargs)
  File "/volume1/@appstore/bazarr/bazarr/../libs/bottle.py", line 3409, in render
    self.execute(stdout, env)
  File "/volume1/@appstore/bazarr/bazarr/../libs/bottle.py", line 3396, in execute
    eval(self.co, env)
  File "/volume1/@appstore/bazarr/views/movies.tpl", line 87, in <module>
    %if os.path.isfile(row[2]):
  File "/usr/lib/python2.7/genericpath.py", line 37, in isfile
    st = os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 62: ordinal not in range(128)
awaiting feedback question

All 12 comments

Your os have probably bad set-up for encoding in environment

Can I do something to fix this on my Synology?

What is returned by the locale command?

# locale
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8
#

This is good.

The easy answer would be to rename the problematic file but it wouldn鈥檛 fix the source of the problem. Can you post the correct name with the UTF8 character? I will try to reproduce it.

$ sudo locale-gen "en_US.UTF-8"
Generating locales...
en_US.UTF-8... done
Generation complete.

$ sudo dpkg-reconfigure locales
Generating locales...
en_US.UTF-8... up-to-date
Generation complete.

This is what I had to do in my proxmox Ubuntu container to fix it.

This is good.

The easy answer would be to rename the problematic file but it wouldn鈥檛 fix the source of the problem. Can you post the correct name with the UTF8 character? I will try to reproduce it.

Character should be 茅

I鈥檝e got plenty of in my directories name and have no issue with correct locale. Did you try @mmolitor87 solution?

I have no idea how to execute that on my Synology.

Dude you need to try to help yourself... I won鈥檛 do it for you. It鈥檚 not a bug in Bazarr, it鈥檚 a misconfiguration of you OS.

@pven not trying to be a dick, but @morpheus65535 isn't wrong.

I'll start you out: http://lmgtfy.com/?q=synology+set+locale

The answer should be in the first or fourth links, though I imagine you would get more specific answers if you add your model number to the search string.

Lets close this ...

Was this page helpful?
0 / 5 - 0 ratings