mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-11 21:10:29 +01:00
Exception when adding ?sort=ports to Service and ServiceTemplate list view #6537
Closed
opened 2025-12-29 19:42:05 +01:00 by adam
·
5 comments
No Branch/Tag Specified
main
update-changelog-comments-docs
feature-removal-issue-type
20911-dropdown
20239-plugin-menu-classes-mutable-state
21097-graphql-id-lookups
feature
fix_module_substitution
20923-dcim-templates
20044-elevation-stuck-lightmode
feature-ip-prefix-link
v4.5-beta1-release
20068-import-moduletype-attrs
20766-fix-german-translation-code-literals
20378-del-script
7604-filter-modifiers-v3
circuit-swap
12318-case-insensitive-uniqueness
20637-improve-device-q-filter
20660-script-load
19724-graphql
20614-update-ruff
14884-script
02496-max-page
19720-macaddress-interface-generic-relation
19408-circuit-terminations-export-templates
20203-openapi-check
fix-19669-api-image-download
7604-filter-modifiers
19275-fixes-interface-bulk-edit
fix-17794-get_field_value_return_list
11507-show-aggregate-and-rir-on-api
9583-add_column_specific_search_field_to_tables
v4.5.0
v4.4.10
v4.4.9
v4.5.0-beta1
v4.4.8
v4.4.7
v4.4.6
v4.4.5
v4.4.4
v4.4.3
v4.4.2
v4.4.1
v4.4.0
v4.3.7
v4.4.0-beta1
v4.3.6
v4.3.5
v4.3.4
v4.3.3
v4.3.2
v4.3.1
v4.3.0
v4.2.9
v4.3.0-beta2
v4.2.8
v4.3.0-beta1
v4.2.7
v4.2.6
v4.2.5
v4.2.4
v4.2.3
v4.2.2
v4.2.1
v4.2.0
v4.1.11
v4.1.10
v4.1.9
v4.1.8
v4.2-beta1
v4.1.7
v4.1.6
v4.1.5
v4.1.4
v4.1.3
v4.1.2
v4.1.1
v4.1.0
v4.0.11
v4.0.10
v4.0.9
v4.1-beta1
v4.0.8
v4.0.7
v4.0.6
v4.0.5
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.7.8
v3.7.7
v4.0-beta2
v3.7.6
v3.7.5
v4.0-beta1
v3.7.4
v3.7.3
v3.7.2
v3.7.1
v3.7.0
v3.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v1.0.3-r1
v1.0.3
1.0.0
Labels
Clear labels
beta
breaking change
complexity: high
complexity: low
complexity: medium
needs milestone
netbox
pending closure
plugin candidate
pull-request
severity: high
severity: low
severity: medium
status: accepted
status: backlog
status: blocked
status: duplicate
status: needs owner
status: needs triage
status: revisions needed
status: under review
topic: GraphQL
topic: Internationalization
topic: OpenAPI
topic: UI/UX
topic: cabling
topic: event rules
topic: htmx navigation
topic: industrialization
topic: migrations
topic: plugins
topic: scripts
topic: templating
topic: testing
type: bug
type: deprecation
type: documentation
type: feature
type: housekeeping
type: translation
Mirrored from GitHub Pull Request
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: starred/netbox#6537
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jkasnw-7823 on GitHub (Jun 3, 2022).
Originally assigned to: @kkthxbye-code on GitHub.
NetBox version
v3.2.4
Python version
3.8
Steps to Reproduce
Expected Behavior
Show the list of configured templates.
Observed Behavior
<class 'django.core.exceptions.FieldError'>
Cannot resolve keyword 'port_list' into field. Choices are: created, custom_field_data, description, id, journal_entries, last_updated, name, ports, protocol, tagged_items, tags
Python version: 3.8.10
NetBox version: 3.2.4
@jeremystretch commented on GitHub (Jun 3, 2022):
I'm not able to reproduce this on v3.2.4. Could you provide the complete stack trace? (Enable debugging by setting
DEBUG = Trueinconfiguration.py)@Jkasnw-7823 commented on GitHub (Jun 4, 2022):
After I enabled debugging, I got the attached stack-trace.
-----Ursprüngliche Nachricht-----
Von: Jeremy @.>
Gesendet: Fre 3 Juni 2022 22:22
An: netbox-community/netbox @.>
CC: Uwe Soemer @.>; Author @.>
Betreff: Re: [netbox-community/netbox] Get error: Cannot resolve keyword 'port_list' into field. (Issue #9480)
I'm not able to reproduce this on v3.2.4. Could you provide the complete stack trace? (Enable debugging by setting DEBUG = True in configuration.py)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>
@Jkasnw-7823 commented on GitHub (Jun 4, 2022):
FieldError at /ipam/service-templates/
Cannot resolve keyword 'port_list' into field. Choices are: created, custom_field_data, description, id, journal_entries, last_updated, name, ports, protocol, tagged_items, tags
Request Method: GET
Request URL: https://netbox.soe.priv/ipam/service-templates/
Django Version: 4.0.4
Exception Type: FieldError
Exception Value:
Cannot resolve keyword 'port_list' into field. Choices are: created, custom_field_data, description, id, journal_entries, last_updated, name, ports, protocol, tagged_items, tags
Exception Location: /opt/netbox/venv/lib/python3.8/site-packages/django/db/models/sql/query.py, line 1677, in names_to_path
Python Executable: /opt/netbox/venv/bin/python3
Python Version: 3.8.10
Python Path:
['/opt/netbox/netbox',
'/opt/netbox',
'/opt/netbox/venv/bin',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/opt/netbox/venv/lib/python3.8/site-packages']
Server time: Sat, 04 Jun 2022 20:24:48 +0000
Traceback Switch to copy-and-paste view
/opt/netbox/venv/lib/python3.8/site-packages/django/core/handlers/exception.py, line 55, in inner
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django/core/handlers/base.py, line 197, in _get_response
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django/views/generic/base.py, line 84, in view
1.
…Local vars
/opt/netbox/netbox/utilities/views.py, line 90, in dispatch
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django/views/generic/base.py, line 119, in dispatch
1.
…Local vars
/opt/netbox/netbox/netbox/views/generic/bulk_views.py, line 185, in get
1.
…Local vars
/opt/netbox/netbox/netbox/tables/tables.py, line 142, in configure
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django_tables2/tables.py, line 543, in order_by
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django_tables2/data.py, line 226, in order_by
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django/db/models/query.py, line 1295, in order_by
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django/db/models/sql/query.py, line 2167, in add_ordering
1.
…Local vars
/opt/netbox/venv/lib/python3.8/site-packages/django/db/models/sql/query.py, line 1677, in names_to_path
1.
…Local vars
Request information
USER
uwe
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
Variable Value
csrftoken
'DkBoqn497MSJK29SIJPZYjvKuwPmSEw5iwgh2ip6c9qzJYumcElvA0bLLUl2L3ng'
sessionid
'skhdwbue1zoznjae117z4jdlyfxz41xe'
cockpit
'dj0yO2s9ZDMyODRlMmYzZjM0MGUxZmE2ZTljY2JjZGYzNTkzNWIzNDg4NTYyZmFlMGQwNGExYTdjY2VjMjJhYjI2NDRjNQ=='
META
Variable Value
CSRF_COOKIE
'DkBoqn497MSJK29SIJPZYjvKuwPmSEw5iwgh2ip6c9qzJYumcElvA0bLLUl2L3ng'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9'
HTTP_ACCEPT_ENCODING
'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE
'de,de-DE;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6'
HTTP_CONNECTION
'close'
HTTP_COOKIE
('csrftoken=DkBoqn497MSJK29SIJPZYjvKuwPmSEw5iwgh2ip6c9qzJYumcElvA0bLLUl2L3ng; '
'sessionid=skhdwbue1zoznjae117z4jdlyfxz41xe; '
'cockpit=dj0yO2s9ZDMyODRlMmYzZjM0MGUxZmE2ZTljY2JjZGYzNTkzNWIzNDg4NTYyZmFlMGQwNGExYTdjY2VjMjJhYjI2NDRjNQ==')
HTTP_HOST
'127.0.0.1:8001'
HTTP_REFERER
'https://netbox.soe.priv/ipam/services/'
HTTP_SEC_CH_UA
'" Not A;Brand";v="99", "Chromium";v="102", "Microsoft Edge";v="102"'
HTTP_SEC_CH_UA_MOBILE
'?0'
HTTP_SEC_CH_UA_PLATFORM
'"Windows"'
HTTP_SEC_FETCH_DEST
'document'
HTTP_SEC_FETCH_MODE
'navigate'
HTTP_SEC_FETCH_SITE
'same-origin'
HTTP_SEC_FETCH_USER
'?1'
HTTP_UPGRADE_INSECURE_REQUESTS
'1'
HTTP_USER_AGENT
('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like '
'Gecko) Chrome/102.0.5005.63 Safari/537.36 Edg/102.0.1245.30')
HTTP_X_FORWARDED_HOST
'netbox.soe.priv'
HTTP_X_FORWARDED_PROTO
'https'
HTTP_X_REAL_IP
'::ffff:192.168.1.24'
PATH_INFO
'/ipam/service-templates/'
QUERY_STRING
''
RAW_URI
'/ipam/service-templates/'
REMOTE_ADDR
'127.0.0.1'
REMOTE_PORT
'41740'
REQUEST_METHOD
'GET'
SCRIPT_NAME
''
SERVER_NAME
'127.0.0.1'
SERVER_PORT
'8001'
SERVER_PROTOCOL
'HTTP/1.0'
SERVER_SOFTWARE
'gunicorn/20.1.0'
gunicorn.socket
<socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8001), raddr=('127.0.0.1', 41740)>
wsgi.errors
<gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fa87eed7d30>
wsgi.file_wrapper
<class 'gunicorn.http.wsgi.FileWrapper'>
wsgi.input
<gunicorn.http.body.Body object at 0x7fa87eed7df0>
wsgi.input_terminated
True
wsgi.multiprocess
True
wsgi.multithread
True
wsgi.run_once
False
wsgi.url_scheme
'https'
wsgi.version
(1, 0)
Settings
Using settings module netbox.settings
Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
[]
ALLOWED_HOSTS
['*']
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
['netbox.authentication.RemoteUserBackend',
'netbox.authentication.ObjectPermissionBackend']
AUTH_PASSWORD_VALIDATORS
'********************'
AUTH_USER_MODEL
'auth.User'
BASE_DIR
'/opt/netbox/netbox'
BASE_PATH
''
CACHES
{'default': {'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://localhost:6379/1',
'OPTIONS': {'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'PASSWORD': '********************'}}}
CACHE_MIDDLEWARE_ALIAS
'default'
CACHE_MIDDLEWARE_KEY_PREFIX
'********************'
CACHE_MIDDLEWARE_SECONDS
600
CACHING_REDIS_DATABASE
1
CACHING_REDIS_HOST
'localhost'
CACHING_REDIS_PASSWORD
'********************'
CACHING_REDIS_PORT
6379
CACHING_REDIS_PROTO
'redis'
CACHING_REDIS_SENTINELS
[]
CACHING_REDIS_SENTINEL_SERVICE
'default'
CACHING_REDIS_SKIP_TLS_VERIFY
False
CORS_ORIGIN_ALLOW_ALL
False
CORS_ORIGIN_REGEX_WHITELIST
[]
CORS_ORIGIN_WHITELIST
[]
CSRF_COOKIE_AGE
31449600
CSRF_COOKIE_DOMAIN
None
CSRF_COOKIE_HTTPONLY
False
CSRF_COOKIE_NAME
'csrftoken'
CSRF_COOKIE_PATH
'/'
CSRF_COOKIE_SAMESITE
'Lax'
CSRF_COOKIE_SECURE
False
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME
'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS
[]
CSRF_USE_SESSIONS
False
DATABASE
{'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 300,
'ENGINE': 'django.db.backends.postgresql',
'HOST': 'localhost',
'NAME': 'netbox',
'OPTIONS': {},
'PASSWORD': '********************',
'PORT': '',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIGRATE': True,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': None,
'USER': 'netbox'}
DATABASES
{'default': {'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 300,
'ENGINE': 'django.db.backends.postgresql',
'HOST': 'localhost',
'NAME': 'netbox',
'OPTIONS': {},
'PASSWORD': '********************',
'PORT': '',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIGRATE': True,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': None,
'USER': 'netbox'}}
DATABASE_ROUTERS
[]
DATA_UPLOAD_MAX_MEMORY_SIZE
2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS
None
DATETIME_FORMAT
'N j, Y g:i a'
DATETIME_INPUT_FORMATS
['%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M:%S.%f',
'%m/%d/%Y %H:%M',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f',
'%m/%d/%y %H:%M']
DATE_FORMAT
'N j, Y'
DATE_INPUT_FORMATS
['%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y']
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DECIMAL_SEPARATOR
'.'
DEFAULT_AUTO_FIELD
'django.db.models.BigAutoField'
DEFAULT_CHARSET
'utf-8'
DEFAULT_EXCEPTION_REPORTER
'django.views.debug.ExceptionReporter'
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
@.***'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_SENTRY_DSN
@.***/6396485'
DEFAULT_TABLESPACE
''
DEPLOYMENT_ID
'9d0f2aa5ad8f3e44'
DEVELOPER
False
DISALLOWED_USER_AGENTS
[]
DOCS_ROOT
'/opt/netbox/docs'
EMAIL
{'FROM_EMAIL': '',
'PASSWORD': '********************',
'PORT': 25,
'SERVER': 'localhost',
'TIMEOUT': 10,
'USERNAME': '',
'USE_SSL': False,
'USE_TLS': False}
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
''
EMAIL_PORT
25
EMAIL_SSL_CERTFILE
None
EMAIL_SSL_KEYFILE
'********************'
EMAIL_SUBJECT_PREFIX
'[NetBox] '
EMAIL_TIMEOUT
10
EMAIL_USE_LOCALTIME
False
EMAIL_USE_SSL
False
EMAIL_USE_TLS
False
EXEMPT_EXCLUDE_MODELS
(('auth', 'group'), ('auth', 'user'), ('users', 'objectpermission'))
EXEMPT_PATHS
('/api/', '/graphql/', '/login/', '/oauth/', '/metrics')
EXEMPT_VIEW_PERMISSIONS
[]
FIELD_CHOICES
{}
FILE_UPLOAD_DIRECTORY_PERMISSIONS
None
FILE_UPLOAD_HANDLERS
['django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
420
FILE_UPLOAD_TEMP_DIR
None
FILTERS_NULL_CHOICE_LABEL
'None'
FILTERS_NULL_CHOICE_VALUE
'null'
FIRST_DAY_OF_WEEK
0
FIXTURE_DIRS
[]
FORCE_SCRIPT_NAME
None
FORMAT_MODULE_PATH
None
FORM_RENDERER
'django.forms.renderers.DjangoTemplates'
GRAPHENE
{'DJANGO_CHOICE_FIELD_ENUM_V3_NAMING': True}
HOSTNAME
'netbox'
HTTP_PROXIES
None
IGNORABLE_404_URLS
[]
INSTALLED_APPS
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'corsheaders',
'debug_toolbar',
'graphiql_debug_toolbar',
'django_filters',
'django_tables2',
'django_prometheus',
'graphene_django',
'mptt',
'rest_framework',
'social_django',
'taggit',
'timezone_field',
'circuits',
'dcim',
'ipam',
'extras',
'tenancy',
'users',
'utilities',
'virtualization',
'wireless',
'django_rq',
'drf_yasg']
INTERNAL_IPS
('127.0.0.1', '::1')
LANGUAGES
[('af', 'Afrikaans'),
('ar', 'Arabic'),
('ar-dz', 'Algerian Arabic'),
('ast', 'Asturian'),
('az', 'Azerbaijani'),
('bg', 'Bulgarian'),
('be', 'Belarusian'),
('bn', 'Bengali'),
('br', 'Breton'),
('bs', 'Bosnian'),
('ca', 'Catalan'),
('cs', 'Czech'),
('cy', 'Welsh'),
('da', 'Danish'),
('de', 'German'),
('dsb', 'Lower Sorbian'),
('el', 'Greek'),
('en', 'English'),
('en-au', 'Australian English'),
('en-gb', 'British English'),
('eo', 'Esperanto'),
('es', 'Spanish'),
('es-ar', 'Argentinian Spanish'),
('es-co', 'Colombian Spanish'),
('es-mx', 'Mexican Spanish'),
('es-ni', 'Nicaraguan Spanish'),
('es-ve', 'Venezuelan Spanish'),
('et', 'Estonian'),
('eu', 'Basque'),
('fa', 'Persian'),
('fi', 'Finnish'),
('fr', 'French'),
('fy', 'Frisian'),
('ga', 'Irish'),
('gd', 'Scottish Gaelic'),
('gl', 'Galician'),
('he', 'Hebrew'),
('hi', 'Hindi'),
('hr', 'Croatian'),
('hsb', 'Upper Sorbian'),
('hu', 'Hungarian'),
('hy', 'Armenian'),
('ia', 'Interlingua'),
('id', 'Indonesian'),
('ig', 'Igbo'),
('io', 'Ido'),
('is', 'Icelandic'),
('it', 'Italian'),
('ja', 'Japanese'),
('ka', 'Georgian'),
('kab', 'Kabyle'),
('kk', 'Kazakh'),
('km', 'Khmer'),
('kn', 'Kannada'),
('ko', 'Korean'),
('ky', 'Kyrgyz'),
('lb', 'Luxembourgish'),
('lt', 'Lithuanian'),
('lv', 'Latvian'),
('mk', 'Macedonian'),
('ml', 'Malayalam'),
('mn', 'Mongolian'),
('mr', 'Marathi'),
('ms', 'Malay'),
('my', 'Burmese'),
('nb', 'Norwegian Bokmål'),
('ne', 'Nepali'),
('nl', 'Dutch'),
('nn', 'Norwegian Nynorsk'),
('os', 'Ossetic'),
('pa', 'Punjabi'),
('pl', 'Polish'),
('pt', 'Portuguese'),
('pt-br', 'Brazilian Portuguese'),
('ro', 'Romanian'),
('ru', 'Russian'),
('sk', 'Slovak'),
('sl', 'Slovenian'),
('sq', 'Albanian'),
('sr', 'Serbian'),
('sr-latn', 'Serbian Latin'),
('sv', 'Swedish'),
('sw', 'Swahili'),
('ta', 'Tamil'),
('te', 'Telugu'),
('tg', 'Tajik'),
('th', 'Thai'),
('tk', 'Turkmen'),
('tr', 'Turkish'),
('tt', 'Tatar'),
('udm', 'Udmurt'),
('uk', 'Ukrainian'),
('ur', 'Urdu'),
('uz', 'Uzbek'),
('vi', 'Vietnamese'),
('zh-hans', 'Simplified Chinese'),
('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI
['he', 'ar', 'ar-dz', 'fa', 'ur']
LANGUAGE_CODE
'en-us'
LANGUAGE_COOKIE_AGE
None
LANGUAGE_COOKIE_DOMAIN
None
LANGUAGE_COOKIE_HTTPONLY
False
LANGUAGE_COOKIE_NAME
'django_language'
LANGUAGE_COOKIE_PATH
'/'
LANGUAGE_COOKIE_SAMESITE
None
LANGUAGE_COOKIE_SECURE
False
LOCALE_PATHS
[]
LOGGING
{}
LOGGING_CONFIG
'logging.config.dictConfig'
LOGIN_PERSISTENCE
False
LOGIN_REDIRECT_URL
'/'
LOGIN_REQUIRED
False
LOGIN_TIMEOUT
None
LOGIN_URL
'/login/'
LOGOUT_REDIRECT_URL
None
MANAGERS
[]
MEDIA_ROOT
'/opt/netbox/netbox/media'
MEDIA_URL
'/media/'
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
MESSAGE_TAGS
{40: 'danger'}
METRICS_ENABLED
False
MIDDLEWARE
['graphiql_debug_toolbar.middleware.DebugToolbarMiddleware',
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'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',
'netbox.middleware.ExceptionHandlingMiddleware',
'netbox.middleware.RemoteUserMiddleware',
'netbox.middleware.LoginRequiredMiddleware',
'netbox.middleware.DynamicConfigMiddleware',
'netbox.middleware.APIVersionMiddleware',
'netbox.middleware.ObjectChangeMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware']
MIGRATION_MODULES
{}
MONTH_DAY_FORMAT
'F j'
NUMBER_GROUPING
0
PARAMS
(<netbox.config.parameters.ConfigParam object at 0x7fa882edf730>,
<netbox.config.parameters.ConfigParam object at 0x7fa882edf970>,
<netbox.config.parameters.ConfigParam object at 0x7fa882edf880>,
<netbox.config.parameters.ConfigParam object at 0x7fa882edfaf0>,
<netbox.config.parameters.ConfigParam object at 0x7fa882edfa90>,
<netbox.config.parameters.ConfigParam object at 0x7fa882e7bb20>,
<netbox.config.parameters.ConfigParam object at 0x7fa882e7bbb0>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd1c0>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd2b0>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd250>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd310>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd340>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd370>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd550>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd3d0>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd400>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd520>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd4c0>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd460>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd490>,
<netbox.config.parameters.ConfigParam object at 0x7fa8816bd4f0>)
PASSWORD_HASHERS
'********************'
PASSWORD_RESET_TIMEOUT
'********************'
PLUGINS
[]
PLUGINS_CONFIG
{}
PREPEND_WWW
False
PROMETHEUS_EXPORT_MIGRATIONS
False
REDIS
{'caching': {'DATABASE': 1,
'HOST': 'localhost',
'PASSWORD': '',
'PORT': 6379,
'SSL': False},
'tasks': {'DATABASE': 0,
'HOST': 'localhost',
'PASSWORD': '',
'PORT': 6379,
'SSL': False}}
RELEASE_CHECK_URL
'https://api.github.com/repos/netbox-community/netbox/releases'
REMOTE_AUTH_AUTO_CREATE_USER
True
REMOTE_AUTH_BACKEND
'netbox.authentication.RemoteUserBackend'
REMOTE_AUTH_DEFAULT_GROUPS
[]
REMOTE_AUTH_DEFAULT_PERMISSIONS
{}
REMOTE_AUTH_ENABLED
False
REMOTE_AUTH_GROUP_HEADER
'HTTP_REMOTE_USER_GROUP'
REMOTE_AUTH_GROUP_SEPARATOR
'|'
REMOTE_AUTH_GROUP_SYNC_ENABLED
False
REMOTE_AUTH_HEADER
'HTTP_REMOTE_USER'
REMOTE_AUTH_STAFF_GROUPS
[]
REMOTE_AUTH_STAFF_USERS
[]
REMOTE_AUTH_SUPERUSERS
[]
REMOTE_AUTH_SUPERUSER_GROUPS
[]
REPORTS_ROOT
'/opt/netbox/netbox/reports'
REST_FRAMEWORK
{'ALLOWED_VERSIONS': ['3.2'],
'COERCE_DECIMAL_TO_STRING': False,
'DEFAULT_AUTHENTICATION_CLASSES': ('rest_framework.authentication.SessionAuthentication',
'netbox.api.authentication.TokenAuthentication'),
'DEFAULT_FILTER_BACKENDS': ('django_filters.rest_framework.DjangoFilterBackend',),
'DEFAULT_METADATA_CLASS': 'netbox.api.metadata.BulkOperationMetadata',
'DEFAULT_PAGINATION_CLASS': 'netbox.api.pagination.OptionalLimitOffsetPagination',
'DEFAULT_PERMISSION_CLASSES': ('netbox.api.authentication.TokenPermissions',),
'DEFAULT_RENDERER_CLASSES': ('rest_framework.renderers.JSONRenderer',
'netbox.api.renderers.FormlessBrowsableAPIRenderer'),
'DEFAULT_VERSION': '3.2',
'DEFAULT_VERSIONING_CLASS': 'rest_framework.versioning.AcceptHeaderVersioning',
'SCHEMA_COERCE_METHOD_NAMES': {'bulk_destroy': 'bulk_delete',
'destroy': 'delete',
'retrieve': 'read'},
'VIEW_NAME_FUNCTION': 'utilities.api.get_view_name'}
REST_FRAMEWORK_VERSION
'3.2'
ROOT_URLCONF
'netbox.urls'
RQ_DEFAULT_TIMEOUT
300
RQ_PARAMS
{'DB': 0,
'DEFAULT_TIMEOUT': 300,
'HOST': 'localhost',
'PASSWORD': '********************',
'PORT': 6379,
'SSL': False,
'SSL_CERT_REQS': 'required'}
RQ_QUEUES
{'default': {'DB': 0,
'DEFAULT_TIMEOUT': 300,
'HOST': 'localhost',
'PASSWORD': '',
'PORT': 6379,
'SSL': False,
'SSL_CERT_REQS': 'required'},
'high': {'DB': 0,
'DEFAULT_TIMEOUT': 300,
'HOST': 'localhost',
'PASSWORD': '',
'PORT': 6379,
'SSL': False,
'SSL_CERT_REQS': 'required'},
'low': {'DB': 0,
'DEFAULT_TIMEOUT': 300,
'HOST': 'localhost',
'PASSWORD': '********************',
'PORT': 6379,
'SSL': False,
'SSL_CERT_REQS': 'required'}}
SCRIPTS_ROOT
'/opt/netbox/netbox/scripts'
SECRET_KEY
'********************'
SECURE_CONTENT_TYPE_NOSNIFF
True
SECURE_CROSS_ORIGIN_OPENER_POLICY
'same-origin'
SECURE_HSTS_INCLUDE_SUBDOMAINS
False
SECURE_HSTS_PRELOAD
False
SECURE_HSTS_SECONDS
0
SECURE_PROXY_SSL_HEADER
('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_REDIRECT_EXEMPT
[]
SECURE_REFERRER_POLICY
'same-origin'
SECURE_SSL_HOST
None
SECURE_SSL_REDIRECT
False
SENTRY_DSN
@.***/6396485'
SENTRY_ENABLED
False
SENTRY_SAMPLE_RATE
1.0
SENTRY_TAGS
{}
SENTRY_TRACES_SAMPLE_RATE
0
SERVER_EMAIL
''
SESSION_CACHE_ALIAS
'default'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_HTTPONLY
True
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SAMESITE
'Lax'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SESSION_SERIALIZER
'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE
'netbox.settings'
SHORT_DATETIME_FORMAT
'Y-m-d H:i'
SHORT_DATE_FORMAT
'Y-m-d'
SHORT_TIME_FORMAT
'H:i:s'
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS
[]
SOCIAL_AUTH_JSONFIELD_ENABLED
True
STATICFILES_DIRS
('/opt/netbox/netbox/project-static/dist',
'/opt/netbox/netbox/project-static/img',
('docs', '/opt/netbox/netbox/project-static/docs'))
STATICFILES_FINDERS
['django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT
'/opt/netbox/netbox/static'
STATIC_URL
'/static/'
STORAGE_BACKEND
None
STORAGE_CONFIG
{}
SWAGGER_SETTINGS
{'DEFAULT_AUTO_SCHEMA_CLASS': 'utilities.custom_inspectors.NetBoxSwaggerAutoSchema',
'DEFAULT_FIELD_INSPECTORS': ['utilities.custom_inspectors.CustomFieldsDataFieldInspector',
'utilities.custom_inspectors.JSONFieldInspector',
'utilities.custom_inspectors.NullableBooleanFieldInspector',
'utilities.custom_inspectors.ChoiceFieldInspector',
'utilities.custom_inspectors.SerializedPKRelatedFieldInspector',
'drf_yasg.inspectors.CamelCaseJSONFilter',
'drf_yasg.inspectors.ReferencingSerializerInspector',
'drf_yasg.inspectors.RelatedFieldInspector',
'drf_yasg.inspectors.ChoiceFieldInspector',
'drf_yasg.inspectors.FileFieldInspector',
'drf_yasg.inspectors.DictFieldInspector',
'drf_yasg.inspectors.SerializerMethodFieldInspector',
'drf_yasg.inspectors.SimpleFieldInspector',
'drf_yasg.inspectors.StringDefaultFieldInspector'],
'DEFAULT_FILTER_INSPECTORS': ['drf_yasg.inspectors.CoreAPICompatInspector'],
'DEFAULT_INFO': 'netbox.urls.openapi_info',
'DEFAULT_MODEL_DEPTH': 1,
'DEFAULT_PAGINATOR_INSPECTORS': ['utilities.custom_inspectors.NullablePaginatorInspector',
'drf_yasg.inspectors.DjangoRestResponsePagination',
'drf_yasg.inspectors.CoreAPICompatInspector'],
'SECURITY_DEFINITIONS': {'Bearer': {'in': 'header',
'name': 'Authorization',
'type': 'apiKey'}},
'VALIDATOR_URL': None}
TASKS_REDIS
{'DATABASE': 0,
'HOST': 'localhost',
'PASSWORD': '********************',
'PORT': 6379,
'SSL': False}
TASKS_REDIS_DATABASE
0
TASKS_REDIS_HOST
'localhost'
TASKS_REDIS_PASSWORD
'********************'
TASKS_REDIS_PORT
6379
TASKS_REDIS_SENTINELS
[]
TASKS_REDIS_SENTINEL_SERVICE
'default'
TASKS_REDIS_SENTINEL_TIMEOUT
10
TASKS_REDIS_SKIP_TLS_VERIFY
False
TASKS_REDIS_SSL
False
TASKS_REDIS_USING_SENTINEL
False
TEMPLATES
[{'APP_DIRS': True,
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['/opt/netbox/netbox/templates'],
'OPTIONS': {'builtins': ['utilities.templatetags.builtins.filters',
'utilities.templatetags.builtins.tags'],
'context_processors': ['django.template.context_processors.debug',
'django.template.context_processors.request',
'django.template.context_processors.media',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'netbox.context_processors.settings_and_registry']}}]
TEMPLATES_DIR
'/opt/netbox/netbox/templates'
TEST_NON_SERIALIZED_APPS
[]
TEST_RUNNER
'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR
','
TIME_FORMAT
'g:i a'
TIME_INPUT_FORMATS
['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE
'UTC'
USE_DEPRECATED_PYTZ
True
USE_I18N
True
USE_L10N
False
USE_THOUSAND_SEPARATOR
False
USE_TZ
True
USE_X_FORWARDED_HOST
True
USE_X_FORWARDED_PORT
False
VERSION
'3.2.4'
WSGI_APPLICATION
'netbox.wsgi.application'
X_FRAME_OPTIONS
'SAMEORIGIN'
YEAR_MONTH_FORMAT
'F Y'
You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.
History
Django 4.0.4
CPU: 583.31ms (600.95ms)
view
11 queries in 8.90ms
0 files used
2 calls in 2.25ms
52 receivers of 15 signals
1 message
Intercept redirects
*
Profiling
-----Ursprüngliche Nachricht-----
Von: Jeremy @.>
Gesendet: Fre 3 Juni 2022 22:22
An: netbox-community/netbox @.>
CC: Uwe Soemer @.>; Author @.>
Betreff: Re: [netbox-community/netbox] Get error: Cannot resolve keyword 'port_list' into field. (Issue #9480)
I'm not able to reproduce this on v3.2.4. Could you provide the complete stack trace? (Enable debugging by setting DEBUG = True in configuration.py)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>
@kkthxbye-code commented on GitHub (Jun 4, 2022):
I hid your comment as your 1700 line text dump makes the issue unreadable.
However, found a way to replicate by adding ?sort=ports to the URL. The port column is not clickable, so not sure how you managed to sort by it.
As a fix to your immediate issue you can delete your preferences for the table in User -> Profile -> Preferences or just append ?sort=description to the URL.
@Jkasnw-7823 commented on GitHub (Jun 5, 2022):
Hello,
thanks for the tip. I removed the preset and the view appears. In the view, however, there is the problem that sorting by the "Ports" column is not possible. If I force it by appending "?sort=ports" to the URL, the stack trace appears again, although according to the error message "ports" is a possible field. Somewhere in the process "ports" is replaced by "port_list" which then leads to the error.
Environment:
Request Method: GET
Request URL: https://netbox.soe.priv/ipam/service-templates/?sort=ports
Django Version: 4.0.4
Python Version: 3.8.10
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'corsheaders',
'debug_toolbar',
'graphiql_debug_toolbar',
'django_filters',
'django_tables2',
'django_prometheus',
'graphene_django',
'mptt',
'rest_framework',
'social_django',
'taggit',
'timezone_field',
'circuits',
'dcim',
'ipam',
'extras',
'tenancy',
'users',
'utilities',
'virtualization',
'wireless',
'django_rq',
'drf_yasg']
Installed Middleware:
['graphiql_debug_toolbar.middleware.DebugToolbarMiddleware',
'django_prometheus.middleware.PrometheusBeforeMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'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',
'netbox.middleware.ExceptionHandlingMiddleware',
'netbox.middleware.RemoteUserMiddleware',
'netbox.middleware.LoginRequiredMiddleware',
'netbox.middleware.DynamicConfigMiddleware',
'netbox.middleware.APIVersionMiddleware',
'netbox.middleware.ObjectChangeMiddleware',
'django_prometheus.middleware.PrometheusAfterMiddleware']
Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/opt/netbox/venv/lib/python3.8/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.8/site-packages/django/views/generic/base.py", line 84, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/netbox/netbox/utilities/views.py", line 90, in dispatch
return super().dispatch(request, *args, **kwargs)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 119, in dispatch
return handler(request, *args, **kwargs)
File "/opt/netbox/netbox/netbox/views/generic/bulk_views.py", line 185, in get
table.configure(request)
File "/opt/netbox/netbox/netbox/tables/tables.py", line 149, in configure
tables.RequestConfig(request, paginate).configure(self)
File "/opt/netbox/venv/lib/python3.8/site-packages/django_tables2/config.py", line 42, in configure
table.order_by = order_by
File "/opt/netbox/venv/lib/python3.8/site-packages/django_tables2/tables.py", line 543, in order_by
self.data.order_by(self._order_by)
File "/opt/netbox/venv/lib/python3.8/site-packages/django_tables2/data.py", line 226, in order_by
self.data = self.data.order_by(*order_by_accessors)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/models/query.py", line 1295, in order_by
obj.query.add_ordering(*field_names)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/models/sql/query.py", line 2167, in add_ordering
self.names_to_path(item.split(LOOKUP_SEP), self.model._meta)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/models/sql/query.py", line 1677, in names_to_path
raise FieldError(
Exception Type: FieldError at /ipam/service-templates/
Exception Value: Cannot resolve keyword 'port_list' into field. Choices are: created, custom_field_data, description, id, journal_entries, last_updated, name, ports, protocol, tagged_items, tags
Sorry for the first stack trace, I hadn't seen the link. This is my first time using github for an error message.