当试图像往常一样将文档发布到Elasticsearch时,我收到此错误:
cluster_block_exception [FORBIDDEN/12/index read-only / allow delete (api)];
Run Code Online (Sandbox Code Playgroud)
我还在Elasticsearch日志上看到此消息:
flood stage disk watermark [95%] exceeded ... all indices on this node will marked read-only
Run Code Online (Sandbox Code Playgroud) 我在Python中收到很多这样的警告:
DeprecationWarning: invalid escape sequence \A
orcid_regex = '\A[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9X]\Z'
DeprecationWarning: invalid escape sequence \/
AUTH_TOKEN_PATH_PATTERN = '^\/api\/groups'
DeprecationWarning: invalid escape sequence \
"""
DeprecationWarning: invalid escape sequence \.
DOI_PATTERN = re.compile('(https?://(dx\.)?doi\.org/)?10\.[0-9]{4,}[.0-9]*/.*')
<unknown>:20: DeprecationWarning: invalid escape sequence \(
<unknown>:21: DeprecationWarning: invalid escape sequence \(
Run Code Online (Sandbox Code Playgroud)
他们的意思是什么?我该如何解决它们?
我正在尝试使用Sphinx的.. include::指令将一个文件中的文档包含在另一个文件中,以避免重复文档的源文本.我所包含configuration.rst的部分是(它是配置设置的参考文档的一部分),它包含一些用于交叉引用每个配置设置的标签:
.. start_config-authorization
.. _ckan.auth.anon_create_dataset:
ckan.auth.anon_create_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Example::
ckan.auth.anon_create_dataset = False
Default value: ``False``
Allow users to create datasets without registering and logging in.
.. _ckan.auth.create_unowned_dataset:
ckan.auth.create_unowned_dataset
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
.. end_config-authorization
Run Code Online (Sandbox Code Playgroud)
在另一个文件(authorization.rst)中,我只包含configuration.rst内联的授权配置设置,如下所示:
.. include:: /configuration.rst
:start-after: start_config-authorization
:end-before: end_config-authorization
Run Code Online (Sandbox Code Playgroud)
问题是包含文本中的标签会从Sphinx产生此警告:
doc/configuration.rst:224: WARNING: duplicate label ckan.auth.anon_create_dataset, other instance in doc/authorization.rst
Run Code Online (Sandbox Code Playgroud)
到目前为止,如果我把交叉引用似乎没有被打破:
:ref:`ckan.auth.anon_create_dataset`
Run Code Online (Sandbox Code Playgroud)
在第三个文件中,这正确地生成了一个到ckan.auth.anon_create_datasetin 的定义的链接configuration.html(而不是它的包含副本authorization.html).
简单地忽略或消除这些重复标签警告是否安全,并期望所有交叉引用链接到configuration.html?或者我应该找到另一种方法吗?
pandas.read_csv()推断列的类型,但我不能让它来推断任何datetime或timedelta类型(例如datetime64,timedelta64用于其值看起来明显日期时间和时间增量列).
这是一个示例CSV文件:
datetime,timedelta,integer,number,boolean,string
20111230 00:00:00,one hour,10,1.6,True,Foobar
Run Code Online (Sandbox Code Playgroud)
还有一些用pandas读取它的代码:
dataframe = pandas.read_csv(path)
Run Code Online (Sandbox Code Playgroud)
该数据框上的列类型分别为object,object,int,float,bool,object.除了前两列之外,它们都是我所期望的,我希望它们是datetime和timedelta.
是否有可能让pandas自动检测datetime和timedelta列?
(我不想告诉大熊猫哪些列是datetimes和timedeltas或告诉它格式,我希望它尝试自动检测它们,就像它对into,float和bool列一样.)
在大多数终端仿真器中,Middle Mouse Button将从 X Windows 主要选择进行粘贴。在启用了鼠标模式的 tmux 中 ( set -g mouse on)Middle Mouse Button不再从主要选择中粘贴,因为鼠标单击是由 tmux 而不是终端模拟器捕获的。要粘贴,您必须将点击传递到终端模拟器。Shift + Middle Mouse Button
即使启用了鼠标模式,如何在Middle Mouse Button无需按住 的情况下进行粘贴?Shift
尝试将文件上传到CKAN中的数据集时,我在Web界面中收到此错误:
Failed to get credentials for storage upload. Upload cannot proceed
Run Code Online (Sandbox Code Playgroud) 我已经在virtualenv中安装了CKAN并激活了virtualenv,并且我已经在pip-requirements-docs.txt中安装了这些需求,但是当我尝试构建文档时,我收到此错误:
> python setup.py build_sphinx
...
sphinx.errors.ThemeError: no theme named 'sphinx-theme-okfn' found (missing theme.conf?)
Run Code Online (Sandbox Code Playgroud)