Value after * must be an iterable, not NoneType #11076

Closed
opened 2025-12-29 21:39:53 +01:00 by adam · 4 comments
Owner

Originally created by @opericgithub on GitHub (Apr 23, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.3.0-beta2

Python Version

3.12

Steps to Reproduce

  1. Upgrade from a fully functional NetBox v4.2.7 to v4.3.0-beta2

  2. After clicking on certain menu items, I encounter the following error page (see Observed behavior section)

The menu items that trigger the error in my case include:

Organization > Regions
Organization > Site Groups
Organization > Locations
Organization > Tenants
Organization > Tenant Groups
Organization > Contact Roles
Devices > Modules
Devices > Platforms

and more of the others.

I'm eager to help troubleshoot this issue and provide any additional information needed, but I would appreciate some guidance on what specific information or logs I can provide to help narrow it down.

Expected Behavior

Menu items and their submenus should open and display content without errors.

Observed Behavior

I get the following error page:

Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'TypeError'>

Value after * must be an iterable, not NoneType

Python version: 3.12.3
NetBox version: 4.3.0-beta2
Plugins: None installed
If further assistance is required, please post to the [NetBox discussion forum](https://github.com/netbox-community/netbox/discussions) on GitHub.

Image

Originally created by @opericgithub on GitHub (Apr 23, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.3.0-beta2 ### Python Version 3.12 ### Steps to Reproduce 1. Upgrade from a fully functional NetBox v4.2.7 to v4.3.0-beta2 2. After clicking on certain menu items, I encounter the following error page (see Observed behavior section) The menu items that trigger the error in my case include: Organization > Regions Organization > Site Groups Organization > Locations Organization > Tenants Organization > Tenant Groups Organization > Contact Roles Devices > Modules Devices > Platforms and more of the others. I'm eager to help troubleshoot this issue and provide any additional information needed, but I would appreciate some guidance on what specific information or logs I can provide to help narrow it down. ### Expected Behavior Menu items and their submenus should open and display content without errors. ### Observed Behavior I get the following error page: ``` Server Error There was a problem with your request. Please contact an administrator. The complete exception is provided below: <class 'TypeError'> Value after * must be an iterable, not NoneType Python version: 3.12.3 NetBox version: 4.3.0-beta2 Plugins: None installed If further assistance is required, please post to the [NetBox discussion forum](https://github.com/netbox-community/netbox/discussions) on GitHub. ``` ![Image](https://github.com/user-attachments/assets/908635e4-5c1a-4a7b-beae-20287c509304)
adam added the type: bugstatus: acceptedbetaseverity: medium labels 2025-12-29 21:39:53 +01:00
adam closed this issue 2025-12-29 21:39:54 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 23, 2025):

I'm not able to reproduce this on v4.3.0-beta2. Please ensure that you've upgraded your Python environment accordingly (pip install -r requirements.txt).

Otherwise please provide a stack trace by setting DEBUG = True in configuration.py and restarting the service before reproducing the error.

@jeremystretch commented on GitHub (Apr 23, 2025): I'm not able to reproduce this on v4.3.0-beta2. Please ensure that you've upgraded your Python environment accordingly (`pip install -r requirements.txt`). Otherwise please provide a stack trace by setting `DEBUG = True` in `configuration.py` and restarting the service before reproducing the error.
Author
Owner

@opericgithub commented on GitHub (Apr 23, 2025):

TypeError at /core/changelog/
Value after * must be an iterable, not NoneType
Request Method:	GET
Request URL:	https://netboxtest/core/changelog/?per_page=25&embedded=True
Django Version:	5.2
Exception Type:	TypeError
Exception Value:	
Value after * must be an iterable, not NoneType
Exception Location:	/opt/netbox/netbox/netbox/tables/tables.py, line 122, in _set_columns
Raised during:	core.views.ObjectChangeListView
Python Executable:	/opt/netbox/venv/bin/python3
Python Version:	3.12.3
Python Path:	
['/opt/netbox/netbox',
 '/opt/netbox',
 '/opt/netbox/venv/bin',
 '/usr/lib/python312.zip',
 '/usr/lib/python3.12',
 '/usr/lib/python3.12/lib-dynload',
 '/opt/netbox/venv/lib/python3.12/site-packages']
Server time:	Wed, 23 Apr 2025 22:32:39 +0200
Environment:


Request Method: GET
Request URL: https://netboxtest/core/changelog/?per_page=25&embedded=True

Django Version: 5.2
Python Version: 3.12.3
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'django.forms',
 'corsheaders',
 'debug_toolbar',
 'django_filters',
 'django_htmx',
 'django_tables2',
 'django_prometheus',
 'strawberry_django',
 'mptt',
 'rest_framework',
 'social_django',
 'taggit',
 'timezone_field',
 'core',
 'account',
 'circuits',
 'dcim',
 'ipam',
 'extras',
 'tenancy',
 'users',
 'utilities',
 'virtualization',
 'vpn',
 'wireless',
 'django_rq',
 'drf_spectacular',
 'drf_spectacular_sidecar']
Installed Middleware:
['strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'django_htmx.middleware.HtmxMiddleware',
 'netbox.middleware.RemoteUserMiddleware',
 'netbox.middleware.CoreMiddleware',
 'netbox.middleware.MaintenanceModeMiddleware']



Traceback (most recent call last):
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
               ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
    return self.dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/netbox/netbox/views/generic/base.py", line 77, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/netbox/utilities/views.py", line 125, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/netbox/utilities/views.py", line 39, in dispatch
    return super().dispatch(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch
    return handler(request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/netbox/netbox/views/generic/bulk_views.py", line 177, in get
    table = self.get_table(self.queryset, request, has_bulk_actions)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/netbox/netbox/views/generic/mixins.py", line 65, in get_table
    table.configure(request)
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/netbox/netbox/tables/tables.py", line 174, in configure
    self._set_columns(columns)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/netbox/netbox/netbox/tables/tables.py", line 122, in _set_columns
    if column.name not in [*selected_columns, *self.exempt_columns]:
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Exception Type: TypeError at /core/changelog/
Exception Value: Value after * must be an iterable, not NoneType

@opericgithub commented on GitHub (Apr 23, 2025): ``` TypeError at /core/changelog/ Value after * must be an iterable, not NoneType Request Method: GET Request URL: https://netboxtest/core/changelog/?per_page=25&embedded=True Django Version: 5.2 Exception Type: TypeError Exception Value: Value after * must be an iterable, not NoneType Exception Location: /opt/netbox/netbox/netbox/tables/tables.py, line 122, in _set_columns Raised during: core.views.ObjectChangeListView Python Executable: /opt/netbox/venv/bin/python3 Python Version: 3.12.3 Python Path: ['/opt/netbox/netbox', '/opt/netbox', '/opt/netbox/venv/bin', '/usr/lib/python312.zip', '/usr/lib/python3.12', '/usr/lib/python3.12/lib-dynload', '/opt/netbox/venv/lib/python3.12/site-packages'] Server time: Wed, 23 Apr 2025 22:32:39 +0200 ``` ``` Environment: Request Method: GET Request URL: https://netboxtest/core/changelog/?per_page=25&embedded=True Django Version: 5.2 Python Version: 3.12.3 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django.forms', 'corsheaders', 'debug_toolbar', 'django_filters', 'django_htmx', 'django_tables2', 'django_prometheus', 'strawberry_django', 'mptt', 'rest_framework', 'social_django', 'taggit', 'timezone_field', 'core', 'account', 'circuits', 'dcim', 'ipam', 'extras', 'tenancy', 'users', 'utilities', 'virtualization', 'vpn', 'wireless', 'django_rq', 'drf_spectacular', 'drf_spectacular_sidecar'] Installed Middleware: ['strawberry_django.middlewares.debug_toolbar.DebugToolbarMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_htmx.middleware.HtmxMiddleware', 'netbox.middleware.RemoteUserMiddleware', 'netbox.middleware.CoreMiddleware', 'netbox.middleware.MaintenanceModeMiddleware'] Traceback (most recent call last): File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view return self.dispatch(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/netbox/netbox/views/generic/base.py", line 77, in dispatch return super().dispatch(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/netbox/utilities/views.py", line 125, in dispatch return super().dispatch(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/netbox/utilities/views.py", line 39, in dispatch return super().dispatch(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 143, in dispatch return handler(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/netbox/netbox/views/generic/bulk_views.py", line 177, in get table = self.get_table(self.queryset, request, has_bulk_actions) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/netbox/netbox/views/generic/mixins.py", line 65, in get_table table.configure(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/netbox/netbox/tables/tables.py", line 174, in configure self._set_columns(columns) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/netbox/netbox/netbox/tables/tables.py", line 122, in _set_columns if column.name not in [*selected_columns, *self.exempt_columns]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Exception Type: TypeError at /core/changelog/ Exception Value: Value after * must be an iterable, not NoneType ```
Author
Owner

@jeremystretch commented on GitHub (Apr 24, 2025):

@opericgithub can you share the value of DEFAULT_USER_PREFERENCES from your configuration file?

Also please test PR #19314 if you're able to confirm whether that resolves the issue for you.

@jeremystretch commented on GitHub (Apr 24, 2025): @opericgithub can you share the value of `DEFAULT_USER_PREFERENCES` from your configuration file? Also please test PR #19314 if you're able to confirm whether that resolves the issue for you.
Author
Owner

@opericgithub commented on GitHub (Apr 24, 2025):

yes, sure @jeremystretch, here is the section:

DEFAULT_USER_PREFERENCES = {
    'pagination': { 
        'per_page': 500,        
        'placement': "both" 
    },
    'tables': {
        'TagTable': {
            'columns': ['name', 'items', 'color', 'description']
        },
        'IPAddressTable': {
            'columns': ['address', 'status', 'tenant', 'assigned', 'assigned_object_parent', 'assigned_object', 'dns_name', 'description', 'nat_inside', 'nat_outside']
        },
        'RackTable': {
            'columns': ['asset_tag', 'name', 'site', 'location', 'role', 'status', 'width', 'u_height', 'device_count', 'get_utilization']
        },
        'SiteTable': {
            'columns': ['name', 'physical_address', 'status', 'region', 'description']
        },
        'ProviderTable': {
            'columns': ['name', 'account_count', 'circuit_count', 'description']
        },
        'DeviceTable': {
#           'columns': ['asset_tag', 'name', 'status', 'device_role', 'device_type', 'serial', 'site', 'rack', 'contacts', 'cf_ipt_korisnik', 'cf_ipt_prostorija', 'last_updated', 'tags', 'comments'],
            'columns': ['name', 'status', 'role', 'device_type', 'serial', 'asset_tag', 'site', 'rack', 'cf_ipt_korisnik', 'cf_ipt_nalogodavac', 'cf_ipt_prostorija', 'contacts', 'tags', 'comments', 'last_updated'],
            'ordering': ['-last_updated']
        },
        'PrefixTable': {
            'columns': ['prefix', 'status', 'children', 'utilization', 'tenant', 'role', 'description', 'tags']
        },
        'CircuitTable': {
            'columns': ['cf_circuit_namena_veze', 'termination_a', 'termination_z', 'cid', 'provider', 'type', 'status', 'commit_rate', 'description', 'tenant', 'comments', 'tags'],
            'ordering': ['-cf_circuit_namena_veze']
        },
        'DeviceBayTable': {
            'columns': ['device', 'name', 'status', 'installed_device', 'device_role', 'device_type', 'description']
        },
        'DeviceRoleTable': {
            'columns': ['name', 'device_count', 'color', 'description']
        },
        'DeviceTypeTable': {
            'columns': ['manufacturer', 'model', 'instance_count', 'u_height', 'is_full_depth', 'subdevice_role', 'cf_eos_end_of_support', 'comments']
        },
        'DeviceDeviceBayTable': {
            'columns': ['name', 'status', 'installed_device', 'device_role', 'device_type', 'description', 'tags']
        },
        'CircuitTypeTable': {
            'columns': ['color', 'name', 'circuit_count', 'description', 'cf_circuit_cena_tipa_linka']
        },
        'InventoryItemTable': {
            'columns': ['name', 'device', 'manufacturer', 'part_id', 'serial', 'asset_tag', 'description', 'discovered']
        },
        'CustomFieldTable': {
            'columns': ['name', 'content_types', 'label', 'group_name', 'type', 'weight', 'description', 'ui_visibility', 'choices'],
	    'ordering': ['weight']
        },
        'ContactTable': {
            'columns': ['name', 'group', 'assignment_count', 'comments', 'description', 'tags'],
            'ordering': ['assignment_count']
        },
        'ContactGroupTable': {
            'columns': ['name', 'contact_count', 'description', 'cf_ipt_contact_group_comment','tags'],
            'ordering': ['assignment_count']
        },
        'ContactAssignmentTable': {
            'columns': ['object', 'contact', 'role', 'contact_description', 'tags', 'contact_phone']
        },
        'InterfaceTable': {
            'columns': ['name', 'enabled', 'type', 'device', 'ip_addresses', 'description'],
            'ordering': ['device']
        },
        'UserTable': {
            'columns': ['username', 'first_name', 'last_name', 'email', 'is_active', 'groups', 'last_login', 'is_staff', 'is_superuser']
        },
        'ObjectPermissionTable': {        
            'columns': ['name', 'enabled', 'object_types', 'can_view', 'can_add', 'can_change', 'can_delete', 'description', 'custom_actions', 'groups']
        },
        'JournalEntryTable': {
            'columns': ['assigned_object_type', 'assigned_object', 'kind', 'comments', 'id']
        },
    }
}

I can confirm that changing the tables.py like described in PR#19314 resolves the issue.

@opericgithub commented on GitHub (Apr 24, 2025): yes, sure @jeremystretch, here is the section: ``` DEFAULT_USER_PREFERENCES = { 'pagination': { 'per_page': 500, 'placement': "both" }, 'tables': { 'TagTable': { 'columns': ['name', 'items', 'color', 'description'] }, 'IPAddressTable': { 'columns': ['address', 'status', 'tenant', 'assigned', 'assigned_object_parent', 'assigned_object', 'dns_name', 'description', 'nat_inside', 'nat_outside'] }, 'RackTable': { 'columns': ['asset_tag', 'name', 'site', 'location', 'role', 'status', 'width', 'u_height', 'device_count', 'get_utilization'] }, 'SiteTable': { 'columns': ['name', 'physical_address', 'status', 'region', 'description'] }, 'ProviderTable': { 'columns': ['name', 'account_count', 'circuit_count', 'description'] }, 'DeviceTable': { # 'columns': ['asset_tag', 'name', 'status', 'device_role', 'device_type', 'serial', 'site', 'rack', 'contacts', 'cf_ipt_korisnik', 'cf_ipt_prostorija', 'last_updated', 'tags', 'comments'], 'columns': ['name', 'status', 'role', 'device_type', 'serial', 'asset_tag', 'site', 'rack', 'cf_ipt_korisnik', 'cf_ipt_nalogodavac', 'cf_ipt_prostorija', 'contacts', 'tags', 'comments', 'last_updated'], 'ordering': ['-last_updated'] }, 'PrefixTable': { 'columns': ['prefix', 'status', 'children', 'utilization', 'tenant', 'role', 'description', 'tags'] }, 'CircuitTable': { 'columns': ['cf_circuit_namena_veze', 'termination_a', 'termination_z', 'cid', 'provider', 'type', 'status', 'commit_rate', 'description', 'tenant', 'comments', 'tags'], 'ordering': ['-cf_circuit_namena_veze'] }, 'DeviceBayTable': { 'columns': ['device', 'name', 'status', 'installed_device', 'device_role', 'device_type', 'description'] }, 'DeviceRoleTable': { 'columns': ['name', 'device_count', 'color', 'description'] }, 'DeviceTypeTable': { 'columns': ['manufacturer', 'model', 'instance_count', 'u_height', 'is_full_depth', 'subdevice_role', 'cf_eos_end_of_support', 'comments'] }, 'DeviceDeviceBayTable': { 'columns': ['name', 'status', 'installed_device', 'device_role', 'device_type', 'description', 'tags'] }, 'CircuitTypeTable': { 'columns': ['color', 'name', 'circuit_count', 'description', 'cf_circuit_cena_tipa_linka'] }, 'InventoryItemTable': { 'columns': ['name', 'device', 'manufacturer', 'part_id', 'serial', 'asset_tag', 'description', 'discovered'] }, 'CustomFieldTable': { 'columns': ['name', 'content_types', 'label', 'group_name', 'type', 'weight', 'description', 'ui_visibility', 'choices'], 'ordering': ['weight'] }, 'ContactTable': { 'columns': ['name', 'group', 'assignment_count', 'comments', 'description', 'tags'], 'ordering': ['assignment_count'] }, 'ContactGroupTable': { 'columns': ['name', 'contact_count', 'description', 'cf_ipt_contact_group_comment','tags'], 'ordering': ['assignment_count'] }, 'ContactAssignmentTable': { 'columns': ['object', 'contact', 'role', 'contact_description', 'tags', 'contact_phone'] }, 'InterfaceTable': { 'columns': ['name', 'enabled', 'type', 'device', 'ip_addresses', 'description'], 'ordering': ['device'] }, 'UserTable': { 'columns': ['username', 'first_name', 'last_name', 'email', 'is_active', 'groups', 'last_login', 'is_staff', 'is_superuser'] }, 'ObjectPermissionTable': { 'columns': ['name', 'enabled', 'object_types', 'can_view', 'can_add', 'can_change', 'can_delete', 'description', 'custom_actions', 'groups'] }, 'JournalEntryTable': { 'columns': ['assigned_object_type', 'assigned_object', 'kind', 'comments', 'id'] }, } } ``` I can confirm that changing the tables.py like described in PR#19314 resolves the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11076