Closed A-Flying-Poro closed 8 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.
Thanks for waiting. The fix for this issue has been released as:
callum027/buildarr:0.7.6
(or update your local container if using latest
)buildarr-installer-0.7.6-x64.exe
buildarr-sonarr==0.6.4
Please give the new version a try to check that it resolves your issue.
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, 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:
2023-11-12 10:00:29,932 buildarr:1 buildarr.cli.run [INFO] Loaded plugins: jellyseerr (0.3.2), prowlarr (0.5.1), radarr (0.2.5), sonarr (0.6.4)
DEBUG
? This can be done by setting the BUILDARR_LOG_LEVEL
environment variable to DEBUG
in the container.
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!
@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
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.
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.