I have been trying to figure out this error on python using PubChemPy but I'm stuck. I am trying to input a list of chemicals and gen the Canonical Smiles information for a list of about 200 chemicals. This is the code I am using
for i in List_of_Chemicals['Chemical name']:
prop = pcp.get_properties(['CanonicalSMILES'])
any help would be appreciated
2nd edit: This code goes from a list of names to getting the cid and then the property:
get_properties needs cid as a required argument. You cannot pass in chemical names. So you need an intermediate step to get a list of identifiers corresponding to the names with pcp.get_cids, which I've done in the code above.