Form Tour UI Step

Hey guys, I am getting the following error in developer mode,

> Error: 'NoneType' object has no attribute 'label'`

After adding a new step (UI tour with CSS selector) and saving the new tour:
Full Error-Stack:

06:35:08 web.1      | 192.168.48.164 - - [05/Jun/2025 06:35:08] "POST /api/method/frappe.desk.form.save.savedocs HTTP/1.1" 500 -
06:35:49 web.1      | Traceback (most recent call last):
06:35:49 web.1      |   File "apps/frappe/frappe/app.py", line 115, in application
06:35:49 web.1      |     response = frappe.api.handle(request)
06:35:49 web.1      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/api/__init__.py", line 49, in handle
06:35:49 web.1      |     data = endpoint(**arguments)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
06:35:49 web.1      |     return frappe.handler.handle()
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/handler.py", line 51, in handle
06:35:49 web.1      |     data = execute_cmd(cmd)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/handler.py", line 84, in execute_cmd
06:35:49 web.1      |     return frappe.call(method, **frappe.form_dict)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/__init__.py", line 1742, in call
06:35:49 web.1      |     return fn(*args, **newargs)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
06:35:49 web.1      |     return func(*args, **kwargs)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
06:35:49 web.1      |     doc.save()
06:35:49 web.1      |   File "apps/frappe/frappe/model/document.py", line 378, in save
06:35:49 web.1      |     return self._save(*args, **kwargs)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/model/document.py", line 414, in _save
06:35:49 web.1      |     self.run_before_save_methods()
06:35:49 web.1      |   File "apps/frappe/frappe/model/document.py", line 1137, in run_before_save_methods
06:35:49 web.1      |     self.run_method("before_save")
06:35:49 web.1      |   File "apps/frappe/frappe/model/document.py", line 1007, in run_method
06:35:49 web.1      |     out = Document.hook(fn)(self, *args, **kwargs)
06:35:49 web.1      |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/model/document.py", line 1367, in composer
06:35:49 web.1      |     return composed(self, method, *args, **kwargs)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/model/document.py", line 1349, in runner
06:35:49 web.1      |     add_to_return_value(self, fn(self, *args, **kwargs))
06:35:49 web.1      |                               ^^^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/model/document.py", line 1004, in fn
06:35:49 web.1      |     return method_object(*args, **kwargs)
06:35:49 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
06:35:49 web.1      |   File "apps/frappe/frappe/desk/doctype/form_tour/form_tour.py", line 64, in before_save
06:35:49 web.1      |     step.label = field_df.label
06:35:49 web.1      |                  ^^^^^^^^^^^^^^
06:35:49 web.1      | AttributeError: 'NoneType' object has no attribute 'label'
06:35:49 web.1      |
06:35:49 web.1      | 192.168.48.164 - - [05/Jun/2025 06:35:49] "POST /api/method/frappe.desk.form.save.savedocs HTTP/1.1" 500 -

Installed applications

ERPNext: v15.60.0 (version-15)

Frappe Framework: v15.67.0 (version-15)

Does anyone understand this? Does anyone have any tips or tricks to fix this problem?

Thank You!

Hello :wave:,

First of all welcome to the community !!

field_df.label in this field_df is None and because of that issue is coming.

Write like:

if field_df:
    # here try to access that field_df.label

Thank you very much!

I understand the background of the error.

The problem is that when entering STEP as TYPE ui_tour, there is no field to enter a label.

‘LABEL’ is only listed as “DocField” for ‘STEP’. This field does not exist in the ui-tour Form, so there is no way to specify this, as ui_tour refers directly to CSS selectors. At least, I have not found a way to specify a label in the GUI.

1 Like

Great :+1:, don’t forget to mark as solved!!

We frappe community always here to help :v:

Why should I mark it as resolved? The error still exists – it’s obviously a bug that the label cannot be entered in the module, right?

Either there is an error preventing the name from being entered, or frappe/desk/doctype/form_tour/form_tour.py is expecting a label where none exists for the step type.

Not able to understand please explain more or share code and then try to explain problem