CSV package works in terminal but not in VSCode

Hello! The following code produces a `TaskFailedException

nested task error: MethodError: Cannot `convert` an object of type Missing to an object of type String`
using CSV,DataFrames
formal_orgs = DataFrame(CSV.File("somecsvfile.csv"))

I recall there being some issues around a parser and some workaround whereby one can artificially downgrade a package. Unfortunately, I cannot find that thread anymore.

What confuses me is that running the Julia 1.10 kernel inside VSCode produced this error but when I fire up Julia from the terminal, it works fine, with the CSV being read. I remember applying this parser type of patch a while ago but thought this would go away with Julia’s new version (10) and cannot understand why command line Julia is fine while VSCode Julia throws this error. Both executables are the same and package versions are the same, too.

Thank you so much!

The package version is:

~/.julia/environments/v1.10/Project.toml`
  [336ed68f] CSV v0.10.12

VSCode starts a Julia process with multiple tasks by default, while the terminal doesn’t. The error you see is probably CSV chunking the work, inferring a column as String because there’s no missing data and then encountering missing data in another chunk.

I’m on my phone so this is all conjecture but you can check by stating Julia as julia --threads=auto in the terminal or setting the ntasks kwarg in CSV File to 1.

Thank you, that indeed is the right answer. When I forced VSCode’s Julia to have ntask=1, it worked just fine as did specifying what counts as a missing value. Thank you!