core icon indicating copy to clipboard operation
core copied to clipboard

NZBGet error with reverse proxy

Open zoic21 opened this issue 1 year ago • 5 comments

The problem

Same problem as here : https://github.com/home-assistant/core/issues/74973. I use nzbget behind a reverse proxy (npm) with ssl and I got an error when I try to configure integration

What version of Home Assistant Core has the issue?

core-2024.11.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

nzbget

Link to integration documentation on our website

https://www.home-assistant.io/integrations/nzbget

Diagnostics information

Can not configure nzbget integration with nzbget behind a reverse proxy in https

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Enregistreur: homeassistant.components.nzbget.config_flow
Source: components/nzbget/config_flow.py:60
intégration: NZBGet (documentation, problèmes)
S'est produit pour la première fois: 19:08:26 (1 occurrences)
Dernier enregistrement: 19:08:26

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/nzbget/config_flow.py", line 60, in async_step_user
    await self.hass.async_add_executor_job(_validate_input, user_input)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/nzbget/config_flow.py", line 32, in _validate_input
    nzbget_api = NZBGetAPI(
                 ^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pynzbgetapi/__init__.py", line 43, in __init__
    ssl_ctx = ssl.create_default_context()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'create_default_context'

Additional information

No response

zoic21 avatar Nov 30 '24 18:11 zoic21

Hey there @chriscla, mind taking a look at this issue as it has been labeled with an integration (nzbget) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of nzbget can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign nzbget Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


nzbget documentation nzbget source (message by IssueLinks)

home-assistant[bot] avatar Nov 30 '24 18:11 home-assistant[bot]

Same issue on my end. NZBget behind an nginx proxy.

petwri avatar Dec 09 '24 10:12 petwri

Waiting for the maintainer of pynzbgetapi to accept my PR https://github.com/voltron4lyfe/pynzbgetapi/pull/6 and I'll create a PR here to fix the issue. In the meantime, you can use the custom component from here: https://github.com/RomRider/home-assistant/tree/patch-nzbget/homeassistant/components/nzbget (I'll use this branch for the PR here)

RomRider avatar Feb 04 '25 10:02 RomRider

@RomRider -- that PR was merged. Feel free to update here. TBH, I don't use nzbget anymore so I'm not in a great spot to test.

chriscla avatar Feb 10 '25 03:02 chriscla

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.