Code Monkey home page Code Monkey logo

Comments (6)

LaurentRDC avatar LaurentRDC commented on June 8, 2024

Hello,

I'm no expert on Julia. Would you be able to answer the following questions:

  • What error are you getting? Can you copy-paste the error?
  • What version of pandoc / pandoc-plot are you using?
  • Can you write down a simple exampel that reproduces the error, so I can test it here?

Thanks!

from pandoc-plot.

YutaroIshihama avatar YutaroIshihama commented on June 8, 2024

pandoc.exe 2.11.3.1 and pandoc-plot 1.0.0.0 (Win10 OS)

Minimum working example looks like,

using CSV, Plots # CSV package must be loaded here to read a csv file
mtx=CSV.read("foo.csv", header = false); mtx=Matrix(mtx)
plot(mtx[1:end,1], mtx[1:end,2])

assuming the content of foo.csv file below;

1,3
2,5
3,4

This complains some error that will be posted later.

from pandoc-plot.

YutaroIshihama avatar YutaroIshihama commented on June 8, 2024

The error looks like: (unless loading CSV package, this did not occur)

ERROR | Running command
ERROR |     julia.exe "C:\Users\JohnDoe\AppData\Local\Temp\pandocplot1257825860.jl"
ERROR | ended with exit code ExitFailure 1
ERROR | *******
ERROR | ERROR: error initializing stdin in uv_dup: Unknown system error 50 (Unknown system error 50 50)
ERROR |
ERROR | *******
ERROR | Running command
ERROR |     julia.exe -e "using Plots"
ERROR | ended with exit code ExitFailure 1
ERROR | *******
ERROR | ERROR: error initializing stdin in uv_dup: Unknown system error 50 (Unknown system error 50 50)
ERROR |
ERROR | *******
ERROR | Julia/Plots.jl toolkit not installed.

from pandoc-plot.

LaurentRDC avatar LaurentRDC commented on June 8, 2024

First, notice that the second issue says: Julia/Plots.jl toolkit not installed.. This probably means that the Plots package is not installed.

I think the first issue is that this is not valid Julia, and the error is not being reported by pandoc-plot correctly. If I try the code above with CSV 0.8.2:

julia> mtx=CSV.read("test.csv", header=false); mtx=Matrix(mtx)
ERROR: ArgumentError: provide a valid sink argument, like `using DataFrames; CSV.read(source, DataFrame)`

The following Markdown file works with pandoc-plot:

# Test

```{.plotsjl}
using CSV, Plots, DataFrames
mtx=CSV.File("foo.csv", header = false) |> DataFrame
plot(mtx[1:end,1], mtx[1:end,2])
```

Can you confirm to me that the Julia code works in the Julia REPL? Maybe you are using an old version of CSV?

from pandoc-plot.

YutaroIshihama avatar YutaroIshihama commented on June 8, 2024

Thanks! I realized that the reason of failure comes from multi-statements using semicolon;

mtx=CSV.read("test.csv", header=false); mtx=Matrix(mtx)

By separating this into two lines,

mtx=CSV.read("test.csv", header=false)
mtx=Matrix(mtx)

this now works.

The problem does not come from loading multiple packages in addition to Plots.jl which was my misunderstanding.

from pandoc-plot.

LaurentRDC avatar LaurentRDC commented on June 8, 2024

Great, so I will close this issue.

from pandoc-plot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.