JuliaAcademy / JuliaTutorials

Learn Julia via interactive tutorials!
https://julialang.org/learning/
MIT License
1.26k stars 657 forks source link

Error when using eval(parse(ans)) #50

Closed sbacelar closed 4 years ago

sbacelar commented 5 years ago

When I use eval(parse(ans)) in JuliaBox or Juno I get:

MethodError: no method matching parse(::Int64)
Closest candidates are:
  parse(!Matched::Type{LibGit2.GitCredential}, !Matched::AbstractString) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LibGit2/src/gitcredential.jl:73
  parse(!Matched::Type{LibGit2.GitCredentialHelper}, !Matched::AbstractString) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/LibGit2/src/gitcredential.jl:163
  parse(!Matched::Type{Sockets.IPv4}, !Matched::AbstractString) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Sockets/src/IPAddr.jl:166
  ...

Stacktrace:
 [1] top-level scope at In[4]:1
sbacelar commented 5 years ago

OK, I found that eval(Meta.parse(ans)) works.

xorJane commented 5 years ago

Glad you were able to resolve your issue!

On Sun, Jun 30, 2019 at 11:37 AM Sérgio Bacelar notifications@github.com wrote:

OK, I found that eval(Meta.parse(ans)) works.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JuliaComputing/JuliaBoxTutorials/issues/50?email_source=notifications&email_token=ACRRSZ6IDF2WV3QC4UMPB33P5D4QPA5CNFSM4H4NEJPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODY4RLCQ#issuecomment-507057546, or mute the thread https://github.com/notifications/unsubscribe-auth/ACRRSZ2AF54U6AQI4WZTGA3P5D4QPANCNFSM4H4NEJPA .