buildarr / buildarr-sonarr

Sonarr PVR plugin for Buildarr
https://buildarr.github.io/plugins/sonarr
GNU General Public License v3.0
2 stars 4 forks source link

Sonarr dump-config: 'ValueError' for empty fields in SABnzbd settings #50

Closed A-Flying-Poro closed 6 months ago

A-Flying-Poro commented 6 months ago

Hi, this is an issue related to #39 where the default blank "Url Base" is not present for SABnzbd, causing an error during a config dump. This issue is also fixed by setting a value in Sonarr and clearing it.

2024-02-24 04:29:32,269 buildarr:1 buildarr_sonarr.api [DEBUG] GET http://sonarr:8989/api/v3/downloadclient -> status_code=200 res=[{'enable': True, 'protocol': 'torrent', 'priority': 25, 'removeCompletedDownloads': True, 'removeFailedDownloads': True, 'name': 'qBittorrent', 'fields': [{'order': 0, 'name': 'host', 'label': 'Host', 'value': 'qbit', 'type': 'textbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 1, 'name': 'port', 'label': 'Port', 'value': 8080, 'type': 'textbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 2, 'name': 'useSsl', 'label': 'Use SSL', 'helpText': "Use a secure connection. See Options -> Web UI -> 'Use HTTPS instead of HTTP' in qBittorrent.", 'value': False, 'type': 'checkbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 3, 'name': 'urlBase', 'label': 'URL Base', 'helpText': 'Adds a prefix to the qBittorrent url, such as http://[host]:[port]/[urlBase]/api', 'value': '', 'type': 'textbox', 'advanced': True, 'privacy': 'normal', 'isFloat': False}, {'order': 4, 'name': 'username', 'label': 'Username', 'value': 'chloe', 'type': 'textbox', 'advanced': False, 'privacy': 'userName', 'isFloat': False}, {'order': 5, 'name': 'password', 'label': 'Password', 'value': '********', 'type': 'password', 'advanced': False, 'privacy': 'password', 'isFloat': False}, {'order': 6, 'name': 'tvCategory', 'label': 'Category', 'helpText': 'Adding a category specific to Sonarr avoids conflicts with unrelated non-Sonarr downloads. Using a category is optional, but strongly recommended.', 'value': 'tv-sonarr', 'type': 'textbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 7, 'name': 'tvImportedCategory', 'label': 'Post-Import Category', 'helpText': 'Category for Sonarr to set after it has imported the download. Sonarr will not remove torrents in that category even if seeding finished. Leave blank to keep same category.', 'type': 'textbox', 'advanced': True, 'privacy': 'normal', 'isFloat': False}, {'order': 8, 'name': 'recentTvPriority', 'label': 'Recent Priority', 'helpText': 'Priority to use when grabbing episodes that aired within the last 14 days', 'value': 0, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': 0, 'name': 'Last', 'order': 0}, {'value': 1, 'name': 'First', 'order': 1}], 'privacy': 'normal', 'isFloat': False}, {'order': 9, 'name': 'olderTvPriority', 'label': 'Older Priority', 'helpText': 'Priority to use when grabbing episodes that aired over 14 days ago', 'value': 0, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': 0, 'name': 'Last', 'order': 0}, {'value': 1, 'name': 'First', 'order': 1}], 'privacy': 'normal', 'isFloat': False}, {'order': 10, 'name': 'initialState', 'label': 'Initial State', 'helpText': 'Initial state for torrents added to qBittorrent. Note that Forced Torrents do not abide by seed restrictions', 'value': 0, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': 0, 'name': 'Start', 'order': 0}, {'value': 1, 'name': 'ForceStart', 'order': 1}, {'value': 2, 'name': 'Pause', 'order': 2}], 'privacy': 'normal', 'isFloat': False}, {'order': 11, 'name': 'sequentialOrder', 'label': 'Sequential Order', 'helpText': 'Download in sequential order (qBittorrent 4.1.0+)', 'value': False, 'type': 'checkbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 12, 'name': 'firstAndLast', 'label': 'First and Last First', 'helpText': 'Download first and last pieces first (qBittorrent 4.1.0+)', 'value': True, 'type': 'checkbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 13, 'name': 'contentLayout', 'label': 'Content Layout', 'helpText': "Whether to use qBittorrent's configured content layout, the original layout from the torrent or always create a subfolder (qBittorrent 4.3.2+)", 'value': 0, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': 0, 'name': 'Default', 'order': 0}, {'value': 1, 'name': 'Original', 'order': 1}, {'value': 2, 'name': 'Subfolder', 'order': 2}], 'privacy': 'normal', 'isFloat': False}], 'implementationName': 'qBittorrent', 'implementation': 'QBittorrent', 'configContract': 'QBittorrentSettings', 'infoLink': 'https://wiki.servarr.com/sonarr/supported#qbittorrent', 'tags': [], 'id': 1}, {'enable': True, 'protocol': 'usenet', 'priority': 25, 'removeCompletedDownloads': True, 'removeFailedDownloads': True, 'name': 'SABnzbd', 'fields': [{'order': 0, 'name': 'host', 'label': 'Host', 'value': 'nzb', 'type': 'textbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 1, 'name': 'port', 'label': 'Port', 'value': 8080, 'type': 'textbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 2, 'name': 'useSsl', 'label': 'Use SSL', 'helpText': 'Use secure connection when connection to Sabnzbd', 'value': False, 'type': 'checkbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 3, 'name': 'urlBase', 'label': 'URL Base', 'helpText': 'Adds a prefix to the Sabnzbd url, such as http://[host]:[port]/[urlBase]/api', 'type': 'textbox', 'advanced': True, 'privacy': 'normal', 'isFloat': False}, {'order': 4, 'name': 'apiKey', 'label': 'API Key', 'value': '********', 'type': 'textbox', 'advanced': False, 'privacy': 'apiKey', 'isFloat': False}, {'order': 5, 'name': 'username', 'label': 'Username', 'type': 'textbox', 'advanced': False, 'privacy': 'userName', 'isFloat': False}, {'order': 6, 'name': 'password', 'label': 'Password', 'type': 'password', 'advanced': False, 'privacy': 'password', 'isFloat': False}, {'order': 7, 'name': 'tvCategory', 'label': 'Category', 'helpText': 'Adding a category specific to Sonarr avoids conflicts with unrelated non-Sonarr downloads. Using a category is optional, but strongly recommended.', 'value': 'tv', 'type': 'textbox', 'advanced': False, 'privacy': 'normal', 'isFloat': False}, {'order': 8, 'name': 'recentTvPriority', 'label': 'Recent Priority', 'helpText': 'Priority to use when grabbing episodes that aired within the last 14 days', 'value': -100, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': -100, 'name': 'Default', 'order': -100}, {'value': -2, 'name': 'Paused', 'order': -2}, {'value': -1, 'name': 'Low', 'order': -1}, {'value': 0, 'name': 'Normal', 'order': 0}, {'value': 1, 'name': 'High', 'order': 1}, {'value': 2, 'name': 'Force', 'order': 2}], 'privacy': 'normal', 'isFloat': False}, {'order': 9, 'name': 'olderTvPriority', 'label': 'Older Priority', 'helpText': 'Priority to use when grabbing episodes that aired over 14 days ago', 'value': -100, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': -100, 'name': 'Default', 'order': -100}, {'value': -2, 'name': 'Paused', 'order': -2}, {'value': -1, 'name': 'Low', 'order': -1}, {'value': 0, 'name': 'Normal', 'order': 0}, {'value': 1, 'name': 'High', 'order': 1}, {'value': 2, 'name': 'Force', 'order': 2}], 'privacy': 'normal', 'isFloat': False}], 'implementationName': 'SABnzbd', 'implementation': 'Sabnzbd', 'configContract': 'SabnzbdSettings', 'infoLink': 'https://wiki.servarr.com/sonarr/supported#sabnzbd', 'tags': [], 'id': 3}]
Traceback (most recent call last):
  File "/usr/local/bin/buildarr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/cli.py", line 94, in dump_config
    .from_remote(
     ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr/manager/__init__.py", line 171, in from_remote
    return instance_config.from_remote(secrets)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/__init__.py", line 340, in from_remote
    settings=SonarrSettingsConfig.from_remote(secrets),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr/config/base.py", line 85, in from_remote
    fields[field_name] = field.type_.from_remote(secrets)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/download_clients/__init__.py", line 155, in from_remote
    "definitions": {
                   ^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/download_clients/__init__.py", line 158, in <dictcomp>
    ]._from_remote(
      ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/download_clients/download_clients.py", line 323, in _from_remote
    **cls.get_local_attrs(
      ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr/config/base.py", line 215, in get_local_attrs
    raise ValueError(
ValueError: 'value' attribute not included for remote field 'urlBase' and 'field_default' not defined in local attribute
Callum027 commented 6 months ago

Hi there, sorry for taking a while to respond (was on break).

Thanks for the bug report. This should be an easy fix, just need to reconfigure how Buildarr handles this field when the value is not set on the Sonarr instance. I'll make a PR for fixing this in the next release.

Callum027 commented 6 months ago

Thanks for waiting. The fix for this issue has been released as:

Please give the new version a try to check that it resolves your issue.

rabidoyster commented 6 months ago

Hi, I'm using the docker container and when specifying latest, with an updated image, I am still getting this error for Sonarr, but not Radarr.

  File "/usr/local/lib/python3.11/site-packages/buildarr/config/base.py", line 215, in get_local_attrs
    raise ValueError(
ValueError: 'value' attribute not included for remote field 'urlBase' and 'field_default' not defined in local attribute

There is also a urlbase value for Host settings on the general tab which is blank for me? Or am I doing something else wrong?

Callum027 commented 6 months ago

Hi, I'm using the docker container and when specifying latest, with an updated image, I am still getting this error for Sonarr, but not Radarr.

  File "/usr/local/lib/python3.11/site-packages/buildarr/config/base.py", line 215, in get_local_attrs
    raise ValueError(
ValueError: 'value' attribute not included for remote field 'urlBase' and 'field_default' not defined in local attribute

There is also a urlbase value for Host settings on the general tab which is blank for me? Or am I doing something else wrong?

Hi there, sorry to hear you're still having issues.

I have a couple of questions:

A-Flying-Poro commented 6 months ago

Sorry for the late reply, I am unable to replicate the issue to confirm it has been fixed since I have set a value and then deleted it, effectively making Sonarr report a default value instead of missing values. But I do believe this update would have fixed the issue since it is the same as the previously mentioned issue.

Thank you so much for the time and effort you have put into the project!

rabidoyster commented 6 months ago

@Callum027 After a little sleep the problem became obvious- I have both a Sab and NZBget client configured in Sonarr. Deleting the NZBget config that I wasn't using, but also had an empty urlBase value, resulted in a successful dump. Here's a couple chunks of the log output before I solved it. If i can provide anything else to make it easier to fix for others let me know:

# buildarr sonarr dump-config http://192.168.1.200:8989
Sonarr instance API key (or leave blank to auto-fetch): 
2024-03-11 15:18:08,882 buildarr:43 buildarr_sonarr.api [DEBUG] GET http://192.168.1.200:8989/initialize.js
2024-03-11 15:18:08,884 buildarr:43 urllib3.connectionpool [DEBUG] Starting new HTTP connection (1): 192.168.1.200:8989
2024-03-11 15:18:08,887 buildarr:43 urllib3.connectionpool [DEBUG] http://192.168.1.200:8989 "GET /initialize.js HTTP/1.1" 200 None
2024-03-11 15:18:08,889 buildarr:43 charset_normalizer [DEBUG] Encoding detection: ascii is most likely the one.
2024-03-11 15:18:08,890 buildarr:43 buildarr_sonarr.api [DEBUG] GET http://192.168.1.200:8989/initialize.js -> status_code=200 res={'apiRoot': '/api/v3', 'apiKey': '<snip>', 'release': '3.0.10.1567-main', 'version': '3.0.10.1567', 'instanceName': 'Sonarr', 'branch': 'main', 'analytics': True, 'urlBase': '', 'isProduction': True}
2024-03-11 15:18:08,890 buildarr:43 buildarr_sonarr.api [DEBUG] GET http://192.168.1.200:8989/api/v3/system/status
2024-03-11 15:18:08,891 buildarr:43 urllib3.connectionpool [DEBUG] Starting new HTTP connection (1): 192.168.1.200:8989
2024-03-11 15:18:08,895 buildarr:43 urllib3.connectionpool [DEBUG] http://192.168.1.200:8989 "GET /api/v3/system/status HTTP/1.1" 200 None
2024-03-11 15:18:08,896 buildarr:43 buildarr_sonarr.api [DEBUG] GET http://192.168.1.200:8989/api/v3/system/status -> status_code=200 res={'appName': 'Sonarr', 'instanceName': 'Sonarr', 'version': '3.0.10.1567', 'buildTime': '2023-07-07T03:59:24.2439634Z', 'isDebug': False, 'isProduction': True, 'isAdmin': False, 'isUserInteractive': False, 'startupPath': '/usr/lib/sonarr/bin', 'appData': '/var/lib/sonarr', 'osName': 'debian', 'osVersion': '10', 'isMonoRuntime': True, 'isMono': True, 'isLinux': True, 'isOsx': False, 'isWindows': False, 'mode': 'console', 'branch': 'main', 'authentication': 'none', 'sqliteVersion': '3.27.2', 'urlBase': '', 'runtimeVersion': '6.12.0.182', 'runtimeName': 'mono', 'startTime': '2024-02-18T18:41:07.059199Z', 'packageVersion': '3.0.8.1507-spk78-x64-7.0', 'packageAuthor': '[Servarr](https://sonarr.tv/)', 'packageUpdateMechanism': 'builtIn'}
...
2024-03-11 15:18:09,045 buildarr:43 buildarr_sonarr.api [DEBUG] GET http://192.168.1.200:8989/api/v3/downloadclient -> status_code=200 res=[{'enable': False, 'protocol': 'usenet', 'priority': 1, 'removeCompletedDownloads': True, 'removeFailedDownloads': True, 'name': 'NZBGet', 'fields': [{'order': 0, 'name': 'host', 'label': 'Host', 'value': '192.168.1.203', 'type': 'textbox', 'advanced': False}, {'order': 1, 'name': 'port', 'label': 'Port', 'value': 6789, 'type': 'textbox', 'advanced': False}, {'order': 2, 'name': 'useSsl', 'label': 'Use SSL', 'helpText': 'Use secure connection when connecting to NZBGet', 'value': False, 'type': 'checkbox', 'advanced': False}, {'order': 3, 'name': 'urlBase', 'label': 'Url Base', 'helpText': 'Adds a prefix to the nzbget url, e.g. http://[host]:[port]/[urlBase]/jsonrpc', 'type': 'textbox', 'advanced': True}, {'order': 4, 'name': 'username', 'label': 'Username', 'value': '##REDACTED##', 'type': 'textbox', 'advanced': False}, {'order': 5, 'name': 'password', 'label': 'Password', 'value': '##REDACTED##', 'type': 'password', 'advanced': False}, {'order': 6, 'name': 'tvCategory', 'label': 'Category', 'helpText': 'Adding a category specific to Sonarr avoids conflicts with unrelated non-Sonarr downloads. Using a category is optional, but strongly recommended.', 'value': 'Sonarr', 'type': 'textbox', 'advanced': False}, {'order': 7, 'name': 'recentTvPriority', 'label': 'Recent Priority', 'helpText': 'Priority to use when grabbing episodes that aired within the last 14 days', 'value': 0, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': -100, 'name': 'VeryLow', 'order': -100}, {'value': -50, 'name': 'Low', 'order': -50}, {'value': 0, 'name': 'Normal', 'order': 0}, {'value': 50, 'name': 'High', 'order': 50}, {'value': 100, 'name': 'VeryHigh', 'order': 100}, {'value': 900, 'name': 'Force', 'order': 900}]}, {'order': 8, 'name': 'olderTvPriority', 'label': 'Older Priority', 'helpText': 'Priority to use when grabbing episodes that aired over 14 days ago', 'value': 0, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': -100, 'name': 'VeryLow', 'order': -100}, {'value': -50, 'name': 'Low', 'order': -50}, {'value': 0, 'name': 'Normal', 'order': 0}, {'value': 50, 'name': 'High', 'order': 50}, {'value': 100, 'name': 'VeryHigh', 'order': 100}, {'value': 900, 'name': 'Force', 'order': 900}]}, {'order': 9, 'name': 'addPaused', 'label': 'Add Paused', 'helpText': 'This option requires at least NzbGet version 16.0', 'value': False, 'type': 'checkbox', 'advanced': False}], 'implementationName': 'NZBGet', 'implementation': 'Nzbget', 'configContract': 'NzbgetSettings', 'infoLink': 'https://wiki.servarr.com/sonarr/supported#nzbget', 'tags': [], 'id': 2}, {'enable': True, 'protocol': 'usenet', 'priority': 2, 'removeCompletedDownloads': True, 'removeFailedDownloads': True, 'name': 'SABnzbd Syno', 'fields': [{'order': 0, 'name': 'host', 'label': 'Host', 'value': '192.168.1.200', 'type': 'textbox', 'advanced': False}, {'order': 1, 'name': 'port', 'label': 'Port', 'value': 8080, 'type': 'textbox', 'advanced': False}, {'order': 2, 'name': 'useSsl', 'label': 'Use SSL', 'helpText': 'Use secure connection when connecting to Sabnzbd', 'value': False, 'type': 'checkbox', 'advanced': False}, {'order': 3, 'name': 'urlBase', 'label': 'Url Base', 'helpText': 'Adds a prefix to the Sabnzbd url, e.g. http://[host]:[port]/[urlBase]/api', 'value': '', 'type': 'textbox', 'advanced': True}, {'order': 4, 'name': 'apiKey', 'label': 'API Key', 'value': '##REDACTED##', 'type': 'textbox', 'advanced': False}, {'order': 5, 'name': 'username', 'label': 'Username', 'type': 'textbox', 'advanced': False}, {'order': 6, 'name': 'password', 'label': 'Password', 'type': 'password', 'advanced': False}, {'order': 7, 'name': 'tvCategory', 'label': 'Category', 'helpText': 'Adding a category specific to Sonarr avoids conflicts with unrelated non-Sonarr downloads. Using a category is optional, but strongly recommended.', 'value': 'sonarr', 'type': 'textbox', 'advanced': False}, {'order': 8, 'name': 'recentTvPriority', 'label': 'Recent Priority', 'helpText': 'Priority to use when grabbing episodes that aired within the last 14 days', 'value': -100, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': -100, 'name': 'Default', 'order': -100}, {'value': -2, 'name': 'Paused', 'order': -2}, {'value': -1, 'name': 'Low', 'order': -1}, {'value': 0, 'name': 'Normal', 'order': 0}, {'value': 1, 'name': 'High', 'order': 1}, {'value': 2, 'name': 'Force', 'order': 2}]}, {'order': 9, 'name': 'olderTvPriority', 'label': 'Older Priority', 'helpText': 'Priority to use when grabbing episodes that aired over 14 days ago', 'value': -100, 'type': 'select', 'advanced': False, 'selectOptions': [{'value': -100, 'name': 'Default', 'order': -100}, {'value': -2, 'name': 'Paused', 'order': -2}, {'value': -1, 'name': 'Low', 'order': -1}, {'value': 0, 'name': 'Normal', 'order': 0}, {'value': 1, 'name': 'High', 'order': 1}, {'value': 2, 'name': 'Force', 'order': 2}]}], 'implementationName': 'SABnzbd', 'implementation': 'Sabnzbd', 'configContract': 'SabnzbdSettings', 'infoLink': 'https://wiki.servarr.com/sonarr/supported#sabnzbd', 'tags': [], 'id': 1}]
Traceback (most recent call last):
  File "/usr/local/bin/buildarr", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/cli.py", line 94, in dump_config
    .from_remote(
     ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr/manager/__init__.py", line 171, in from_remote
    return instance_config.from_remote(secrets)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/__init__.py", line 340, in from_remote
    settings=SonarrSettingsConfig.from_remote(secrets),
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr/config/base.py", line 85, in from_remote
    fields[field_name] = field.type_.from_remote(secrets)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/download_clients/__init__.py", line 155, in from_remote
    "definitions": {
                   ^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/download_clients/__init__.py", line 158, in <dictcomp>
    ]._from_remote(
      ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr_sonarr/config/download_clients/download_clients.py", line 323, in _from_remote
    **cls.get_local_attrs(
      ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/buildarr/config/base.py", line 215, in get_local_attrs
    raise ValueError(
ValueError: 'value' attribute not included for remote field 'urlBase' and 'field_default' not defined in local attribute
Callum027 commented 6 months ago

Thanks for the report @rabidoyster. It's likely that all of the indexers that can have a URL base supplied suffer from the same issue.

This problem (and other related API parsing issues) will be resolved in the future by switching the Sonarr plugin to the Sonarr client Python library.

For now, I'll make a separate issue for enabling field_default on all of the indexers.