Skip to content
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

get_cid(name = x) errors for x = "Ethylformate", but works for x = "Ethyl formate" #23

Open
thomvet opened this issue Jan 17, 2025 · 0 comments

Comments

@thomvet
Copy link

thomvet commented Jan 17, 2025

I am wondering whether something like this is fixable for convenience reasons?

Reproducer:

using PubChemCrawler
ans1 = get_cid(name = "Ethyl formate")
ans2 = get_cid(name = "Ethylformate")

Stacktrace:

ERROR: ArgumentError: extra characters after whitespace in "104745\n1032"
Stacktrace:
 [1] tryparse_internal(::Type{Int64}, s::SubString{String}, startpos::Int64, endpos::Int64, base_::Int64, raise::Bool)
   @ Base .\parse.jl:178
 [2] parse(::Type{Int64}, s::SubString{String}; base::Nothing)
   @ Base .\parse.jl:254
 [3] parse(::Type{Int64}, s::SubString{String})
   @ Base .\parse.jl:253
 [4] get_cid(; name::String, smiles::Nothing, kwargs::@Kwargs{})
   @ PubChemCrawler C:\Users\thvt\.julia\packages\PubChemCrawler\3RakX\src\query.jl:16
 [5] top-level scope
   @ REPL[19]:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant