-
I'm able to build with > mkdocs build --clean --config-file ./docs/mkdocs.yml
INFO - Cleaning site directory
INFO - Building documentation to directory: /home/{path}/{package}/docs/site
ERROR - mkdocstrings: src.spyglass.settings could not be found
ERROR - Error reading page 'api/settings.md':
ERROR - Could not collect 'src.{package}.settings'
Aborted with a BuildError! The verbose build log suggests it errors out on the first casemkdocs build -v --clean --config-file ./docs/mkdocs.yml
DEBUG - Loading configuration file: <_io.BufferedReader name='./docs/mkdocs.yml'>
DEBUG - Loaded theme configuration for 'material' from
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/material/templates/mkdocs_theme.yml':
{'language': 'en', 'direction': None, 'features': [], 'font': {'text': 'Roboto', 'code':
'Roboto Mono'}, 'icon': None, 'favicon': 'assets/images/favicon.png', 'static_templates':
['404.html']}
DEBUG - Config value 'config_file_path' = './docs/mkdocs.yml'
DEBUG - Config value 'site_name' = 'Spyglass'
DEBUG - Config value 'nav' = [{'Home': 'index.md'}, {'Installation': 'installation.md'}, {'Tutorials':
[{'Overview': 'notebooks/index.md'}, {'Intro': [{'Setup': 'notebooks/00_Setup.ipynb'}, {'Insert
Data': 'notebooks/01_Insert_Data.ipynb'}, {'Data Sync': 'notebooks/02_Data_Sync.ipynb'},
{'Merge Tables': 'notebooks/03_Merge_Tables.ipynb'}, {'Config Populate':
'notebooks/04_PopulateConfigFile.ipynb'}, {'Export': 'notebooks/05_Export.ipynb'}]}, {'Spikes':
[{'Spike Sorting V0': 'notebooks/10_Spike_SortingV0.ipynb'}, {'Spike Sorting V1':
'notebooks/10_Spike_SortingV1.ipynb'}]}, {'Position': [{'Position Trodes':
'notebooks/20_Position_Trodes.ipynb'}, {'DLC Models': 'notebooks/21_DLC.ipynb'}, {'Looping
DLC': 'notebooks/22_DLC_Loop.ipynb'}, {'Linearization': 'notebooks/24_Linearization.ipynb'}]},
{'LFP': [{'LFP': 'notebooks/30_LFP.ipynb'}, {'Theta': 'notebooks/31_Theta.ipynb'}, {'Ripple
Detection': 'notebooks/32_Ripple_Detection.ipynb'}]}, {'Decoding': [{'Extracting Waveforms':
'notebooks/40_Extracting_Clusterless_Waveform_Features.ipynb'}, {'Decoding Clusterless':
'notebooks/41_Decoding_Clusterless.ipynb'}, {'Decoding Sorted Spikes':
'notebooks/42_Decoding_SortedSpikes.ipynb'}]}, {'MUA Detection':
'notebooks/50_MUA_Detection.ipynb'}]}, {'Miscellaneous': [{'Overview': 'misc/index.md'},
{'FigURL': 'misc/figurl_views.md'}, {'Session Groups': 'misc/session_groups.md'}, {'Insert
Data': 'misc/insert_data.md'}, {'Mixin': 'misc/mixin.md'}, {'Merge Tables':
'misc/merge_tables.md'}, {'Database Management': 'misc/database_management.md'}, {'Export':
'misc/export.md'}]}, {'API Reference': 'api/'}, {'How to Contribute': 'contribute.md'},
{'Change Log': 'CHANGELOG.md'}, {'Copyright': 'LICENSE.md'}]
DEBUG - Config value 'pages' = None
DEBUG - Config value 'exclude_docs' = None
DEBUG - Config value 'draft_docs' = None
DEBUG - Config value 'not_in_nav' = None
DEBUG - Config value 'site_url' = 'https://lorenfranklab.github.io/spyglass/'
DEBUG - Config value 'site_description' = 'Spyglass Documentation'
DEBUG - Config value 'site_author' = 'CBroz1'
DEBUG - Config value 'theme' = Theme(name='material', dirs=['./docs/overrides',
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/material/templates',
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/mkdocs/templates'],
static_templates={'sitemap.xml', '404.html'}, name='material', locale=Locale('en'),
language='en', direction=None, features=['toc.follow', 'navigation.top', 'navigation.instant',
'navigation.tracking', 'navigation.top', 'search.suggest', 'search.share', 'navigation.footer',
'content.code.copy'], font={'text': 'Roboto', 'code': 'Roboto Mono'}, icon=None,
favicon='images/Spyglass.svg', logo='images/FrankLab.png', palette=[{'media':
'(prefers-color-scheme: light)', 'scheme': 'auto', 'toggle': {'icon': 'material/brightness-7',
'name': 'Switch to dark mode'}}, {'media': '(prefers-color-scheme: slate)', 'scheme': 'slate',
'toggle': {'icon': 'material/brightness-4', 'name': 'Switch to light mode'}}],
disable_nav_previous_next=True, disable_nav_search=False, navigation_depth=2)
DEBUG - Config value 'docs_dir' = '/home/cb/wrk/spyglass/docs/src'
DEBUG - Config value 'site_dir' = '/home/cb/wrk/spyglass/docs/site'
DEBUG - Config value 'copyright' = 'Copyright (c) 2020-present Loren Frank'
DEBUG - Config value 'google_analytics' = None
DEBUG - Config value 'dev_addr' = _IpAddressValue(host='127.0.0.1', port=8000)
DEBUG - Config value 'use_directory_urls' = True
DEBUG - Config value 'repo_url' = 'https://github.com/LorenFrankLab/spyglass'
DEBUG - Config value 'repo_name' = 'GitHub'
DEBUG - Config value 'edit_uri_template' = None
DEBUG - Config value 'edit_uri' = 'blob/main/docs/src/'
DEBUG - Config value 'extra_css' = ['stylesheets/extra.css']
DEBUG - Config value 'extra_javascript' = []
DEBUG - Config value 'extra_templates' = []
DEBUG - Config value 'markdown_extensions' = ['toc', 'tables', 'fenced_code', 'attr_list',
'pymdownx.highlight', 'pymdownx.inlinehilite', 'pymdownx.snippets', 'pymdownx.superfences']
DEBUG - Config value 'mdx_configs' = {'toc': {'permalink': True}, 'pymdownx.highlight':
{'anchor_linenums': True, 'line_spans': '__span', 'pygments_lang_class': True}}
DEBUG - Config value 'strict' = False
DEBUG - Config value 'remote_branch' = 'gh-pages'
DEBUG - Config value 'remote_name' = 'origin'
DEBUG - Config value 'extra' = {'generator': False, 'version': {'provider': 'mike'}, 'social':
[{'icon': 'fontawesome/brands/github', 'link': 'https://github.com/LorenFrankLab/spyglass'},
{'icon': 'fontawesome/brands/python', 'link': 'https://pypi.org/project/spyglass-neuro/'}]}
DEBUG - Config value 'plugins' = {'material/search': <material.plugins.search.plugin.SearchPlugin
object at 0x7a9abd9efe20>, 'exclude': <mkdocs_exclude.plugin.Exclude object at 0x7a9abda04ca0>,
'mike': <mike.mkdocs_plugin.MikePlugin object at 0x7a9abda04ee0>, 'mkdocstrings':
<mkdocstrings.plugin.MkdocstringsPlugin object at 0x7a9abd544d90>, 'literate-nav':
<mkdocs_literate_nav.plugin.LiterateNavPlugin object at 0x7a9abd544e80>, 'exclude-search':
<mkdocs_exclude_search.plugin.ExcludeSearch object at 0x7a9abd458a30>, 'gen-files':
<mkdocs_gen_files.plugin.GenFilesPlugin object at 0x7a9abd458520>}
DEBUG - Config value 'hooks' = {}
DEBUG - Config value 'watch' = []
DEBUG - Config value 'validation' = {'nav': {'omitted_files': 20, 'not_found': 30, 'absolute_links':
20}, 'links': {'not_found': 30, 'absolute_links': 20, 'unrecognized_links': 20, 'anchors': 20}}
DEBUG - Running `startup` event from plugin 'material/search'
DEBUG - Running `config` event from plugin 'material/search'
DEBUG - Looking for translations for locale 'en'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/mkdocs/templates/locales'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/material/templates/locales'
DEBUG - No translations found here: './docs/overrides/locales'
DEBUG - Looking for translations for locale 'en'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/mkdocs/templates/locales'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/material/templates/locales'
DEBUG - No translations found here: './docs/overrides/locales'
DEBUG - Looking for translations for locale 'en'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/mkdocs/templates/locales'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/material/templates/locales'
DEBUG - No translations found here: './docs/overrides/locales'
DEBUG - Running `config` event from plugin 'mike'
DEBUG - Running `config` event from plugin 'mkdocstrings'
DEBUG - mkdocstrings: Adding extension to the list
DEBUG - mkdocstrings: Added a subdued autorefs instance <mkdocs_autorefs.plugin.AutorefsPlugin object
at 0x7a9abd3f9b20>
DEBUG - Running `config` event from plugin 'autorefs'
DEBUG - mkdocs_autorefs: Adding AutorefsExtension to the list
INFO - Cleaning site directory
INFO - Building documentation to directory: /home/cb/wrk/spyglass/docs/site
DEBUG - Looking for translations for locale 'en'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/mkdocs/templates/locales'
DEBUG - No translations found here:
'/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/material/templates/locales'
DEBUG - No translations found here: './docs/overrides/locales'
DEBUG - Running `files` event from plugin 'exclude'
DEBUG - Running `files` event from plugin 'mike'
DEBUG - Running `files` event from plugin 'gen-files'
DEBUG - Running `files` event from plugin 'literate-nav'
DEBUG - Navigation for 'api' based on 'api/navigation.md'.
DEBUG - Running `nav` event from plugin 'literate-nav'
DEBUG - Reading markdown pages.
DEBUG - Reading: index.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - Running `page_content` event from plugin 'gen-files'
DEBUG - Running `page_content` event from plugin 'autorefs'
DEBUG - Reading: CHANGELOG.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - Running `page_content` event from plugin 'gen-files'
DEBUG - Running `page_content` event from plugin 'autorefs'
DEBUG - Reading: LICENSE.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - Running `page_content` event from plugin 'gen-files'
DEBUG - Running `page_content` event from plugin 'autorefs'
DEBUG - Reading: contribute.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - Running `page_content` event from plugin 'gen-files'
DEBUG - Running `page_content` event from plugin 'autorefs'
DEBUG - Reading: installation.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - Running `page_content` event from plugin 'gen-files'
DEBUG - Running `page_content` event from plugin 'autorefs'
DEBUG - Reading: api/index.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - Running `page_content` event from plugin 'gen-files'
DEBUG - Running `page_content` event from plugin 'autorefs'
DEBUG - Reading: api/navigation.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - Running `page_content` event from plugin 'gen-files'
DEBUG - Running `page_content` event from plugin 'autorefs'
DEBUG - Reading: api/settings.md
DEBUG - Running `page_markdown` event from plugin 'autorefs'
DEBUG - mkdocstrings: Matched '::: src.spyglass.settings'
DEBUG - mkdocstrings: Using handler 'python'
DEBUG - mkdocstrings: Collecting data
DEBUG - griffe: Found src: loading
DEBUG - griffe: Loading path
[PosixPath('/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/src')]
DEBUG - griffe: Loading path
/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/src/datatjoint_linter/__init__.py
DEBUG - griffe: Loading path
/home/cb/miniconda3/envs/spy/lib/python3.9/site-packages/src/datatjoint_linter/linter.py
DEBUG - griffe: Iteration 1 finished, 0 aliases resolved, still 0 to go
ERROR - mkdocstrings: src.spyglass.settings could not be found
ERROR - Error reading page 'api/settings.md':
ERROR - Could not collect 'src.spyglass.settings'
Aborted with a BuildError! I see in the release notes for StackOverflow seems to be out of date on this, with posts about much older versions. Not where to start to turn this into a MRE for a bug report. If it helps, this is the repo I'm working on |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello, yes since 1.9.1 mkdocstrings-python does not try to find packages using relative paths, as it caused issues for others and was never officially supported (we specify objects dotted-path, not file paths after See https://mkdocstrings.github.io/python/usage/#finding-modules to learn how to properly configure the Python handler for it to find your sources :) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the link! I've tried configuring my To clarify - this is about mkdocstrings finding the module. Relative paths within my module shouldn't impact the process, yeah? Thanks again! |
Beta Was this translation helpful? Give feedback.
If you added
../src
to thepaths
setting, now try removingsrc.
from the autodoc instructions:::
, i.e.::: your.pkg
instead of::: src.your.pkg
.