morpheus65535 / bazarr

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.
https://www.bazarr.media
GNU General Public License v3.0
2.82k stars 218 forks source link

Error 500 when saving a language profile #1924

Closed sgezel closed 1 year ago

sgezel commented 2 years ago

Describe the bug I am getting an error 500 when adding a language profile

To Reproduce Steps to reproduce the behavior:

  1. Go to 'settings > languages'
  2. Add language englisth languages filter
  3. click on 'add new profile'
  4. click on 'add language'
  5. select english, enable HI
  6. click on the save button save
  7. scroll to the top and click on the save button
  8. See error
Exception on /api/system/settings [POST]:

Traceback (most recent call last):
  File "/opt/bazarr/bazarr/../libs/flask/app.py", line 1516, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/bazarr/bazarr/../libs/flask/app.py", line 1502, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/opt/bazarr/bazarr/../libs/flask_restful/__init__.py", line 467, in wrapper
    resp = resource(*args, **kwargs)
  File "/opt/bazarr/bazarr/../libs/flask/views.py", line 84, in view
    return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
  File "/opt/bazarr/bazarr/../libs/flask_restful/__init__.py", line 582, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/opt/bazarr/bazarr/api/utils.py", line 30, in wrapper
    return actual_method(*args, **kwargs)
  File "/opt/bazarr/bazarr/api/system/settings.py", line 55, in post
    for item in json.loads(languages_profiles):
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)

Software (please complete the following information):

morpheus65535 commented 2 years ago

Try to disable your ads blocker.

k-x7 commented 2 years ago

I had the same issue, using private window (which disable ads blocker) solve it for me.

morpheus65535 commented 2 years ago

No news, good news.

Klithik commented 2 years ago

worked like a charm, ty

Joesilva commented 2 years ago

Thank you guys! This worked for me too.

GetoXs commented 1 year ago

FYI. The same issue appears in yesterday's version (1.1.2). I need to downgrade to 1.1.1 and problem disappear. Log from docker:

bazarr    | 2022-10-16 14:24:23,205 - app.app                          (7f1503454b38) :  ERROR (app:1457) - 
Exception on /api/system/settings [POST]
morpheus65535 commented 1 year ago

FYI. The same issue appears in yesterday's version (1.1.2).

Can you share the full exception trace?

Also, what browser (and version) do you use?

GetoXs commented 1 year ago

Chrome, FF. Also in private mode. Debug:

