Closed agiokas-dbg closed 4 years ago
are you getting the same issue with older versions, e.g. TIKA_VERSION=1.22
?
Hi @mathiashoeld I just tried it with version 1.22 and I am getting the same issue. Should I try with an even older version? What annoys me is that my colleague is running it in docker with 1.23 using the same code, and it works fine.
If you are in a local checkout of tika-python when running it, you will get module import errors. Try cd'ing out of the Git checkout (if you are running this from that dir) and see if that fixes it @agiokas-dbg
Was this issue ever resolved? I am still having this issue if installing with pip
I never managed to solve this.
On Wed, 6 May 2020 at 17:18, aabid notifications@github.com wrote:
Was this issue ever resolved? I am still having this issue if installing with pip
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chrismattmann/tika-python/issues/277#issuecomment-624746705, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANBMA5LU4RSWMDUR42Q6ARTRQGEWHANCNFSM4KHGB2TQ .
@aabid0193 @agiokas-dbg can you find your $PYTHON site-packages directory and then rm -rf tika* out of there? Try it on a fully fresh Python install. the .initVM() is likely related to the parser module not found. For whatever reason your tika library isn't being loaded or installed correctly.
FWIW, .initVM is no longer needed and only left in for back compat.
I've followed the installation instructions, using pip in a virtual environment:
python3 -m venv venv
source venv/bin/activate
pip install tika
wget -O /tmp/tika-server.jar http://search.maven.org/remotecontent?filepath=org/apache/tika/tika-server/1.23/tika-server-1.23.jar
wget -O /tmp/tika-server.jar.md5 http://search.maven.org/remotecontent?filepath=org/apache/tika/tika-server/1.23/tika-server-1.23.jar.md5
And then setup the environment variables:
I've also tried to add the jar in the current working directory and use this instead:
When using the example script:
I get
module 'tika' has no attribute 'initVM'
and when I remove thetika.initVM()
I getImportError: cannot import name 'parser'
.