AttributeError: 'datetime.date' object has no attribute 'utcoffset' #9536

Closed
opened 2025-12-29 20:51:08 +01:00 by adam · 2 comments
Owner

Originally created by @nascimbe on GitHub (Apr 24, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0-beta2

Python Version

3.11

Steps to Reproduce

  1. Assign a date type custom-field to any object-type in NetBox v3.7.6 (found in IP address, Virtual Machines)
  2. Migrate to NetBox v4.0-beta2 using upgrade.sh
  3. Open any object instance with a date custom field assigned

Expected Behavior

The object page is shown correctly

Observed Behavior

Server Error

<class 'AttributeError'>

'datetime.date' object has no attribute 'utcoffset'

Python version: 3.11.5
NetBox version: 4.0-beta2
Plugins: None installed

Removing custom-fields of type date resolves the issue

Originally created by @nascimbe on GitHub (Apr 24, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0-beta2 ### Python Version 3.11 ### Steps to Reproduce 1. Assign a date type custom-field to any object-type in NetBox v3.7.6 (found in IP address, Virtual Machines) 2. Migrate to NetBox v4.0-beta2 using upgrade.sh 3. Open any object instance with a date custom field assigned ### Expected Behavior The object page is shown correctly ### Observed Behavior Server Error ``` <class 'AttributeError'> 'datetime.date' object has no attribute 'utcoffset' Python version: 3.11.5 NetBox version: 4.0-beta2 Plugins: None installed ``` Removing custom-fields of type date resolves the issue
adam added the type: bugstatus: acceptedbetaseverity: medium labels 2025-12-29 20:51:08 +01:00
adam closed this issue 2025-12-29 20:51:08 +01:00
Author
Owner

@cs-1 commented on GitHub (Apr 25, 2024):

Same problem for Racks. The error only appears if custom fields of type Date are present. Racks can be viewed as soon as all custom fields with Date are deleted. Date needs to actually be set to generate the error. Empty date fields don't trigger the error.

@cs-1 commented on GitHub (Apr 25, 2024): Same problem for Racks. The error only appears if custom fields of type Date are present. Racks can be viewed as soon as all custom fields with Date are deleted. Date needs to actually be set to generate the error. Empty date fields don't trigger the error.
Author
Owner

@opericgithub commented on GitHub (Apr 26, 2024):

We have the same problem. Makes the v4.0 unusable since almost all our devices have custom field of type date.

@opericgithub commented on GitHub (Apr 26, 2024): We have the same problem. Makes the v4.0 unusable since almost all our devices have custom field of type date.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9536