Skip to content

TypeError in /pdoc/extract.py #680

@pnjun

Description

@pnjun

Problem Description

When running pdoc, i get a TypeError. I cannot figure out if this is a bug in pdoc or if it is a problem with my project, since the traceback is completely internal to pdoc files and does not show any file from my module, so i would not even know where to start looking for errors.

If the problem is with my package and not pdoc itself, i suppose a better error message would be appropriate.
Does anyone have insights in what could cause the issue?

Thanks

Traceback (most recent call last):
  File "/home/leverfab/.conda/envs/fabdev/bin//pdoc", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/leverfab/.conda/envs/fabdev/lib/python3.11/site-packages/pdoc/__main__.py", line 199, in cli
    pdoc.pdoc(
  File "/home/leverfab/.conda/envs/fabdev/lib/python3.11/site-packages/pdoc/__init__.py", line 509, in pdoc
    for module_name in extract.walk_specs(modules):
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/leverfab/.conda/envs/fabdev/lib/python3.11/site-packages/pdoc/extract.py", line 74, in walk_specs
    for m in walk_packages2([mod_info]):
  File "/home/leverfab/.conda/envs/fabdev/lib/python3.11/site-packages/pdoc/extract.py", line 306, in walk_packages2
    yield from walk_packages2(submodules.values())
  File "/home/leverfab/.conda/envs/fabdev/lib/python3.11/site-packages/pdoc/extract.py", line 305, in walk_packages2
    submodules = iter_modules2(module)
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/home/leverfab/.conda/envs/fabdev/lib/python3.11/site-packages/pdoc/extract.py", line 257, in iter_modules2
    member = getattr(module, name, None)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: attribute name must be string, not 'type'

Steps to reproduce the behavior:

run PDOC_ALLOW_EXEC=1 pdoc ./mypackage docformat google -o ./somefolder

System Information

pdoc: 14.4.0
Python: 3.11.0
Platform: Linux-3.10.0-1160.80.1.el7.x86_64-x86_64-with-glibc2.17

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions