Modify

#14396 closed defect (fixed)

Failed to add select or radio custom field

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Component: CustomFieldAdminPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.6

Description

Originally reported in gmessage:trac-users:8q_5mJ0UQNM/7G6lvkV_AAAJ.

18:20:09 Trac[main] ERROR: [192.168.11.100] Internal Server Error: <RequestWithSession "POST '/admin/ticket/customfields'">, referrer 'http://192.168.11.122:3000/trac16-env/admin/ticket/customfields'
Traceback (most recent call last):
  File "/dev/shm/py312/lib/python3.12/site-packages/trac/web/main.py", line 609, in dispatch_request
    dispatcher.dispatch(req)
  File "/dev/shm/py312/lib/python3.12/site-packages/trac/web/main.py", line 301, in dispatch
    raise e
  File "/dev/shm/py312/lib/python3.12/site-packages/trac/web/main.py", line 247, in dispatch
    resp = chosen_handler.process_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/dev/shm/py312/lib/python3.12/site-packages/trac/admin/web_ui.py", line 104, in process_request
    resp = provider.render_admin_panel(req, cat_id, panel_id, path_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jun66j5/src/customfieldadminplugin/1.2/customfieldadmin/admin.py", line 90, in render_admin_panel
    cf_api.update_custom_field(cfield, create=True)
  File "/home/jun66j5/src/customfieldadminplugin/1.2/customfieldadmin/api.py", line 154, in update_custom_field
    self.create_custom_field(cfield)
  File "/home/jun66j5/src/customfieldadminplugin/1.2/customfieldadmin/api.py", line 133, in create_custom_field
    '|'.join(cfield['options']))
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, bytes found

Attachments (0)

Change History (1)

comment:1 Changed 33 minutes ago by Jun Omae

Resolution: fixed
Status: assignedclosed

In 18729:

CustomFieldAdminPlugin: Fix an exception raised when adding a select or radio custom field (closes #14396)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.