Hi Andy,
for that to work with Python 3 you will need to replace sys.stdin with
sys.stdin.buffer.
HTH, cheers
Paolo
On 03/27/19 18:32, Andy wrote:
Hi,
I have used the git version of rdkit for years (local build with
python 2.7). The last update pushed me to use python3, and, in
addition to the usual fixes, I noticed that ForwardSDMolSupplier does
not work with sys.stdin anymore, i.e., the usual construct
fin = Chem.ForwardSDMolSupplier(sys.stdin)
for mol in fin:
gives
[11:59:54] Unexpected error hit on line 1
[11:59:54] ERROR: moving to the begining of the next molecule
TypeError: expected bytes, str found
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "test.py", line 7, in <module>
for mol in fin:
SystemError: <Boost.Python.function object at 0x5605d65e0ac0> returned
a result with an error set
The pre-built conda package
(linux-64/rdkit-2018.09.2.0-py37hc20afe1_1.tar.bz2) shows the same
behavior. I am using 64-bit Linux (Arch) system.
Thanks,
--Andy
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss