0

Code :

dd= parser.from_file(r"file_path")

Line number 554 in tika .py

resp = verbFn(serviceUrl, encodedData, **effectiveRequestOptions)

Reason in resp was INKApi Error.

I am running tika server on my system.

shobhna
  • 13
  • 6

1 Answers1

1

First, you can use the docker image to have tika-server up and running:

docker run -d -p 9998:9998 apache/tika:1.28.2-full 

Once you got the image running could you try to open the file like this?

from tika import parser

os.environ['TIKA_SERVER_ENDPOINT'] = 'http://0.0.0.0:9998/'

with open('path/to/file', 'rb') as file:
    data = parser.from_file(file)

Tau n Ro
  • 108
  • 8