bazarr    | 2022-10-16 18:02:01,886 - peewee                           (7f0171827b38) :  DEBUG (peewee:3148) - ('SELECT "t1"."profileId" FROM 
"table_languages_profiles" AS "t1"', [])
bazarr    | 2022-10-16 18:02:01,898 - app.app                          (7f0171827b38) :  ERROR (app:1457) - Exception on /api/system/settings 
[POST]
bazarr    | Traceback (most recent call last):
bazarr    |   File "/app/bin/bazarr/../libs/flask/app.py", line 1516, in full_dispatch_request
bazarr    |     rv = self.dispatch_request()
bazarr    |   File "/app/bin/bazarr/../libs/flask/app.py", line 1502, in dispatch_request
bazarr    |     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
bazarr    |   File "/app/bin/bazarr/../libs/flask_restx/api.py", line 403, in wrapper
bazarr    |     resp = resource(*args, **kwargs)
bazarr    |   File "/app/bin/bazarr/../libs/flask/views.py", line 84, in view
bazarr    |     return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
bazarr    |   File "/app/bin/bazarr/../libs/flask_restx/resource.py", line 49, in dispatch_request
bazarr    |     resp = meth(*args, **kwargs)
bazarr    |   File "/app/bin/bazarr/api/utils.py", line 30, in wrapper
bazarr    |     return actual_method(*args, **kwargs)
bazarr    |   File "/app/bin/bazarr/api/system/settings.py", line 59, in post
bazarr    |     for item in json.loads(languages_profiles):
bazarr    |   File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
bazarr    |     return _default_decoder.decode(s)
bazarr    |   File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
bazarr    |     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
bazarr    |   File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
bazarr    |     raise JSONDecodeError("Expecting value", s, err.value) from None
bazarr    | json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
morpheus65535 commented 1 year ago

@GetoXs are you accessing Bazarr through a reverse proxy?

GetoXs commented 1 year ago

No, directly http://127.0.0.1:6767/

morpheus65535 commented 1 year ago

@GetoXs can you provide the paylod from the request returning a 500 http error?

image

GetoXs commented 1 year ago

Multipart:

------WebKitFormBoundary6jr4BAhBqbpuslwQ
Content-Disposition: form-data; name="settings-general-serie_default_enabled"

true
------WebKitFormBoundary6jr4BAhBqbpuslwQ
Content-Disposition: form-data; name="languages-profiles"

[object Object]
------WebKitFormBoundary6jr4BAhBqbpuslwQ
Content-Disposition: form-data; name="languages-profiles"

[object Object]
------WebKitFormBoundary6jr4BAhBqbpuslwQ--

FUll request

curl 'http://127.0.0.1:6767/api/system/settings' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: pl-PL,pl;q=0.9,en-GB;q=0.8,en;q=0.7,en-US;q=0.6' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary6jr4BAhBqbpuslwQ' \
  -H 'DNT: 1' \
  -H 'Origin: http://127.0.0.1:6767' \
  -H 'Pragma: no-cache' \
  -H 'Referer: http://127.0.0.1:6767/settings/languages' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36' \
  -H 'X-API-KEY: XXXXXXX' \
  -H 'sec-ch-ua: "Chromium";v="106", "Google Chrome";v="106", "Not;A=Brand";v="99"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  --data-raw $'------WebKitFormBoundary6jr4BAhBqbpuslwQ\r\nContent-Disposition: form-data; name="settings-general-serie_default_enabled"\r\n\r\ntrue\r\n------WebKitFormBoundary6jr4BAhBqbpuslwQ\r\nContent-Disposition: form-data; name="languages-profiles"\r\n\r\n[object Object]\r\n------WebKitFormBoundary6jr4BAhBqbpuslwQ\r\nContent-Disposition: form-data; name="languages-profiles"\r\n\r\n[object Object]\r\n------WebKitFormBoundary6jr4BAhBqbpuslwQ--\r\n' \
  --compressed
GetoXs commented 1 year ago

The view I'm trying to save image

morpheus65535 commented 1 year ago

@LASER-Yi any idea why the frontend try to send to backend JavaScript object instead of serialized JSON?

morpheus65535 commented 1 year ago

Some users have reported that it works on mobile browser where all desktop browser failed.

genera1z0d commented 1 year ago

Some users have reported that it works on mobile browser where all desktop browser failed.

Just tried it on a mobile browser, per your suggestion, and can confirm it allowed me to create language profiles.

bri2 commented 1 year ago

Some users have reported that it works on mobile browser where all desktop browser failed.

Can confirm this works on Firefox android 106.1.0, but not in Firefox windows 10 106.0.1

LASER-Yi commented 1 year ago

I submitted a fix which should fix this issue. Can you guys help me verify on your side? The fix should be available in the next upcoming beta version

GetoXs commented 1 year ago

I can confirm it works.

dglava commented 1 year ago

I am unfortunately still getting the error. I tested version v1.1.3-beta.6 on Debian 11 natively and Firefox 106.0.1. I disabled all the add-ons and tried a private window but without much luck.

Here's the debug log. Is there more information that you can use?

Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,586 - peewee.sqliteq                   (7f21aba13700) :  DEBUG (sqliteq:176) - received query UPDATE "table_settings_languages" SET "enabled" = ?
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,587 - peewee                           (7f21aba13700) :  DEBUG (peewee:3148) - ('UPDATE "table_settings_languages" SET "enabled" = ?', [0])
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,649 - peewee.sqliteq                   (7f21aba13700) :  DEBUG (sqliteq:176) - received query UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,650 - peewee                           (7f21aba13700) :  DEBUG (peewee:3148) - ('UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)', [1, 'bs'])
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,738 - peewee.sqliteq                   (7f21aba13700) :  DEBUG (sqliteq:176) - received query UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,739 - peewee                           (7f21aba13700) :  DEBUG (peewee:3148) - ('UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)', [1, 'hr'])
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,794 - peewee.sqliteq                   (7f21aba13700) :  DEBUG (sqliteq:176) - received query UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,795 - peewee                           (7f21aba13700) :  DEBUG (peewee:3148) - ('UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)', [1, 'sr'])
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,849 - peewee.sqliteq                   (7f21aba13700) :  DEBUG (sqliteq:176) - received query UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,850 - peewee                           (7f21aba13700) :  DEBUG (peewee:3148) - ('UPDATE "table_settings_languages" SET "enabled" = ? WHERE ("table_settings_languages"."code2" = ?)', [1, 'en'])
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,904 - socketio.server                  (7f2118ff9700) :  INFO (server:310) - emitting event "data" to all [/]
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,905 - engineio.server                  (7f2118ff9700) :  INFO (socket:89) - WAd3vekBNxdAEP7vAAAA: Sending packet MESSAGE data 2["data",{"type":"languages","action":"update","payload":null}]
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,908 - peewee                           (7f2118ff9700) :  DEBUG (peewee:3148) - ('SELECT "t1"."profileId" FROM "table_languages_profiles" AS "t1"', [])
Oct 25 17:01:12 masina-s bazarr[24159]: 2022-10-25 17:01:12,913 - app.app                          (7f2118ff9700) :  ERROR (app:1457) - Exception on /bazarr/api/system/settings [POST]
Oct 25 17:01:12 masina-s bazarr[24159]: Traceback (most recent call last):
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/bazarr/bazarr/../libs/flask/app.py", line 1516, in full_dispatch_request
Oct 25 17:01:12 masina-s bazarr[24159]:     rv = self.dispatch_request()
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/bazarr/bazarr/../libs/flask/app.py", line 1502, in dispatch_request
Oct 25 17:01:12 masina-s bazarr[24159]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/bazarr/bazarr/../libs/flask_restx/api.py", line 403, in wrapper
Oct 25 17:01:12 masina-s bazarr[24159]:     resp = resource(*args, **kwargs)
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/bazarr/bazarr/../libs/flask/views.py", line 84, in view
Oct 25 17:01:12 masina-s bazarr[24159]:     return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/bazarr/bazarr/../libs/flask_restx/resource.py", line 49, in dispatch_request
Oct 25 17:01:12 masina-s bazarr[24159]:     resp = meth(*args, **kwargs)
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/bazarr/bazarr/api/utils.py", line 30, in wrapper
Oct 25 17:01:12 masina-s bazarr[24159]:     return actual_method(*args, **kwargs)
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/bazarr/bazarr/api/system/settings.py", line 59, in post
Oct 25 17:01:12 masina-s bazarr[24159]:     for item in json.loads(languages_profiles):
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
Oct 25 17:01:12 masina-s bazarr[24159]:     return _default_decoder.decode(s)
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
Oct 25 17:01:12 masina-s bazarr[24159]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Oct 25 17:01:12 masina-s bazarr[24159]:   File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
Oct 25 17:01:12 masina-s bazarr[24159]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Oct 25 17:01:12 masina-s bazarr[24159]: json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
Oct 25 17:01:13 masina-s bazarr[24159]: 2022-10-25 17:01:13,123 - peewee                           (7f2117ff7700) :  DEBUG (peewee:3148) - ('SELECT "t1"."name", "t1"."code2", "t1"."enabled" FROM "table_settings_languages" AS "t1" ORDER BY "t1"."name"', [])
Oct 25 17:01:19 masina-s bazarr[24159]: 2022-10-25 17:01:19,769 - engineio.server                  (7f20f6fb5700) :  INFO (socket:89) - WAd3vekBNxdAEP7vAAAA: Sending packet PING data None
Oct 25 17:01:19 masina-s bazarr[24159]: 2022-10-25 17:01:19,831 - engineio.server                  (7f21177f6700) :  INFO (socket:52) - WAd3vekBNxdAEP7vAAAA: Received packet PONG data
LASER-Yi commented 1 year ago

Please reverify on the next beta version

dglava commented 1 year ago

Still getting the same error it seems. Version v1.1.3-beta.7:

Oct 26 17:52:26 masina-s bazarr[30664]: 2022-10-26 17:52:26,442 - peewee                           (7f07c67fc700) :  DEBUG (peewee:3148) - ('SELECT "t1"."profileId" FROM "table_languages_profiles" AS "t1"', [])
Oct 26 17:52:26 masina-s bazarr[30664]: 2022-10-26 17:52:26,447 - app.app                          (7f07c67fc700) :  ERROR (app:1457) - Exception on /bazarr/api/system/settings [POST]
Oct 26 17:52:26 masina-s bazarr[30664]: Traceback (most recent call last):
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/bazarr/bazarr/../libs/flask/app.py", line 1516, in full_dispatch_request
Oct 26 17:52:26 masina-s bazarr[30664]:     rv = self.dispatch_request()
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/bazarr/bazarr/../libs/flask/app.py", line 1502, in dispatch_request
Oct 26 17:52:26 masina-s bazarr[30664]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/bazarr/bazarr/../libs/flask_restx/api.py", line 403, in wrapper
Oct 26 17:52:26 masina-s bazarr[30664]:     resp = resource(*args, **kwargs)
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/bazarr/bazarr/../libs/flask/views.py", line 84, in view
Oct 26 17:52:26 masina-s bazarr[30664]:     return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/bazarr/bazarr/../libs/flask_restx/resource.py", line 49, in dispatch_request
Oct 26 17:52:26 masina-s bazarr[30664]:     resp = meth(*args, **kwargs)
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/bazarr/bazarr/api/utils.py", line 30, in wrapper
Oct 26 17:52:26 masina-s bazarr[30664]:     return actual_method(*args, **kwargs)
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/bazarr/bazarr/api/system/settings.py", line 59, in post
Oct 26 17:52:26 masina-s bazarr[30664]:     for item in json.loads(languages_profiles):
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
Oct 26 17:52:26 masina-s bazarr[30664]:     return _default_decoder.decode(s)
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
Oct 26 17:52:26 masina-s bazarr[30664]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Oct 26 17:52:26 masina-s bazarr[30664]:   File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
Oct 26 17:52:26 masina-s bazarr[30664]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Oct 26 17:52:26 masina-s bazarr[30664]: json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
LASER-Yi commented 1 year ago

I just upgraded the upstream packages to latest, please check the upcoming beta version

dglava commented 1 year ago

Do you mean v1.1.3-beta.9 or will there be another one? Because I can't see any relevant commits for this in beta.9. But I tested it just in case and the error is still there (same error above).

jerryhopper commented 1 year ago

Using development-version-v1.1.3-beta.11, the problem still exists.

The serialization of 'language-profiles' seems to be the culprit.

image

rumplin commented 1 year ago

using development 1.1.3-beta.15 the problem still exists. Using incognito browsers Chrome, Edge and FireFox.

Traceback (most recent call last):
  File "/app/bazarr/bin/bazarr/../libs/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/bazarr/bin/bazarr/../libs/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/app/bazarr/bin/bazarr/../libs/flask_restx/api.py", line 405, in wrapper
    resp = resource(*args, **kwargs)
  File "/app/bazarr/bin/bazarr/../libs/flask/views.py", line 107, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)
  File "/app/bazarr/bin/bazarr/../libs/flask_restx/resource.py", line 46, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/app/bazarr/bin/bazarr/api/utils.py", line 30, in wrapper
    return actual_method(*args, **kwargs)
  File "/app/bazarr/bin/bazarr/api/system/settings.py", line 59, in post
    for item in json.loads(languages_profiles):
  File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)

