'i'm working with RDkit and want to calculate descriptors,but an ArgumentErro occurs and I can't deal with.Please help me

import pandas as pd
import numpy as np
from rdkit import DataStructs
from rdkit import Chem
from rdkit import DataStructs
from rdkit.Chem import Descriptors
from rdkit.Chem import PandasTools
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from utility import FeatureGenerator
data = pd.read_csv('E:/RDkit/Nitro aromatic.csv')
PandasTools.AddMoleculeColumnToFrame(data,'SMILES','mol',includeFingerprints=True)
data.head()
data['mol'] = data.SMILES.apply(Chem.MolFromSmiles)
data.head()
data.loc[:,'MolLogP'] = data['mol'].apply(Descriptors.MolLogP)

This is the error:

ArgumentError: Python argument types in rdkit.Chem.rdMolDescriptors.CalcCrippenDescriptors(NoneType) did not match C++ signature: CalcCrippenDescriptors(class RDKit::ROMol mol, bool includeHs=True, bool force=False) Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source