jupyter nbconvert粘性位运行时警告

2024-10-02 08:17:27 发布

您现在位置:Python中文网/ 问答频道 /正文

当我在macOS 10.12.5上运行jupyter版本4.3.0和python3.6时,我得到以下警告:

[NbConvertApp] Converting notebook toy_notebook.ipynb to html [NbConvertApp] Executing notebook with kernel: python3 /Users/zblanton/anaconda/lib/python3.6/site-packages/jupyter_client/connect.py:157: RuntimeWarning: Failed to set sticky bit on '/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000gq/T': [Errno 1] Operation not permitted: '/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000gq/T' RuntimeWarning, /Users/zblanton/anaconda/lib/python3.6/site-packages/jupyter_client/connect.py:157: RuntimeWarning: Failed to set sticky bit on '/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000gq/T': [Errno 1] Operation not permitted: '/var/folders/nr/1n4j77yx7g93kzr2mrwwdlgm0000gq/T' RuntimeWarning,

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

File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 172, in from_filename
return self.from_file(f, resources=resources, **kw)
File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 190, in from_file

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

File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/html.py", line 84, in 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",

line 268, in from_notebook_node

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

File "/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 132, in from_notebook_node

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

"/Users/zblanton/anaconda/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 309, in _preprocess

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

line 47, in call

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

line 237, in preprocess

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

line 217, in start_new_kernel

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

line 238, in start_kernel

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

line 431, in write_connection_file

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

line 157, in write_connection_file

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

_showwarnmsg
msg.file, msg.line) File "dodo.py", line 16, in 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
}

Tags: infrompylibpackageslinesiteanaconda

热门问题