Python中文
首页
教程
问答
标签
搜索
登录
注册
在以下路径中未找到名为“lab”的模板子目录
回答此问题可获得
20
贡献值,回答如果被采纳可获得
50
分。
<p>我正在运行一个pythonazure函数,它通过<code>nbconvert</code>API运行一个jupyter笔记本。这已经运行了一段时间,但在没有部署新代码的情况下,我开始出现以下错误:</p> <pre><code>No template sub-directory with name 'lab' found in the following paths: /home/.local/share/jupyter /usr/local/share/jupyter /usr/share/jupyter </code></pre> <p>我使用的代码是:</p> <pre><code>from nbconvert.preprocessors import ExecutePreprocessor from nbconvert import HTMLExporter ... dl = DictLoader({'footer': """ {%- extends 'full.tpl' -%} {% block input_group %} {%- if cell.metadata.get('nbconvert', {}).get('show_code', False) -%} ((( super() ))) {%- endif -%} {% endblock input_group %} {% block output_group %} <style> .output_prompt{visibility:hidden;}</style> {{ super() }} {% endblock output_group %} """}) ... html_exporter = HTMLExporter(extra_loaders=[dl], template_file='footer') html_exporter.template_name = 'classic' with open(JUPYTER_DIR + NOTEBOOK_NAME) as f: nb = nbformat.read(f, as_version=4) ep = ExecutePreprocessor(timeout=600, kernel_name='python') ep.preprocess(nb, {'metadata': {'path': JUPYTER_DIR}}) (body, resources) = html_exporter.from_notebook_node(nb) </code></pre> <p>functionapp正在运行以下操作:</p> <pre><code>python3.6 nbconvert6.0.3 jupyter-lab0.1.1 </code></pre> <p>我试过用谷歌搜索这个错误,到目前为止我发现的最接近的东西是<a href="https://stackoverflow.com/questions/62431121/nbconvert-valueerror-no-template-sub-directory-with-name-rst-found-in-the-fo">this</a>,它很相似,但没有得到回答,也不完全相同。我想我会在这里发布,看看是否有人知道如何解决问题,或者如果我设法解决了问题,我会更新</p> <p>我很困惑,因为<code>lab</code>不是我熟悉的关键字(可能在<code>jupyterlab</code>之外),并且没有在代码中使用</p> <p>至于提到的路径:</p> <ul> <li><code>home/.local/share/jupyter/</code>存在并包含<code>nbconvert/templates/html</code></li> <li><code>usr/local/share/jupyter</code>&<code>usr/share/jupyter</code>不存在</li> </ul> <p>提前感谢您的帮助</p>
0 条评论
分类:
Python问答
请先
登录
后评论
默认排序
时间排序
1 个回答
匿名
1天前
擅长:python、mysql、java
<p>在将nbconvert升级到6.0.8之后,我也遇到了同样的问题</p> <p>回到nbconvert 5.6.1解决了我的问题</p> <blockquote> <p><code>pip uninstall nbconvert</code> <br/> <code>pip install nbconvert==5.6.1</code></p> </blockquote>
请先
登录
后评论
针对此问题:
更多的回答
关注
89
关注
收藏
1
收藏,
216
浏览
网友 提问于 2天前
相关Python问题
Python中是否有类似Clojure的线程宏?
4 回答
Python中是否有类似JPanel的组件?
7 回答
Python中是否有类似MATLAB的vpasolve的等价解算器
2 回答
python中是否有类似NLTK的东西不需要安装?
7 回答
python中是否有类似osgi在java中试图解决的需求?
3 回答
python中是否有类似PAM的模块?
3 回答
Python中是否有类似Perl的Data::Dumper的工具用来检查数据结构?
8 回答
python中是否有类似robocy的函数,带有重试选项?
5 回答
Python中是否有类似Rstudio的帮助部分?
1 回答
python中是否有类似ruby的索引方法?
4 回答
python中是否有类似于“perlpe”选项的内容?
2 回答
Python中是否有类似于C++ STL映射的结构?
6 回答
python中是否有类似于C中预处理器行为的工具?
7 回答
Python中是否有类似于Harmony的let关键字的内容?
2 回答
python中是否有类似于matlab中fzero的函数?
5 回答
python中是否有类似于MATLAB中peaks(N)的函数/实现?
6 回答
Python中是否有类似于Matlab的deconvblind的函数?
1 回答
Python中是否有类似于Perl中“想要”的东西
10 回答
Python中是否有类似于Perl正则表达式中的"local"变量?
4 回答
python中是否有类似于php的$$变量的语法
1 回答