Dear James,
Thank you for having written such a Python interface to Classyfire!
I submitted the unzipped file
buffer16.zip
to function call client.sdf_query(filenameBuffer, filenameOut) and an exception was raised:
1 queries submitted to ClassyFire API
0 percent complete
Traceback (most recent call last):
File "run2.py", line 93, in
client.sdf_query(filenameBuffer, filenameOut)
File "C:\Users\jmn\Documents\CNRS20\Publis\PNMRNP_STARTED\Biblio\pyclassyfire-master\pyclassyfire\client.py", line 223, in sdf_query
outfile.write(get_results(query_ids[i], return_format='sdf'))
File "C:\Users\jmn\Anaconda3\envs\rdkit3\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u03b1' in position 8847: character maps to
It looks like classification by classyfire was successful but some unicode character cannot be inserted in the resulting .sdf file.
\u03b1 is the unicode encoding for the greek letter alpha, not so uncommon in chemistry.
Could you please indicate a fix or a workaround?
Many thanks in advance.
Best regards,
Jean-Marc