tika-python
tika-python copied to clipboard
No such file or directory: '/tmp/tika-server.jar'
Why I'm getting this message when I try to use tika?
Traceback (most recent call last):
File "/usr/share/pyshared/test.py", line 124, in <module>
raw = parser.from_file(str(path))
File "/home/fred/.local/lib/python3.8/site-packages/tika/parser.py", line 40, in from_file
output = parse1(service, filename, serverEndpoint, headers=headers, config_path=config_path, requestOptions=requestOptions)
File "/home/fred/.local/lib/python3.8/site-packages/tika/tika.py", line 337, in parse1
status, response = callServer('put', serverEndpoint, service, f,
File "/home/fred/.local/lib/python3.8/site-packages/tika/tika.py", line 532, in callServer
serverEndpoint = checkTikaServer(scheme, serverHost, port, tikaServerJar, classpath, config_path)
File "/home/fred/.local/lib/python3.8/site-packages/tika/tika.py", line 595, in checkTikaServer
if not checkJarSig(tikaServerJar, jarPath):
File "/home/fred/.local/lib/python3.8/site-packages/tika/tika.py", line 615, in checkJarSig
with open(jarPath, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tika-server.jar'
me too. Does anyone keep maintaining this project?
Hey @ragehead , Just download the jar file from https://repo1.maven.org/maven2/org/apache/tika/tika-server/
Suppose you downloaded tika-server-1.24.jar and tika-server-1.24.jar.md5 in a folder tika-server.
Then just copy those two files to /tmp/ like
sudo cp tika-server/tika-server-1.24.jar /tmp/tika-server.jar and
sudo cp tika-server/tika-server-1.24.jar.md5 /tmp/tika-server.jar.md5
Thanks
So some systems won't let you write to /tmp and as such it won't create the log files that tika-python needs to read for the background tika server. Recommend you make sure your system permissions allow writing to /tmp. Thanks.