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

UndefVarError: OrgDoc not defined #19

Open
schoettl opened this issue Jan 29, 2023 · 3 comments
Open

UndefVarError: OrgDoc not defined #19

schoettl opened this issue Jan 29, 2023 · 3 comments

Comments

@schoettl
Copy link

Hi, yesterday this worked, but today:

(@v1.8) pkg> add Org.jl
   Resolving package versions...
  No Changes to `~/.julia/environments/v1.8/Project.toml`
  No Changes to `~/.julia/environments/v1.8/Manifest.toml`

(@v1.8) pkg> status
Status `~/.julia/environments/v1.8/Project.toml`
  [587fedb0] Org v0.3.3

julia> org"* head"
ERROR: LoadError: UndefVarError: @org_str not defined
in expression starting at REPL[13]:1

julia> @time parse(OrgDoc, read("org/my.org", String))
ERROR: UndefVarError: OrgDoc not defined
Stacktrace:
 [1] top-level scope
   @ ./timing.jl:262 [inlined]
 [2] top-level scope
   @ ./REPL[14]:0

Did I something wrong?

@tecosaur
Copy link
Owner

Yea, this does seem like a PEBCAK 😛, try:

pkg> add Org

julia> using Org

julia> ...

@schoettl
Copy link
Author

Yeah, thanks :p

I get some more errors, I think they happen after parsing during printing the org file. But I guess it's not enough information?

Error showing value of type OrgDoc:
ERROR: MethodError: Cannot `convert` an object of type Nothing to an object of type SubString{String}
Closest candidates are:
  convert(::Type{T}, ::T) where T<:SubString at strings/substring.jl:56
  convert(::Type{SubString{S}}, ::AbstractString) where S<:AbstractString at strings/substring.jl:54
  convert(::Type{T}, ::T) where T<:AbstractString at strings/basic.jl:231
  ...
Stacktrace:
  [1] setindex!(A::Vector{SubString{String}}, x::Nothing, i1::Int64)
    @ Base ./array.jl:966
  [2] _unsafe_copyto!(dest::Vector{SubString{String}}, doffs::Int64, src::Vector{Nothing}, soffs::Int64, n::Int64)
    @ Base ./array.jl:253
  [3] unsafe_copyto!
...

@tecosaur
Copy link
Owner

tecosaur commented Feb 3, 2023

Yea, all that tells me is that somewhere a Nothing was seen where a SubString was expected, and that had something to do with setting an index.

When sharing a stacktrace, try to look for lines with something like @ Org .julia/packages/Org/1t15S/src/parse/interpret.jl:123.

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