Pkg.TOML.ParserError

Hi,

I’ve been using Julia without issue for 6+ months. A few weeks ago I turned my computer in for a SSD upgrade, resulting in a fresh install of Win10 (and therefore Julia). I am now seeing Pkg.TOML.ParserErrors.

After installing Julia, I add some packages and everything appears OK until I try adding or updating packages, say a day later.

I’ve looked at this post and gc also fails with a similar error.

When I look into the files in ~/.julia/packages it appears that they are getting corrupted at the end of the file. (I have a copy of my ~/.julia folder just after the fresh install and adding some packages and those files are not corrupt.)

For example, the end of DataFrames.jl is:

...
include("other/precompile.jl")
precompile()
end # module DataFrame�

And if I look at one of the Artifacts.toml files that gc fails on, I see similar corruption, e.g.
~/.julia/packages/Libiconv_jll/bLsPg/Artifacts.toml

...
[[Libiconv]]
arch = "x86_64"
git-tree-sha1 = "be77f99c5f7180aac08dd6747287e0fab5a516c2"
os = "windows"

    [[Libiconv.download]]
    sha256 = "e2a702f56b98f5374668b11a33eb653e53063dacd0af085fcd5bfcce58f6fd53"
    url = "https://github.com/JuliaBinaryWrappers/Libiconv_jll.jl/releases/download/Libiconv-v1.16.0+5/Libiconv.v1.16.0.x86_64-w64-mingw�u�����-{

I’m not seeing problems with other software (AFAIK) since the SSD upgrade, and I’ve seen this behavior in Julia on both versions 1.5.3 and 1.5.4. Any ideas what might be wrong or where to look next?

Thanks,

Dave

Maybe @StefanKarpinski can help here.

Almost feels like your hard drive is broken.

1 Like

That was my first thought too … or something about the drive encryption I have to use. But the previous drive was also encrypted, and I’m not experiencing errors with other software now that I have the new drive. Anyway, since I don’t have enough experience with Julia to figure it out further I thought I ask here :confused:

The only similar issue I have seen is https://github.com/JuliaLang/Pkg.jl/issues/795 but that was fixed a long time ago (https://github.com/JuliaLang/julia/pull/30989). Maybe there is some “hard drive health check” software you could run? The only thing Pkg does is to download a tarball and then extracts it. If that leaves the file corrupted, something quite bad is going on.

1 Like

Yes, I think the files download and extract OK. I made a complete copy of my .julia folder right after installation and the same files that are corrupt in .julia are (still) OK in .julia_copy. It’s only when doing a Pkg.update() or Pkg.add() some time afterwards that I first see the error.