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: type MD has no field args #24

Open
singularitti opened this issue Apr 26, 2023 · 2 comments
Open

ERROR: type MD has no field args #24

singularitti opened this issue Apr 26, 2023 · 2 comments

Comments

@singularitti
Copy link

singularitti commented Apr 26, 2023

I am using ReplGPT on my system and come across the following error:

using ReplGPT

ReplGPT.setAPIkey("my-key")

ChatGPT> Can you give me a quick example of exponentiating a matrix in Julia?
ERROR: type MD has no field args
Stacktrace:
  [1] getproperty
    @ ./Base.jl:37 [inlined]
  [2] get_usings!(usings::Vector{Any}, ex::Markdown.MD)
    @ REPL.IPython ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1423
  [3] out_transform(x::Any, n::Base.RefValue{Int64})
    @ REPL.IPython ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1413
  [4] (::REPL.IPython.var"#5#6"{Base.RefValue{Int64}})(ast::Any)
    @ REPL.IPython ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:1476
  [5] #invokelatest#2
    @ ./essentials.jl:816 [inlined]
  [6] invokelatest
    @ ./essentials.jl:813 [inlined]
  [7] eval_user_input(ast::Any, backend::REPL.REPLBackend, mod::Module)
    @ REPL ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:151
  [8] repl_backend_loop(backend::REPL.REPLBackend, get_module::Function)
    @ REPL ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:249
  [9] start_repl_backend(backend::REPL.REPLBackend, consumer::Any; get_module::Function)
    @ REPL ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:234
 [10] run_repl(repl::AbstractREPL, consumer::Any; backend_on_current_task::Bool, backend::Any)
    @ REPL ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:377
 [11] run_repl(repl::AbstractREPL, consumer::Any)
    @ REPL ~/.asdf/installs/julia/1.9.0-rc2/share/julia/stdlib/v1.9/REPL/src/REPL.jl:363
 [12] (::Base.var"#1019#1021"{Bool, Bool, Bool})(REPL::Module)
    @ Base ./client.jl:421
 [13] #invokelatest#2
    @ ./essentials.jl:816 [inlined]
 [14] invokelatest
    @ ./essentials.jl:813 [inlined]
 [15] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
    @ Base ./client.jl:405
 [16] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:322
 [17] _start()
    @ Base ./client.jl:522

julia> versioninfo()
Julia Version 1.9.0-rc2
Commit 72aec423c2a (2023-04-01 10:41 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, skylake-avx512)
@singularitti
Copy link
Author

singularitti commented Apr 26, 2023

It seems to be caused by Julia v1.9's IPython mode in my startup.jl. When I comment these lines, the error disappears:

using REPL
atreplinit() do repl
    if !isdefined(repl, :interface)
        repl.interface = REPL.setup_interface(repl)
    end
    REPL.ipython_mode!(repl)
end

@ThatcherC
Copy link
Owner

Ah interesting. This seems to be the same underlying issue as #9 - more than one package using atreplinit in startup.jl. I'll have to dig into how ReplMaker.jl works more I think. It would definitely be nice to allow multiple packages to get set up in startup.

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

2 participants