HumanSignal / HumanSignal/label-studio

Adding style to <View> template is not working

Open
#7,812 7 comments 1 reaction 0 assignees View on GitHub
community_investigate
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

**Describe the bug**
I am using a self deployed version of label-studio.
- When using normal template without any style applied the template works.
- As soon as i try to have two columns or i apply any style in general, the template can't be saved and from browser console i see i am receiving 403.

```
Failed to load resource: the server responded with a status of 403 ()
```

My role is owner and i have no problem modifying and saving templates until i avoid using 'style' in the template .

looking at the app pod i see this error in the logs:
```
2025-06-23 09:23:13.245 | label_studio_sdk._extensions.label_studio_tools.core.utils.exceptions.LabelStudioXMLSyntaxErrorSentryIgnored: Specification mandates value for attribute style-, line 1, column 13 (, line 1) |  
-- | -- | --
  |   | 2025-06-23 09:23:13.245 | raise LabelStudioXMLSyntaxErrorSentryIgnored(str(e)) |  
  |   | 2025-06-23 09:23:13.245 | File "/label-studio/.venv/lib/python3.12/site-packages/label_studio_sdk/_extensions/label_studio_tools/core/label_config.py", line 45, in parse_config |  
  |   | 2025-06-23 09:23:13.245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |  
  |   | 2025-06-23 09:23:13.245 | return label_config.parse_config(config_string) |  
  |   | 2025-06-23 09:23:13.245 | File "/label-studio/label_studio/core/label_config.py", line 52, in parse_config |  
  |   | 2025-06-23 09:23:13.245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |  
  |   | 2025-06-23 09:23:13.245 | new_config = parse_config(new_config_str) |  
  |   | 2025-06-23 09:23:13.245 | File "/label-studio/label_studio/core/label_config.py", line 393, in config_essential_data_has_changed |  
  |   | 2025-06-23 09:23:13.245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |  
  |   | 2025-06-23 09:23:13.245 | has_changed = config_essential_data_has_changed(label_config, project.label_config) |  
  |   | 2025-06-23 09:23:13.245 | File "/label-studio/label_studio/projects/api.py", line 589, in post |  
  |   | 2025-06-23 09:23:13.245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |  
  |   | 2025-06-23 09:23:13.245 | return bound_method(*args, **kwargs) |  
  |   | 2025-06-23 09:23:13.245 | File "/label-studio/.venv/lib/python3.12/site-packages/django/utils/decorators.py", line 48, in _wrapper |  
  |   | 2025-06-23 09:23:13.245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |  
  |   | 2025-06-23 09:23:13.245 | response = handler(request, *args, **kwargs) |  
  |   | 2025-06-23 09:23:13.245 | File "/label-studio/.venv/lib/python3.12/site-packages/rest_framework/views.py", line 506, in dispatch |  
  |   | 2025-06-23 09:23:13.245 | Traceback (most recent call last): |  
  |   | 2025-06-23 09:23:13.245 |   |  
  |   | 2025-06-23 09:23:13.245 | During handling of the above exception, another exception occurred: |  
  |   | 2025-06-23 09:23:13.245 |   |  
  |   | 2025-06-23 09:23:13.245 | lxml.etree.XMLSyntaxError: Specification mandates value for attribute style-, line 1, column 13 |  
  |   | 2025-06-23 09:23:13.245 | File "", line 1 |  
  |   | 2025-06-23 09:23:13.245 | File "src/lxml/parser.pxi", line 672, in lxml.etree._raiseParseError |  
  |   | 2025-06-23 09:23:13.245 | File "src/lxml/parser.pxi", line 743, in lxml.etree._handleParseResult |  
  |   | 2025-06-23 09:23:13.245 | File "src/lxml/parser.pxi", line 633, in lxml.etree._ParserContext._handleParseResultDoc |  
  |   | 2025-06-23 09:23:13.245 | File "src/lxml/parser.pxi", line 1105, in lxml.etree._BaseParser._parseUnicodeDoc |  
  |   | 2025-06-23 09:23:13.245 | File "src/lxml/parser.pxi", line 1875, in lxml.etree._parseDoc |  
  |   | 2025-06-23 09:23:13.245 | File "src/lxml/parser.pxi", line 1995, in lxml.etree._parseMemoryDocument |  
  |   | 2025-06-23 09:23:13.245 | File "src/lxml/etree.pyx", line 3306, in lxml.etree.fromstring |  
  |   | 2025-06-23 09:23:13.245 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |  
  |   | 2025-06-23 09:23:13.245 | xml_tree = etree.fromstring(config_string) |  
  |   | 2025-06-23 09:23:13.245 | File "/label-studio/.venv/lib/python3.12/site-packages/label_studio_sdk/_extensions/label_studio_tools/core/label_config.py", line 43, in parse_config |  
  |   | 2025-06-23 09:23:13.245 | Traceback (most recent call last): |  
  |   | 2025-06-23 09:23:13.245 | [2025-06-23 07:23:13,243] [core.utils.common::custom_exception_handler::98] [ERROR] 39f4cd09-1611-4403-a3a1-78478b03dbf0 Specification mandates value for attribute style-, line 1, column 13 (, line 1)
```

This is the template i am using (taken from the docs)

```








</View>
</View>
```

Does anyone know what is going on? I wasn't able to find anyone with similar issues searching online.

**Version**
```
{
"release": "1.19.0",
"label-studio-os-package": {
"version": "1.19.0",
"short_version": "1.19",
"latest_version_from_pypi": "1.19.0",
"latest_version_upload_time": "2025-06-10T07:45:12",
"current_version_is_outdated": false
},

"label-studio-os-backend": {
"message": "Fix poetry.lock",
"commit": "250ff0d716f22a0a9148d9e071406b26c89b021a",
"date": "2025/05/27 12:03:35",
"branch": "ls-release/1.19.0",
"version": "20250527.110637-ls-release-1-19-0-250ff0d71"
},

"label-studio-frontend": {
"message": "fix: BROS-31: Inconsistent load for Pdf pages (#7575)",
"commit": "1d507f08af157739f1dc3006bca962d9c23cfc54",
"date": "2025-05-20T16:56:05.000Z",
"branch": "develop"
},

"dm2": {
"message": "chore: UTC-3: [FE] Refactor Popover components in LSE (#7565)",
"commit": "d784cc7aa70ff789ea3c684e6f615a50d6a1b4c2",
"date": "2025-05-20T08:55:42.000Z",
"branch": "develop"
},

"label-studio-converter": {
"version": "1.0.16"
},

"edition": "Community"
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.