Minimal reproducible example for `mkdocstrings` Python handler issue

Overview

Requirements

  1. python=^3.10
  2. poetry

Example

sys.exit(cli()) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1128, in __call__ return self.main(*args, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke return __callback(*args, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/__main__.py", line 177, in serve_command serve.serve(dev_addr=dev_addr, livereload=livereload, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 54, in serve config = builder() File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 49, in builder build(config, live_server=live_server, dirty=dirty) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 314, in build _build_page(file.page, config, doc_files, nav, env, dirty) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 220, in _build_page output = config['plugins'].run_event( File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/plugins.py", line 102, in run_event result = method(item, **kwargs) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 197, in on_post_page fixed_output, unmapped = fix_refs(output, url_mapper) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 186, in fix_refs html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 156, in inner url = url_mapper(unescape(identifier)) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 94, in get_item_url new_identifiers = fallback(identifier) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 408, in get_anchors anchors = handler.renderer.get_anchors(handler.collector.collect(identifier, fallback_config)) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings_handlers/python/collector.py", line 69, in collect loader.load_module(module_name) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 131, in load_module top_module = self._load_module_path(package.name, package.path, submodules=submodules) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 287, in _load_module_path self._load_submodules(module) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 292, in _load_submodules self._load_submodule(module, subparts, subpath) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 303, in _load_submodule member_parent[subparts[-1]] = self._load_module_path( File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 285, in _load_module_path module = self._inspect_module(module_name, module_path, parent) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 347, in _inspect_module module = inspect( File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 92, in inspect ).get_module(import_paths) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 206, in get_module value = dynamic_import(import_path, import_paths) File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/importer.py", line 67, in dynamic_import value = getattr(value, part) AttributeError: module 'pydantic' has no attribute '_hypothesis_plugin'">
# Install Dependencies
$ poetry install

# Enter Shell
$ poetry shell

# Serve Docs
$ mkdocs serve
INFO     -  Building documentation...
INFO     -  Cleaning site directory
ERROR    -  Error building page 'index.md': module 'pydantic' has no attribute '_hypothesis_plugin'
Traceback (most recent call last):
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 88, in get_item_url
    url = self._url_map[identifier]
KeyError: 'pydantic'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fakeusername/Desktop/example/.venv/bin/mkdocs", line 8, in <module>
    sys.exit(cli())
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/__main__.py", line 177, in serve_command
    serve.serve(dev_addr=dev_addr, livereload=livereload, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 54, in serve
    config = builder()
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/serve.py", line 49, in builder
    build(config, live_server=live_server, dirty=dirty)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 314, in build
    _build_page(file.page, config, doc_files, nav, env, dirty)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/commands/build.py", line 220, in _build_page
    output = config['plugins'].run_event(
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs/plugins.py", line 102, in run_event
    result = method(item, **kwargs)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 197, in on_post_page
    fixed_output, unmapped = fix_refs(output, url_mapper)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 186, in fix_refs
    html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 156, in inner
    url = url_mapper(unescape(identifier))
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 94, in get_item_url
    new_identifiers = fallback(identifier)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 408, in get_anchors
    anchors = handler.renderer.get_anchors(handler.collector.collect(identifier, fallback_config))
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/mkdocstrings_handlers/python/collector.py", line 69, in collect
    loader.load_module(module_name)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 131, in load_module
    top_module = self._load_module_path(package.name, package.path, submodules=submodules)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 287, in _load_module_path
    self._load_submodules(module)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 292, in _load_submodules
    self._load_submodule(module, subparts, subpath)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 303, in _load_submodule
    member_parent[subparts[-1]] = self._load_module_path(
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 285, in _load_module_path
    module = self._inspect_module(module_name, module_path, parent)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/loader.py", line 347, in _inspect_module
    module = inspect(
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 92, in inspect
    ).get_module(import_paths)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/agents/inspector.py", line 206, in get_module
    value = dynamic_import(import_path, import_paths)
  File "/home/fakeusername/Desktop/example/.venv/lib/python3.10/site-packages/griffe/importer.py", line 67, in dynamic_import
    value = getattr(value, part)
AttributeError: module 'pydantic' has no attribute '_hypothesis_plugin'
You might also like...
Python-samples - This project is to help someone need some practices when learning python language

Python-samples - This project is to help someone need some practices when learning python language

Valentine-with-Python - A Python program generates an animation of a heart with cool texts of your loved one
Valentine-with-Python - A Python program generates an animation of a heart with cool texts of your loved one

Valentine with Python Valentines with Python is a mini fun project I have coded.

A curated list of awesome tools for Sphinx Python Documentation Generator

Awesome Sphinx (Python Documentation Generator) A curated list of awesome extra libraries, software and resources for Sphinx (Python Documentation Gen

API Documentation for Python Projects

API Documentation for Python Projects. Example pdoc -o ./html pdoc generates this website: pdoc.dev/docs. Installation pip install pdoc pdoc is compat

🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.
🏆 A ranked list of awesome python developer tools and libraries. Updated weekly.

Best-of Python Developer Tools 🏆 A ranked list of awesome python developer tools and libraries. Updated weekly. This curated list contains 250 awesom

Run `black` on python code blocks in documentation files

blacken-docs Run black on python code blocks in documentation files. install pip install blacken-docs usage blacken-docs provides a single executable

Legacy python processor for AsciiDoc

AsciiDoc.py This branch is tracking the alpha, in-progress 10.x release. For the stable 9.x code, please go to the 9.x branch! AsciiDoc is a text docu

📖  Generate markdown API documentation from Google-style Python docstring. The lazy alternative to Sphinx.
📖 Generate markdown API documentation from Google-style Python docstring. The lazy alternative to Sphinx.

lazydocs Generate markdown API documentation for Google-style Python docstring. Getting Started • Features • Documentation • Support • Contribution •

A Python module for creating Excel XLSX files.
A Python module for creating Excel XLSX files.

XlsxWriter XlsxWriter is a Python module for writing files in the Excel 2007+ XLSX file format. XlsxWriter can be used to write text, numbers, formula

Owner
Hayden Richards
Yes, that is my sausage dog
Hayden Richards
A collection and example code of every topic you need to know about in the basics of Python.

The Python Beginners Guide: Master The Python Basics Tonight This guide is a collection of every topic you need to know about in the basics of Python.

Ahmed Baari 1 Dec 19, 2021
Example Python code for running the mango-explorer marketmaker

?? Mango Explorer ?? Introduction This guide will show you how to load and run a customisable marketmaker that runs on Mango Markets using the mango-e

Blockworks Foundation 2 Apr 11, 2022
A collection of simple python mini projects to enhance your python skills

A collection of simple python mini projects to enhance your python skills

PYTHON WORLD 12.1k Jan 5, 2023
Python Eacc is a minimalist but flexible Lexer/Parser tool in Python.

Python Eacc is a parsing tool it implements a flexible lexer and a straightforward approach to analyze documents.

Iury de oliveira gomes figueiredo 60 Nov 16, 2022
Repository for learning Python (Python Tutorial)

Repository for learning Python (Python Tutorial) Languages and Tools ?? Overview ?? Repository for learning Python (Python Tutorial) Languages and Too

Swiftman 2 Aug 22, 2022
A python package to avoid writing and maintaining duplicated python docstrings.

docstring-inheritance is a python package to avoid writing and maintaining duplicated python docstrings.

Antoine Dechaume 15 Dec 7, 2022
advance python series: Data Classes, OOPs, python

Working With Pydantic - Built-in Data Process ========================== Normal way to process data (reading json file): the normal princiople, it's f

Phung Hưng Binh 1 Nov 8, 2021
A comprehensive and FREE Online Python Development tutorial going step-by-step into the world of Python.

FREE Reverse Engineering Self-Study Course HERE Fundamental Python The book and code repo for the FREE Fundamental Python book by Kevin Thomas. FREE B

Kevin Thomas 7 Mar 19, 2022
A simple USI Shogi Engine written in python using python-shogi.

Revengeshogi My attempt at creating a USI Shogi Engine in python using python-shogi. Current State of Engine Currently only generating random moves us

null 1 Jan 6, 2022
Python-slp - Side Ledger Protocol With Python

Side Ledger Protocol Run python-slp node First install Mongo DB and run the mong

Solar 3 Mar 2, 2022