3

I am currently working on a Django project that necessitates the functionality of taking an InChI string and converting it into a molecule, but the package that I'm using seems to have an issue with its function MolFromInchi. Whenever I try to use this function, python tends to generate this traceback:

Ex.

>>> from rdkit.Chem.inchi import MolFromInchi
>>> mol = MolFromInchi('InChI=1S/O2Si/c1-3-2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\tcherry\repos\dataslate_django\venv\my-rdkit-env\lib\site-packages\rdkit\Chem\inchi.py", line 71, in MolFromInchi
    mol, retcode, message, log = rdinchi.InchiToMol(inchi, sanitize, removeHs)
TypeError: No to_python (by-value) converter found for C++ type: class boost::shared_ptr<class RDKit::ROMol>

This error seems to be derived from the source code of the rdkit package, but I was wondering if there's anything that I can do to circumvent or mitigate this issue while still being able to incorporate the functionality of MolFromInchi into my project.

NOTE: I was able to reproduce this error after following the instructions on how to install RDKit with Conda posted on the RDKit Documentation, and this question pertains to the most current version of RDKit (2020.03.1).

King Burst
  • 71
  • 4
  • 1
    `2020.09.3?` The latest versions are `2019.09.1` and `2020.03.1` and in both `MolFromInchi` works for me. RDKit installed with conda on windows. – rapelpy Apr 10 '20 at 06:21
  • I mixed up the versioning. The question has been edited to be more accurate. – King Burst Apr 10 '20 at 15:07

1 Answers1

0

It turns out that the reason I came across that issue is because whenever you make changes to the source code (which I've done to address a different issue with my project), those changes influence the .conda cache folder, meaning that if you were to ever uninstall and reinstall a conda package, the installation process would refer to the cache folder.

King Burst
  • 71
  • 4