I'm trying to add a new field to the "information" panel of a review request. The error I'm getting during initialization is "fieldset is not None", even though I put 'info'. Furthermore, when I tried to debug this with unit tests I get an error that settings_local can't be defined, but the docs seem to claim I should be getting that file built for me by the tool. I'll put the class, and full error below, hopefully they are legible.
A slightly redacted class:
class CLField(BaseEditableField):
field_id = 'vendor_cl'
label = 'Vendor CL'
class VendorIntegrationExtension(Extension):
metadata = {
'Name': _('Vendor Integration'),
'Summary': _('foo'),
}
def initialize(self):
ReviewRequestFieldsHook(self, 'info', [CLField])
The error from the logs:
2025-11-07 19:45:44,277 - ERROR - - djblets.extensions.manager - Unable to initialize extension <class 'devserv.extension.VendorIntegrationExtension'>: │
│Traceback (most recent call last): │
│ File "/venv/lib/python3.11/site-packages/djblets/extensions/manager.py", line 931, in _init_extension │
│ extension = ext_class(extension_manager=self) │
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │
│ File "/venv/lib/python3.11/site-packages/djblets/extensions/extension.py", line 496, in __init__ │
│ self.initialize() │
│ File "/vendor/devserv/extension.py", line 26, in initialize │
│ ReviewRequestFieldsHook(self, 'info', [CLField]) │
│ File "/venv/lib/python3.11/site-packages/djblets/extensions/hooks.py", line 141, in __init__ │
│ self.enable_hook(*args, **kwargs) │
│ File "/venv/lib/python3.11/site-packages/djblets/extensions/hooks.py", line 243, in enable_hook │
│ self.initialize(*args, **kwargs) │
│ File "/venv/lib/python3.11/site-packages/reviewboard/extensions/hooks/fields.py", line 103, in initialize │
│ assert fieldset is not None │
│AssertionError │
│2025-11-07 19:45:44,280 - ERROR - None - admin - /api/extensions/devserv.extension.VendorIntegrationExtension/ - django.request - Internal Server Error: /api/extensions/devserv.extens│
│2
The error from `rbext test`:
root:/devserv# rbext test -e devserv.extension.VendorIntegrationExtension
ERROR: Unable to import settings_local.py: No module named
'settings_local'
Unexpected exception when running command "test": name 'settings_local' is not defined
Traceback (most recent call last):
File "/venv/lib/python3.11/site-packages/reviewboard/cmdline/rbext.py", line 1028, in run
return command.run(options)
^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/reviewboard/cmdline/rbext.py", line 86, in run
return self.main(options)
^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/reviewboard/cmdline/rbext.py", line 238, in main
setup()
File "/venv/lib/python3.11/site-packages/django/__init__.py", line 19, in setup
configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 102, in __getattr__
self._setup(name)
File "/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 89, in _setup
self._wrapped = Settings(settings_module)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/venv/lib/python3.11/site-packages/django/conf/__init__.py", line 217, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/venv/lib/python3.11/site-packages/reviewboard/settings.py", line 497, in <module>
local_dir = os.path.dirname(settings_local.__file__)
^^^^^^^^^^^^^^
NameError: name 'settings_local' is not defined
-Josh