Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sphinx autodoc is failing with launch and launch_ros #154

Open
rkent opened this issue Nov 3, 2024 · 0 comments
Open

sphinx autodoc is failing with launch and launch_ros #154

rkent opened this issue Nov 3, 2024 · 0 comments

Comments

@rkent
Copy link
Contributor

rkent commented Nov 3, 2024

both launch and launch_ros packages generate no use useful API documentation. In the launch_ros case, the error is in typing.

See also ros2/launch_ros#232

Typical error:

WARNING: autodoc: failed to import module 'launch_ros'; the following exception was raised:
Traceback (most recent call last):
  File "/workspace/venv/lib/python3.10/site-packages/sphinx/ext/autodoc/importer.py", line 143, in import_module
    return importlib.import_module(modname)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/data2/repos/humble/humble/launch_ros/launch_ros/launch_ros/__init__.py", line 17, in <module>
    from . import actions
  File "/data2/repos/humble/humble/launch_ros/launch_ros/launch_ros/actions/__init__.py", line 17, in <module>
    from .composable_node_container import ComposableNodeContainer
  File "/data2/repos/humble/humble/launch_ros/launch_ros/launch_ros/actions/composable_node_container.py", line 27, in <module>
    from .node import Node
  File "/data2/repos/humble/humble/launch_ros/launch_ros/launch_ros/actions/node.py", line 48, in <module>
    from launch_ros.parameters_type import SomeParameters
  File "/data2/repos/humble/humble/launch_ros/launch_ros/launch_ros/parameters_type.py", line 50, in <module>
    SomeSubstitutionsType_types_tuple +
TypeError: unsupported operand type(s) for +: 'SomeSubstitutionsType_types_tuple' and 'tuple'
 [autodoc.import_object]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant