build: error generating docs in new dev environment
See original GitHub issueI’m following the development environment setup instructions for Conda to bootstrap a new environment on an M1 MacBook Pro. When I attempt to run mkdocs serve
per the instructions, it reports the error below. I get the same error under Conda for both Intel and M1 architectures, and it’s not completely obvious to me whether this is related to my environment setup or if the docs on master are broken. Any thoughts on what could be wrong?
$ mkdocs serve
INFO - Building documentation...
INFO - [macros] - Macros arguments: {'module_name': 'main', 'modules': [], 'include_dir': '', 'include_yaml': [],
'j2_block_start_string': '', 'j2_block_end_string': '', 'j2_variable_start_string': '', 'j2_variable_end_string': '',
'on_undefined': 'keep', 'on_error_fail': False, 'verbose': False}
INFO - [macros] - Extra variables (config file): ['version', 'project_name', 'team', 'social', 'support_levels']
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Converting notebook (execute=True): /Users/dsantin/Documents/Ibis/ibis/docs/ibis-for-sql-programmers.ipynb
ERROR - Error reading page 'ibis-for-sql-programmers.ipynb': format() argument must be a formatter instance, not a class
Traceback (most recent call last):
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/pygments/__init__.py", line 61, in format
formatter.format(tokens, realoutfile)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/pygments/formatter.py", line 94, in format
return self.format_unencoded(tokensource, outfile)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/pygments/formatters/html.py", line 981, in format_unencoded
source = self.wrap(source)
TypeError: wrap() missing 1 required positional argument: 'outfile'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/bin/mkdocs", line 10, in <module>
sys.exit(cli())
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs/__main__.py", line 181, in serve_command
serve.serve(dev_addr=dev_addr, livereload=livereload, watch=watch, **kwargs)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 63, in serve
config = builder()
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 58, in builder
build(config, live_server=live_server, dirty=dirty)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs/commands/build.py", line 292, in build
_populate_page(file.page, config, files, dirty)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs/commands/build.py", line 174, in _populate_page
page.render(config, files)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs_jupyter/plugin.py", line 94, in new_render
body = convert.nb2html(
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs_jupyter/nbconvert2.py", line 105, in nb2html
content, resources = exporter.from_filename(nb_path)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/nbconvert/exporters/exporter.py", line 189, in from_filename
return self.from_file(f, resources=resources, **kw)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/nbconvert/exporters/exporter.py", line 206, in from_file
return self.from_notebook_node(
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/nbconvert/exporters/html.py", line 215, in from_notebook_node
return super().from_notebook_node(nb, resources, **kw)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 400, in from_notebook_node
output = self.template.render(nb=nb_copy, resources=resources)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs_jupyter/templates/mkdocs_html/notebook.html.j2", line 78, in top-level template code
{%- set vars = {"cell_id": 0 } -%}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/lab/index.html.j2", line 3, in top-level template code
{% from 'jupyter_widgets.html.j2' import jupyter_widgets %}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/lab/base.html.j2", line 260, in top-level template code
{% set div_id = uuid4() %}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/base/display_priority.j2", line 1, in top-level template code
{%- extends 'base/null.j2' -%}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/base/null.j2", line 26, in top-level template code
{%- block body -%}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/base/null.j2", line 29, in block 'body'
{%- block body_loop -%}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/base/null.j2", line 31, in block 'body_loop'
{%- block any_cell scoped -%}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/base/null.j2", line 87, in block 'any_cell'
{%- block markdowncell scoped-%} {%- endblock markdowncell -%}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/share/jupyter/nbconvert/templates/lab/base.html.j2", line 101, in block 'markdowncell'
{{ cell.source | markdown2html | strip_files_prefix }}
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs_jupyter/nbconvert2.py", line 200, in custom_markdown2html
return MarkdownWithMath(
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mistune.py", line 1001, in render
return self.parse(text)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mistune.py", line 1004, in parse
out = self.output(preprocessing(text))
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mistune.py", line 1053, in output
out += self.tok()
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mistune.py", line 1063, in tok
return getattr(self, 'output_%s' % t)()
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mistune.py", line 1085, in output_code
return self.renderer.block_code(
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/mkdocs_jupyter/nbconvert2.py", line 219, in block_code
return highlight(code, lexer, formatter)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/pygments/__init__.py", line 82, in highlight
return format(lex(code, lexer), formatter, outfile)
File "/Users/dsantin/miniconda3-intel/envs/ibis-dev-intel/lib/python3.9/site-packages/pygments/__init__.py", line 69, in format
raise TypeError('format() argument must be a formatter instance, '
TypeError: format() argument must be a formatter instance, not a class
Issue Analytics
- State:
- Created a year ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Troubleshooting build errors | Cloud Build Documentation
Build triggers use the Cloud Build service account to create a build. The error above indicates that the Cloud Build service account is...
Read more >Troubleshooting problems with Dev Environments
Learn how to troubleshoot problems with Dev Environments in Amazon CodeCatalyst.
Read more >Encountered “Minified React error” in the production ...
The first thing to do in this case is to debug the app in order to have more details: Use minify and dev...
Read more >Troubleshooting build errors and crashes
Go to your build details page (find it on the build dashboard if you don't have it open already) and expand any failed...
Read more >Facing issue " Failed to install the app. Make sure you have ...
This solved the problem on my machine after generating a bare workflow expo project. https://reactnative.dev/docs/environment-setup
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just wanted to confirm that
master
builds and serves docs for me as well. Thank you @cpcloud and @anjakefala!Alright, I’ve merged https://github.com/conda-forge/mkdocs-jupyter-feedstock/pull/17. In a couple hours I’ll check back to see if the package is available on conda-forge and then run the ibis CI job that regenerates the conda lockfiles to get the latest version.