Skip to content

Macro Rendering Error#

AttributeError: 'File' object has no attribute 'src_uri'

Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.10/site-packages/mkdocs_macros/plugin.py", line 480, in render
    return md_template.render(**page_variables)
  File "/home/ubuntu/.local/lib/python3.10/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/home/ubuntu/.local/lib/python3.10/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/home/ubuntu/ros2docs_source/en/autoware/docs/././design/autoware-interfaces/templates/autoware-interface.jinja2", line 7, in top-level template code
    - Data Type: {{ create_relative_link(type.name, 'design/autoware-interfaces/ad-api/types/' + type.name + '.md') }}
  File "/home/ubuntu/ros2docs_source/en/autoware/main.py", line 13, in create_relative_link
    path = os.path.relpath(root_path, os.path.dirname(env.page.file.src_uri))
AttributeError: 'File' object has no attribute 'src_uri'