Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: reqwest::Error #7

Closed
madejackson opened this issue Mar 10, 2024 · 11 comments · Fixed by #23
Closed

Error: reqwest::Error #7

madejackson opened this issue Mar 10, 2024 · 11 comments · Fixed by #23
Assignees
Labels
bug Something isn't working
Milestone

Comments

@madejackson
Copy link

madejackson commented Mar 10, 2024

I get following Error trying to run any command:

Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 4, column: 1) }

Bazarr is V1.4.2 on k3s behind traefik with authentik (/api is excluded from authentik)

{ "host": "bazarr.local.REDACTED", "protocol": "https", "port": "443", "apiKey": "REDACTED" }

Tried from Pop!OS 22.04 with bazarr-bulk 0.1.2 (installed automatically or manually, same issue)

@mateoradman mateoradman self-assigned this Mar 10, 2024
@mateoradman mateoradman added the bug Something isn't working label Mar 10, 2024
@mateoradman
Copy link
Owner

Hi @madejackson, thanks for reporting this bug. I will need a few more information to be able to work on this.

  1. Which operation did you try to run? (Syncing, OCR Fixes, ...)
  2. Were you attempting to perform actions on movie or tv show subtitles?
  3. Are there any bazarr logs suggesting that something went wrong while using Bazarr bulk CLI? (System > Logs)

@madejackson
Copy link
Author

madejackson commented Mar 11, 2024

Hi Mateo,

Thanks for investigating this.

So it doesn't really matter unfortunately. The Error is present for all inputs and the bazarr log stays empty (also true with debugging enabled in bazarr settings):

~$ bb --config bazarr.json movies ocr-fixes
Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 4, column: 1) }
~$ bb --config bazarr.json movies common-fixes
Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 4, column: 1) }
~$ bb --config bazarr.json movies sync
Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 4, column: 1) }
~$ bb --config bazarr.json tv-shows sync
Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 4, column: 1) }
~$ bb --config bazarr.json tv-shows ocr-fixes
Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 4, column: 1) }
~$ bb --config bazarr.json tv-shows somethingsomething
error: unrecognized subcommand 'somethingsomething'

grafik

@mateoradman
Copy link
Owner

Thanks for looking into it. In order to further debug what went wrong, can you please kindly provide the following information:

  1. navigate to http://YOUR_BAZARR_INSTANCE/api/
  2. on the right hand side click on Authorise and input your API key
  3. click on Episodes > GET Episodes > Try it out > Execute. You will get the response printed out below. Can you please export this response as a JSON file and attach it here?
  4. Do the same for GET /movies and GET /series.

@madejackson
Copy link
Author

madejackson commented Mar 11, 2024

Yes no Problem,

Here you go:

Episodes for series with ID 1:
response_1710154203699.json

Movies (length 100):
response_1710154365768.json

Headers:

access-control-allow-origin: * content-encoding: gzip content-length: 38458 content-type: application/json date: Mon,11 Mar 2024 10:52:44 GMT server: waitress vary: Accept-Encoding x-firefox-spdy: h2

@mateoradman mateoradman added this to the v0.1.4 milestone Mar 14, 2024
@Fratt
Copy link

Fratt commented Mar 14, 2024

I'm experiencing an issue that looks similar to his

$ bb --config config.json movies sync
Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 1, column: 1) }

my config.json looks like

{
  "host": "192.168.1.2",
  "protocol": "http",
  "port": "6767",
  "apiKey": "xxx"
}

Something that might be relevant is that the base URL of Bazarr is not /, but bazarr/.
Meaning that my Bazarr is reached under http://192.168.1.2:6767/bazarr/
And the API under http://192.168.1.2:6767/bazarr/api/

Thanks in advance!

@mateoradman
Copy link
Owner

Thank you for reaching out! I am working on reproducing this bug.

Additionally, I will improve the error reporting procedure in v1.4 which will help detecting what went wrong.

@mateoradman mateoradman modified the milestones: v0.1.4, v0.1.5 May 4, 2024
@matt1432
Copy link
Contributor

I have the exact same issue with a base URL

@andonevris
Copy link

andonevris commented May 17, 2024

Exactly the same error here, also using a base URL

bazarr is accessible from < IP address >/bazarr

Bazarr Bulk CLI v0.1.4
Bazarr API is healthy.
Error: reqwest::Error { kind: Decode, source: Error("expected value", line: 1, column: 1) }

@madejackson
Copy link
Author

madejackson commented May 17, 2024

Short update, i was able to fix it on my side. I used a base docker image to talk directly to bazarr, bypassing traefik (woahbase/alpine-ssh)

I just installed it the manual way inside this container and run the bb commands and it works.

@mateoradman
Copy link
Owner

I understand the problem now, and will push a fix soon. Thanks

mateoradman pushed a commit that referenced this issue May 18, 2024
…ing any leading or trailing slashes from the base url
@mateoradman mateoradman linked a pull request May 18, 2024 that will close this issue
mateoradman added a commit that referenced this issue May 18, 2024
fix(#7): add "base" key in config to specify base url
@mateoradman
Copy link
Owner

v0.1.5 is released including the fix for base URL. You can set your base URL in the config.json file.

Example:

{
  "host": "0.0.0.0",
  "protocol": "http",
  "apiKey": "<YOUR_API_KEY>",
  "port": "6767",
  "baseUrl": "bazarr" <- OPTIONAL field (may include trailing/leading slash) 
}

Thanks for your involvement in resolving this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants