-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDKit 2021.09 compatibility #21
Comments
@adam-of-barot the problem sounds like could be related to a mismatching RDKit version (for example trying to unpickle a molecule with an older RDKit version), but I have the impression I am missing some information. Where did you update RDKit, in the django application environment, on the postgres server, or on both? And (sorry in case it should be obvious) with frontend and backend, what are you more exactly referring to, in this context? A more detailed description of the query you are performing I think would be also helpful to me. |
@rvianello I updated RDKit in the conda environment that the Django application uses. I did not upgrade anything related to the cartridge. Running the SQL command By frontend I meant that I tried performing the searches through a browser with the web pages that I've built, and by backend I meant performing the searches through the command line with Here is a query that just tried to run through the aforementioned shell as a test: In [1]: from app.models import ReagentStructure
In [2]: r = ReagentStructure.objects.last()
In [3]: print(r.molecule, r.smiles)
Out[3]: <rdkit.Chem.rdchem.Mol object at 0x00000212855768B0> NNC(=O)OCc1ccccc1
In [4]: ReagentStructure.objects.filter(molecule=r.smiles) # search for an already existing molecule
Out[4]: ---------------------------------------------------------------------------
DataException Traceback (most recent call last)
~\Miniconda3\envs\app\lib\site-packages\django\db\backends\utils.py in _execute(self, sql, params, *ignored_wrapper_args)
83 else:
---> 84 return self.cursor.execute(sql, params)
85
DataException: problem generating molecule from blob data I also attached the full traceback here: traceback.txt |
Thank you for the additional details. I browsed the rdkit repository for some information, and I think version 0.73.0 refers to the 2018.03 RDKit release, implying that the postgres database is running on a version of RDKit that is now quite older than the one available to the django application. |
I did some testing on my home linux system to check things with the out-of-date and up-to-date versions. I tried out a fresh conda environment installation of RDKit (v2021.09.03), django-rdkit (v0.3.1), and in another fresh conda environment installed rdkit-postgresql (v2021.09.02) and made the necessary database setups.
I then made another environment, this time having rdkit-postgresql v2018.03.03. After setting up the database the same way, running the same query above gave the "problem generating molecule from blob data" error. So yeah, the problem is definitely the out-of-date RDKit version on the database side. Thank you for looking into it @rvianello ! |
Upon updating to RDKit 2021.09.02 from 2021.03.05 I can no longer perform structure based lookups.
I tried performing .filter() queries both from the frontend and the backend, but both resulted in the same error.
The cartridge itself still works, as I was able to do smiles based raw SQL queries.
Django gives the following error:
"DataError: problem generating molecule from blob data"
The top level traceback:
For the time being I reverted back to RDKit 2021.03.05.
The text was updated successfully, but these errors were encountered: