6

当我jupyter nbconvert --execute --to html toy_notebook.ipynb在 macOS 10.12.5 上使用 jupyter 版本 4.3.0 和 python 3.6 运行时,我收到以下警告:

[NbConvertApp] 将笔记本 toy_notebook.ipynb 转换为 html [NbConvertApp] 使用内核执行笔记本:python3 /Users/zblanton/anaconda/lib/python3.6/site-packages/jupyter_client/connect.py:157:RuntimeWarning:无法设置粘性'/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000gq/T' 上的位:[Errno 1] 不允许操作:'/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000gq/T' RuntimeWarning,/Users/zblanton/anaconda/lib/python3.6/ site-packages/jupyter_client/connect.py:157:RuntimeWarning:无法在'/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000gq/T'上设置粘滞位:[Errno 1] 不允许操作:'/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000g /T' 运行时警告,

堆栈跟踪在这里。我认为在正在创建的临时连接文件上设置粘性位是一个问题?

文件“/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py”,第 172 行,在 from_filename
return self.from_file(f, resources=resources, **kw)
File中/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py”,第 190 行,在 from_file

return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)                             

文件“/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/html.py”,第 84 行,在 from_notebook_node

return super(HTMLExporter, self).from_notebook_node(nb, resources, **kw)                File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/templateexporter.py",

第 268 行,在 from_notebook_node 中

nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, **kw)                         

文件“/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py”,第 132 行,在 from_notebook_node

nb_copy, resources = self._preprocess(nb_copy, resources)                               File

“/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py”,第 309 行,在 _preprocess

nbc, resc = preprocessor(nbc, resc)        File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/preprocessors/base.py",

第 47 行,通话中

return self.preprocess(nb,resources)       File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py",

第 237 行,在预处理中

cwd=path)                                  File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/preprocessors/execute.py",

第 217 行,在 start_new_kernel 中

km.start_kernel(**kwargs)                  File "/Users/zblanton/anaconda/lib/python3.6/site-packages/jupyter_client/manager.py",

第 238 行,在 start_kernel 中

self.write_connection_file()               File "/Users/zblanton/anaconda/lib/python3.6/site-packages/jupyter_client/connect.py",

第 431 行,在 write_connection_file 中

kernel_name=self.kernel_name               File "/Users/zblanton/anaconda/lib/python3.6/site-packages/jupyter_client/connect.py",

第 157 行,在 write_connection_file 中

RuntimeWarning,                            File "/Users/zblanton/anaconda/lib/python3.6/warnings.py", line 99, in

_showwarnmsg
msg.file, msg.line) 文件“dodo.py”,第 16 行,在 warn_with_traceback
traceback.print_stack(file=log)

对于它的价值,我使用的笔记本看起来像这样:

{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "be nice"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9\n"
     ]
    }
   ],
   "source": [
    "print(3 * 3)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
4

0 回答 0