422 Tika server response? Tika-Python

一曲冷凌霜 提交于 2019-12-11 19:47:49

问题


I have been trying to get Apache-Tika to work with this python package: https://github.com/chrismattmann/tika-python

I have the following code in my python program:

#!/usr/bin/env python
import tika
tika.initVM()
from tika import parser
parsed = parser.from_file('pdf/myPdf.pdf')

But I get a 422 response every time:

[MainThread  ] [WARNI]  Failed to see startup log message; retrying...
[MainThread  ] [WARNI]  Tika server returned status: 422

Apache Tika does work when I use the following command:

java -jar tika-app-1.18.jar -t pdf/alnaggar2016lattice.pdf 

I really would like to fix this error with the Tika-Python package because it would be a lot easier for the rest of the project if this would work.

来源:https://stackoverflow.com/questions/52196544/422-tika-server-response-tika-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!