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

Possible bug with new orgmode version? #9

Open
Adrianzo opened this issue Dec 15, 2017 · 5 comments
Open

Possible bug with new orgmode version? #9

Adrianzo opened this issue Dec 15, 2017 · 5 comments

Comments

@Adrianzo
Copy link

At the REPL:

julia> run(`echo a`)
a

There's no problem. But in emacs...

#+BEGIN_SRC julia
run(`echo a`)
#+END_SRC

Gives:

ERROR: MethodError: no method matching start(::Void)
Closest candidates are:
  start(!Matched::SimpleVector) at essentials.jl:258
  start(!Matched::Base.MethodList) at reflection.jl:560
  start(!Matched::ExponentialBackOff) at error.jl:107
  ...
Stacktrace:
 [1] #writedlm#18(::Array{Any,1}, ::Function, ::IOStream, ::Void, ::Char) at ./datafmt.jl:673
 [2] #20 at ./datafmt.jl:683 [inlined]
 [3] open(::Base.DataFmt.##20#21{Array{Any,1},Void,Char}, ::String, ::String) at ./iostream.jl:152
 [4] #writecsv#23(::Array{Any,1}, ::Function, ::String, ::Void) at ./datafmt.jl:705
 [5] writecsv(::String, ::Void) at ./datafmt.jl:705

Any ideas?

@nico202
Copy link
Contributor

nico202 commented Dec 16, 2017

a = run('echo a')
typeof(a) = Void

The problem is that ob-julia tries to format the output with writecsv, that cant work with lot of types. Void included. I think I'm forking this and trying to fix this, see #2

@Adrianzo
Copy link
Author

Thanks for the information.

I've just changed the src block header to interpret output as verbatim (:results output). This bypasses type formatting. And I think I could use :noweb to pass values from different src blocks if needed.

@mm3509
Copy link

mm3509 commented Jun 4, 2018

I have the same problem:

print("hello")
ERROR: MethodError: no method matching start(::Void)

@Adrianzo : did you push your fix?

@Adrianzo
Copy link
Author

Adrianzo commented Jun 4, 2018

There's no fix. That's why the issue is open.

You can only avoid the bug. Try adding #+PROPERTY: header-args:julia :results output to your orgmode document. Else change only the problematic src code block header variable :results output.

@mm3509
Copy link

mm3509 commented Jun 5, 2018

Thanks @Adrianzo ! The second method of adding :results output worked. The first one gave the same issue when I first ran it and now it works too.

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

3 participants