-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hangs on some invalid SMILES inputs with hanging open parenthesis #60
Comments
Thank you for this bug report, we will fix it in a new version thats comming out very soon! No reason to say sorry -- we say thanks. A program should never loop infinitly, so please continue try to break our codes :-) |
Hi @supersciencegrl, In import selfies as sf
sf.encoder("cc(") now raises a
Thanks for the bug report! |
I haven't looked into it, but when testing whether invalid SMILES would work properly (expected to return None), I tried this:
which caused the program to hang and CPU usage to go really high.
When I did a KeyboardInterrupt, this is where it got stuck:
This was reproducible, and also happened for 'co(', 'cccc(', 'cccc(1', 'cccccc(', '('. Any other value of
smiles
(valid or invalid!) I've tried so far has worked as expected, including the strings 'c(', 'ccc(', 'ccccc(', 'cccc)', 'cccc(c'.'ccc(c' did actually return a valid SELFIE for butadiene, which seems reasonable. Interestingly, ')' returned only '' (empty string rather than None).
Sorry for semi-deliberately breaking your awesome program :D
The text was updated successfully, but these errors were encountered: