Please open an issue on pytkdocs instead
if this is related to Python docstrings parsing or the collection of Python objects!
Describe the bug
Having pytkdocs >= 0.12.0 causes mkdocstrings build to crash with Django projects. Installation of pytkdocs with pip installs a version of pytkdocs >= 0.12.0.
To Reproduce
Steps to reproduce the behavior:
mkdocs build
cli commandExpected behavior
I expected the docs to be built
Screenshots
nautobot@2f093c201409:~/plugins/nautobot-plugin-device-status-change$ python -m mkdocs build
INFO - MERMAID2 - Initialization arguments: {}
INFO - MERMAID2 - Using javascript library (8.11.2):
https://unpkg.com/mermaid@8.11.2/dist/mermaid.min.js
INFO - Cleaning site directory
INFO - Building documentation to directory: /opt/nautobot/plugins/nautobot-plugin-device-status-change/site
ERROR - mkdocstrings.extension: 'FilterSetOptions' object has no attribute 'get_fields'
Traceback (most recent call last):
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/cli.py", line 205, in main
output = json.dumps(process_json(line))
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/cli.py", line 114, in process_json
return process_config(json.loads(json_input))
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/cli.py", line 91, in process_config
obj = loader.get_object_documentation(path, members)
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/loader.py", line 358, in get_object_documentation
root_object = self.get_module_documentation(leaf, members)
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/loader.py", line 426, in get_module_documentation
root_object.add_child(self.get_class_documentation(child_node))
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/loader.py", line 519, in get_class_documentation
child = self.get_class_documentation(child_node)
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/loader.py", line 542, in get_class_documentation
if self.detect_field_model(attr_name, direct_members, all_members):
File "/opt/nautobot/.local/lib/python3.6/site-packages/pytkdocs/loader.py", line 577, in detect_field_model
if remainder and not attrgetter(remainder)(all_members[first_order_attr_name]):
AttributeError: 'FilterSetOptions' object has no attribute 'get_fields'
ERROR - Error reading page 'api/views.md':
ERROR - Could not collect 'device_status_change_plugin.views'
Aborted with a BuildError!
Information (please complete the following information):
mkdocstrings
version: 0.16.2 (tried all since June)pytkdocs
version: 0.[12, 13, 14].0 (worked once I got to 0.11.1)Additional context
Add any other context about the problem here.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too