将Tika与python一起使用,runtimeError:无法启动tika服务器 [英] Use tika with python, runtimeerror: unable to start tika server

查看:544
本文介绍了将Tika与python一起使用,runtimeError:无法启动tika服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用tika包来解析文件. Tika已成功安装,在cmd Java -jar tika-server-1.18.jar

I am trying to use the tika package to Parse files. Tika is successfully installed, tika-server-1.18.jar runned with Code in cmd Java -jar tika-server-1.18.jar

我在Jupyter中的代码是:

My code in the Jupyter is:

Import tika 
from tika Import parser
parsed = parser.from_file('')

但是,我收到以下错误消息:

However, I receive below error:

2018-07-25 10:20:13,325 [MainThread] [WARNI]无法看到启动 日志消息;正在重试... 2018-07-25 10:20:18,329 [MainThread] [WARNI]无法看到启动日志消息;正在重试... 2018-07-25 10:20:23,332 [MainThread] [WARNI]无法查看启动日志 信息;正在重试... 2018-07-25 10:20:28,340 [MainThread] [ERROR] 3次尝试后未收到Tika启动日志消息. 2018-07-25 10:20:28,340 [MainThread] [ERROR]无法接收启动 来自startServer的确认.

2018-07-25 10:20:13,325 [MainThread ] [WARNI] Failed to see startup log message; retrying... 2018-07-25 10:20:18,329 [MainThread ] [WARNI] Failed to see startup log message; retrying... 2018-07-25 10:20:23,332 [MainThread ] [WARNI] Failed to see startup log message; retrying... 2018-07-25 10:20:28,340 [MainThread ] [ERROR] Tika startup log message not received after 3 tries. 2018-07-25 10:20:28,340 [MainThread ] [ERROR] Failed to receive startup confirmation from startServer.

RuntimeError:无法启动Tika Server.

RuntimeError: Unable to start Tika Server.

推荐答案

根据 Apache Tika的网站,全部新版本的tika-server.jar将需要Java 8.

According to Apache Tika's site, all new versions of the tika-server.jar will require Java 8.

2018年4月24日:Apache Tika版本 Apache Tika 1.18已发布!此版本包括错误修复(例如,从PPT中的分组形状中提取),安全修复以及对依赖项的升级.请注意:下一版本将需要Java8.请查看CHANGES.txt文件以获取该发行版中所做更改的完整列表,并查看下载页面以获取有关如何获取Apache Tika 1.18的更多信息.

24 April 2018: Apache Tika Release Apache Tika 1.18 has been released! This release includes bug fixes (e.g. extraction from grouped shapes in PPT), security fixes and upgrades to dependencies. PLEASE NOTE: The next versions will require Java 8. Please see the CHANGES.txt file for the full list of changes in the release and have a look at the download page for more information on how to obtain Apache Tika 1.18.

tika Python库的当前过时文档声称需要Java 7,但现在必须安装Java 8.这是因为如果您的临时文件中找不到tika-server.jar的当前版本,则会在运行时自动下载.

Current outdated docs for tika Python library claim that Java 7 is needed, but now Java 8 must be installed. This is because the current version of tika-server.jar is automatically downloaded at runtime if not found in your temp file.

在安装Java 8之后,我的基本测试代码启动了服务器并正常运行.

After installing Java 8, my basic test code launched the server and worked without error.

这篇关于将Tika与python一起使用,runtimeError:无法启动tika服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