Repository navigation
Labels
beta 2effort: smallno notesNot to be included in release notes. Typically bug in a preview release.priority: critical
Milestone
Description
If I have my_lib.py library:
from robot.api.types import Secret
def mask_secrets(data: Secret):
print(f"Masked secret: {data}")
return dataAnd use libdoc:
> libdoc my_lib.py lib.html
Building library 'my_lib.py' failed: AttributeError: 'NoneType' object has no attribute 'lower'
Try --help for usage information.If I use bridseye https://birdseye.readthedocs.io/en/latest/index.html I see
Traceback (most recent call last):
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdocpkg/builder.py", line 101, in _build
return builder.build(source)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdocpkg/robotbuilder.py", line 49, in build
libdoc.type_docs = self._get_type_docs(
^^^^^^^^^^^^^^^^^^^^
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdocpkg/robotbuilder.py", line 82, in _get_type_docs
all_type_docs.setdefault(type_doc, set()).add(kw.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/utils/sortable.py", line 49, in __hash__
return hash(self._sort_key)
^^^^^^^^^^^^^^
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdocpkg/datatypes.py", line 54, in _sort_key
return self.name.lower()
^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'lower'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdoc.py", line 203, in main
libdoc = LibraryDocumentation(lib_or_res, name, version, docformat)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdocpkg/builder.py", line 56, in LibraryDocumentation
libdoc = DocumentationBuilder().build(library_or_resource)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdocpkg/builder.py", line 80, in build
return self._build(builder, source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/tatuaalto/workspace/tmp/.venv/lib/python3.12/site-packages/robot/libdocpkg/builder.py", line 117, in _build
raise DataError(
robot.errors.DataError: Building library 'my_lib.py' failed: AttributeError: 'NoneType' object has no attribute 'lower'
When I set @eye decorator to main https://github.com/robotframework/robotframework/blob/master/src/robot/libdoc.py#L185
Metadata
Metadata
Assignees
Labels
beta 2effort: smallno notesNot to be included in release notes. Typically bug in a preview release.priority: critical
Activity
Fix SecretConverted when keyword uses Secret as type hint
Fix SecretConverted when keyword uses Secret as type hint
[-]libdoc does not work if Secret is type hint with RF 7.4[/-][+]Libdoc does not work with new Secret type[/+]pekkaklarck commentedon Oct 19, 2025
Good catch. It was a bad omission by us that we didn't test Libdoc as part of #4537, but good that this was noticed before the final release. I wonder is this important enough to warrant beta 2 or can it wait for the release candidate.
I gave this a "task" label to not get listed in the release notes. It would make sense to include it in the beta/rc notes, but not anymore in the final release, but we don't have labels for that purpose. We can discuss that when we look at the Rellu tool at some point.
aaltat commentedon Oct 19, 2025
I think this does not warrant for beta 2, but making beta 2 for the standard library type annotations might be good idea. Although release candidate might be also good idea too.
pekkaklarck commentedon Oct 19, 2025
Agreed. Let's see what's the status of the other issues and see is beta 2 or rc 1 next. I haven't been able to work much during this school holiday week (especially when our 2yo was also sick) but hopefully next week is better in that regard.
Fix using Secret with Libdoc (#5521)
Secret should fail on str and bool types (#5547)