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

ERROR: UndefVarError: val not defined #510

Open
schlichtanders opened this issue Nov 21, 2023 · 0 comments · May be fixed by #523
Open

ERROR: UndefVarError: val not defined #510

schlichtanders opened this issue Nov 21, 2023 · 0 comments · May be fixed by #523

Comments

@schlichtanders
Copy link

RCall reval cannot handle empty strings, but instead throws a quite surprising error.

julia> using RCall
julia> reval("# mycomment")
ERROR: UndefVarError: `val` not defined
Stacktrace:
 [1] reval_p(expr::Ptr{RCall.ExprSxp}, env::Ptr{EnvSxp})
   @ RCall ~/.julia/packages/RCall/gOwEW/src/eval.jl:126
 [2] reval(str::String, env::RObject{EnvSxp})
   @ RCall ~/.julia/packages/RCall/gOwEW/src/eval.jl:136
 [3] reval(str::String)
   @ RCall ~/.julia/packages/RCall/gOwEW/src/eval.jl:136
 [4] top-level scope
   @ REPL[7]:1

Either the error message could be improved, or, which would be my preferred option, simple return nothing in these cases.

@schlichtanders schlichtanders linked a pull request May 2, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant