1

I tried to run the code

pcp.get_compounds('CC', searchtype='superstructure', listkey_count=3)

but, it didn't work.

This code is exactly the same as one shown in the documentation ("https://pubchempy.readthedocs.io/en/latest/guide/searching.html#advanced-search-types").

Another code such as pcp.get_compounds('Aspirin', 'name', record_type='3d') which is shown in the same page worked.

Please give me some advice about how to fix this error.

Progman
  • 16,827
  • 6
  • 33
  • 48
hiro
  • 87
  • 4

1 Answers1

0

It appears that the example in the PubChemPy advanced search documentation is missing a parameter. The example does not identify how to search, i.e., by SMILES. Substituting the following statement for the one in the example should give you the desired result.

pcp.get_compounds('CC', 'smiles', searchtype='superstructure', listkey_count=3)
BalooRM
  • 434
  • 1
  • 6
  • 15