Skip to content

there is KeyError which not find 'id' and crash program. #75

@huang-kun

Description

@huang-kun
Traceback (most recent call last):
  File "/home/huangkun/miniconda3/envs/geeknews/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/huangkun/miniconda3/envs/geeknews/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/huangkun/miniconda3/envs/geeknews/lib/python3.10/site-packages/gh_md_to_html/__main__.py", line 5, in <module>
    cmd_to_main()
  File "/home/huangkun/miniconda3/envs/geeknews/lib/python3.10/site-packages/gh_md_to_html/__init__.py", line 1618, in cmd_to_main
    result = main(**vars(parser.parse_args()))
  File "/home/huangkun/miniconda3/envs/geeknews/lib/python3.10/site-packages/gh_md_to_html/__init__.py", line 1236, in main
    header_soup_representation['id'] = header_soup_representation.a['id']
  File "/home/huangkun/miniconda3/envs/geeknews/lib/python3.10/site-packages/bs4/element.py", line 1573, in __getitem__
    return self.attrs[key]
KeyError: 'id'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions