Skip to content
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.

Issue in using molminer #2

Open
raviteja-python259 opened this issue Dec 3, 2018 · 3 comments
Open

Issue in using molminer #2

raviteja-python259 opened this issue Dec 3, 2018 · 3 comments
Labels

Comments

@raviteja-python259
Copy link

Hey there, When i try to use molminer, i get the following error and Im not sure of it. I have a single pdf file which i wanted to run with ocsr to extract the molecular structure from the pdf.
can some one help me out.

**Cannot perform annotation in ChemSpider: 'chemspider_token' is empty.
Traceback (most recent call last):
File "/home/nx2236/anaconda3/envs/my_new_env/bin/molminer", line 11, in
load_entry_point('MolMiner==1.0.0', 'console_scripts', 'molminer')()
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/molminer/cli.py", line 381, in ocsr
result = osra.process(output_formats=["smiles", "inchi", "inchikey"], process_kwargs)
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/molminer/OSRA.py", line 435, in process
stdout, stderr, exit_code = pdf_to_images(input_file, temp_dir, dpi=gm_dpi, trim=gm_trim)
File "/home/nx2236/anaconda3/envs/my_new_env/lib/python3.5/site-packages/molminer/utils.py", line 257, in pdf_to_images
raise RuntimeError("Error when converting PDF to PNG images. Stderr: {}".format(stderr))
RuntimeError: Error when converting PDF to PNG images. Stderr: /home/nx2236/anaconda3/envs/my_new_env/bin/gm.bin: /home/nx2236/anaconda3/envs/my_new_env/lib/molminer/../libtiff.so.5: no version information available (required by /home/nx2236/anaconda3/envs/my_new_env/lib/molminer/libGraphicsMagick.so.3)
/home/nx2236/anaconda3/envs/my_new_env/bin/gm: line 6: 4341 Illegal instruction (core dumped) LD_LIBRARY_PATH=realpath $DIR/../lib/molminer $DIR/gm.bin ${@:1}

@gorgitko
Copy link
Owner

gorgitko commented Dec 17, 2018

Hello,

there is probably some problem with libtiff or GraphicsMagick.

Can you run in your molminer virtual environment: $ gm convert -density 300 <pdf_file.pdf> +adjoin -trim -quality 100 output-%d.png

Alternatively, if you want only OCSR, you can run OSRA directly from your molminer virtual environment.

@raviteja-python259
Copy link
Author

Hey @gorgitko thanks for the response and that worked and i am looking only for OCSR, but when i do run OSRA directly from molminer virtual environment i get the following error. Can you help?

/anaconda3/envs/my_new_env/bin/osra.bin: /home/anaconda3/envs/my_new_env/lib/molminer/../libtiff.so.5: no version information available (required by /home/nx2236/anaconda3/envs/my_new_env/lib/molminer/libGraphicsMagick.so.3)
/home/anaconda3/envs/my_new_env/bin/osra.bin: /home/anaconda3/envs/my_new_env/lib/molminer/../libtiff.so.5: no version information available (required by /home/nx2236/anaconda3/envs/my_new_env/lib/molminer/liblept.so.5)
/home/anaconda3/envs/my_new_env/bin/osra: line 6: 13039 Illegal instruction (core dumped) LD_LIBRARY_PATH=realpath $DIR/../lib/molminer $DIR/osra.bin ${@:1}

@gorgitko
Copy link
Owner

OK, so there is probably a conflicting version of libtiff which is installed as a dependency of some package which molminer depends on. OSRA is compiled against libtiff which is packaged with molminer.

As a temporary solution, run this in your molminer venv: $ conda uninstall libtiff --force

It works for me and I hope it will also work for you. Unfortunately, molminer is not my priority anymore, but I hope I will find some time to fix this issue directly in the conda recipe.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants