Closed walter-hernandez closed 4 years ago
Same here.
File "tika\parser.py", line 40, in from_file
output = parse1(service, filename, serverEndpoint, headers=headers, config_path=config_path, requestOptions=requestOptions)
File "tika\tika.py", line 338, in parse1
rawResponse=rawResponse, requestOptions=requestOptions)
File "tika\tika.py", line 531, in callServer
serverEndpoint = checkTikaServer(scheme, serverHost, port, tikaServerJar, classpath, config_path)
File "tika\tika.py", line 598, in checkTikaServer
status = startServer(jarPath, TikaJava, TikaJavaArgs, serverHost, port, classpath, config_path)
File "tika\tika.py", line 669, in startServer
TikaServerProcess = Popen(cmd_string, stdout=logFile, stderr=STDOUT, shell=True, preexec_fn=os.setsid)
AttributeError: module 'os' has no attribute 'setsid'
should be fixed when I release 1.23.2 this week.
can you test out the latest from master and report back @walter-hernandez ?
Just FYI, it worked for me. Using PyCharm 2019 Professional. Thanks for the quick fix.
@chrismattmann It is working! Thank you so much for fixing it!
I am going to close this issue. Thank you again @chrismattmann
awesome thanks I'll update this and publish the new version this week. thanks @walter-hernandez ! if you are able and your company sees value in Tika Python, consider my Github Sponsors page.
Hi, Chris! we are student working on a project with tika-python. Our instructor asked us to download version 1.9 yet I am still running the problem with os.setsid no attribute error. I am trying to figure out how to resolve this, should we still try to downgrade to version 1.23 for bypassing this issue?
Thank you so much and regards,
Hello all:
I got the following error:
TikaServerProcess = Popen(cmd_string, stdout=logFile, stderr=STDOUT, shell=True, preexec_fn=os.setsid) AttributeError: module 'os' has no attribute 'setsid'
This is because os.setsid is only available in Unix based os. In the meantime that the issue is solved, you can run the server independently using the docker image:
docker pull apache/tika
and running:
docker run -d -p 9998:9998 apache/tika:<version>
which for version 1.23 is:
docker run -d -p 9998:9998 apache/tika:1.23
to use it with the python library:
parsed = parser.from_file('/tmp/pdf-sample.pdf', 'http://localhost:9998/tika')