image image

rumplin commented 1 year ago

Can confirm that this is working when using a mobile device, not sure what the difference is but as a workaround, use your mobile devices.

spider1163 commented 1 year ago

Similar error in "Movies blacklist" and still not working on mobile device

morpheus65535 commented 1 year ago

Similar error in "Movies blacklist" and still not working on mobile device

That's a different issue already fixed in dev branch.

gitpowershelluser commented 1 year ago

Confirmed - just spent an hour resetting this up on my desktop. Odd bug :) I see it's already fixed in devbranch .. thanks!

morpheus65535 commented 1 year ago

Someone with this issue can share a backup of Bazarr in PM over Discord?

alpe12 commented 1 year ago

Still not working. v1.1.3-beta.21

Someone with this issue can share a backup of Bazarr in PM over Discord?

Sended it.

dglava commented 1 year ago

~I have tested v1.1.3-beta.22 (which includes commit 3a82ccf276099101de4048f3e3da09d38e3907c3) and am still getting what appears to be the same error. I have tested it on Firefox 107 (Linux, package from the Arch repository). I am not getting the error on my Android phone running Firefox.~ My bad, I wrongly assumed that a fix has been pushed for this issue (it's a completely different issue).

If relevant: deleting a language profile also seems to fail silently (it reappears again after clicking "Save"). Here's the debug log:

Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,094 - socketio.server                  (7f21837fe700) :  INFO (server:310) - emitting event "data" to all [/]
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,095 - engineio.server                  (7f21837fe700) :  INFO (socket:89) - 6z1dkC2FSkB9hzY4AAAA: Sending packet MESSAGE data 2["data",{"type":"settings","action":"update","payload":null}]
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,295 - peewee                           (7f2181ffb700) :  DEBUG (peewee:3148) - ('SELECT COUNT(1) FROM (SELECT 1 FROM "table_episodes" AS "t1" INNER JOIN "table_shows" AS "t2" ON ("t1"."sonarrSeriesId" = "t2"."sonarrSeriesId") WHERE (("t1"."missing_subtitles" IS NOT ?) AND ("t1"."missing_subtitles" != ?))) AS "_wrapped"', [None, '[]'])
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,306 - peewee                           (7f21807f8700) :  DEBUG (peewee:3148) - ('SELECT "t1"."name", "t1"."enabled", "t1"."url" FROM "table_settings_notifier" AS "t1" ORDER BY "t1"."name"', [])
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,310 - peewee                           (7f2181ffb700) :  DEBUG (peewee:3148) - ('SELECT COUNT(1) FROM (SELECT 1 FROM "table_movies" AS "t1" WHERE (("t1"."missing_subtitles" IS NOT ?) AND ("t1"."missing_subtitles" != ?))) AS "_wrapped"', [None, '[]'])
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,317 - peewee                           (7f2181ffb700) :  DEBUG (peewee:3148) - ('SELECT "t1"."path", "t1"."accessible", "t1"."error" FROM "table_shows_rootfolder" AS "t1" WHERE ("t1"."accessible" = ?)', [0])
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,320 - peewee                           (7f2181ffb700) :  DEBUG (peewee:3148) - ('SELECT "t1"."path", "t1"."accessible", "t1"."error" FROM "table_movies_rootfolder" AS "t1" WHERE ("t1"."accessible" = ?)', [0])
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,349 - peewee                           (7f2180ff9700) :  DEBUG (peewee:3148) - ('SELECT "t1"."name", "t1"."code2", "t1"."enabled" FROM "table_settings_languages" AS "t1" ORDER BY "t1"."name"', [])
Nov 21 10:17:27 masina-s bazarr[88021]: 2022-11-21 10:17:27,357 - peewee                           (7f217fff7700) :  DEBUG (peewee:3148) - ('SELECT "t1"."profileId", "t1"."name", "t1"."cutoff", "t1"."items", "t1"."mustContain", "t1"."mustNotContain", "t1"."originalFormat" FROM "table_languages_profiles" AS "t1"', [])
morpheus65535 commented 1 year ago

We are aware that this issue isn't fixed. Right now, we still can't reproduce it. We are unable to fix it without that so right now this issue is stalled.

bri2 commented 1 year ago

It is fixed on my machines that had this problem (http500, [object Object] being sent) using the development branch with commit 30f04fe. I can add/remove/save language profiles again. Thanks @LASER-Yi & @morpheus65535!

dglava commented 1 year ago

Unfortunately I am still getting the same error using v1.1.3-beta.26. I tried turning off all addons, but without success.

bri2 commented 1 year ago

Unfortunately I am still getting the same error using v1.1.3-beta.26. I tried turning off all addons, but without success.

~~Same here, v1.1.3-beta.26 does not work. When downloading the development branch, running the server (bazarr.py) and using the client that the server serves on port 6767, it does not work (same problem as before, http500, [object Object] being sent). If I run a seperate instance of the development client (npm install, npm start, port 5173), it works. It does not seem to be a browser caching problem, after clearing cache & using incognito window the problem persists.~~

Update: disregard my above message, I had set the update branch (bazarr -> general -> update) to 'master' causing the auto-updater to update to v1.1.2 (which contains the bug) on startup. Using 'development' as the branch (v1.1.3-beta26) works perfectly.

alpe12 commented 1 year ago

Docker v1.1.3-beta.26 fixed it for me.

morpheus65535 commented 1 year ago

@dglava Unfortunately I am still getting the same error using v1.1.3-beta.26. I tried turning off all addons, but without success.

Did you try to empty cache? Not sure what else could be causing this issue.

morpheus65535 commented 1 year ago

@sgezel can you test with 1.1.3-beta.26 and confirm if the issue is fixed for you?

dglava commented 1 year ago

Did you try to empty cache? Not sure what else could be causing this issue.

Yes. I deleted my Bazarr configuration directory, reinstalled Bazarr, cleared my browser's cache, yet the error still persists. I connect to my Bazarr instance via a forwarded port via SSH. I tried accessing it via a reverse HTTP proxy, same issue.

Do you need other logs which could help with this?

Nov 28 22:15:30 masina-s bazarr[79113]: 2022-11-28 22:15:30,890 - peewee                           (7f4387ff7700) :  DEBUG (peewee:3148) - ('SELECT "t1"."profileId" FROM "table_languages_profiles" AS "t1"', [])
Nov 28 22:15:30 masina-s bazarr[79113]: 2022-11-28 22:15:30,896 - app.app                          (7f4387ff7700) :  ERROR (app:1457) - Exception on /bazarr/api/system/settings [POST]
Nov 28 22:15:30 masina-s bazarr[79113]: Traceback (most recent call last):
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/bazarr/bazarr/../libs/flask/app.py", line 1516, in full_dispatch_request
Nov 28 22:15:30 masina-s bazarr[79113]:     rv = self.dispatch_request()
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/bazarr/bazarr/../libs/flask/app.py", line 1502, in dispatch_request
Nov 28 22:15:30 masina-s bazarr[79113]:     return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/bazarr/bazarr/../libs/flask_restx/api.py", line 403, in wrapper
Nov 28 22:15:30 masina-s bazarr[79113]:     resp = resource(*args, **kwargs)
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/bazarr/bazarr/../libs/flask/views.py", line 84, in view
Nov 28 22:15:30 masina-s bazarr[79113]:     return current_app.ensure_sync(self.dispatch_request)(*args, **kwargs)
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/bazarr/bazarr/../libs/flask_restx/resource.py", line 49, in dispatch_request
Nov 28 22:15:30 masina-s bazarr[79113]:     resp = meth(*args, **kwargs)
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/bazarr/bazarr/api/utils.py", line 30, in wrapper
Nov 28 22:15:30 masina-s bazarr[79113]:     return actual_method(*args, **kwargs)
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/bazarr/bazarr/api/system/settings.py", line 59, in post
Nov 28 22:15:30 masina-s bazarr[79113]:     for item in json.loads(languages_profiles):
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
Nov 28 22:15:30 masina-s bazarr[79113]:     return _default_decoder.decode(s)
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
Nov 28 22:15:30 masina-s bazarr[79113]:     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Nov 28 22:15:30 masina-s bazarr[79113]:   File "/usr/lib/python3.9/json/decoder.py", line 355, in raw_decode
Nov 28 22:15:30 masina-s bazarr[79113]:     raise JSONDecodeError("Expecting value", s, err.value) from None
Nov 28 22:15:30 masina-s bazarr[79113]: json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
morpheus65535 commented 1 year ago

I connect to my Bazarr instance via a forwarded port via SSH. I tried accessing it via a reverse HTTP proxy, same issue.

And if you simply access it directly?

dglava commented 1 year ago

Still not working (accessing a Bazarr instance running on the same computer via Firefox on Linux). Are the people for whom it works now also using Firefox?

As before, it works on my smartphone's browser (Firefox Android).

morpheus65535 commented 1 year ago

@dglava have you tried accessing it from another computer on the same network? Could it be related to some security suite on this specific computer?

bri2 commented 1 year ago

Still not working (accessing a Bazarr instance running on the same computer via Firefox on Linux). Are the people for whom it works now also using Firefox?

As before, it works on my smartphone's browser (Firefox Android).

It's working for me using Firefox 107.0 on Windows 10 with v.1.1.3-beta26. I made the mistake before of not changing the branch (bazarr -> general -> update) to 'development' causing it to revert to v.1.1.2 on launch. Is that setting the same for you? Also see system -> status -> bazarr version

dglava commented 1 year ago

Oh wow, my bad. @bri2, you were right. It was automatically downgrading it to 1.1.2 despite downloading the beta release. I did see 1.1.2 under version, but I thought that the version string was just always stuck to the latest proper release. I guess I should use the --no-update flag for my packaged version.

I can confirm that the latest beta fixed this for me as well. Thank you.

morpheus65535 commented 1 year ago

Fixed in 1.1.3