# TOML parsing error

**URL:** <https://discourse.julialang.org/t/toml-parsing-error/116891>\
**Category:** General Usage\
**Created:** [July 11, 2024, 6:51am UTC](https://discourse.julialang.org/t/toml-parsing-error/116891 "2024-07-11T06:51:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JianghuiDu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jianghuidu/32/8028_2.png) [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Post date:** [July 11, 2024, 6:51am UTC](https://discourse.julialang.org/t/toml-parsing-error/116891/1 "2024-07-11T06:51:52Z")

</div>

My julia keeps running into unknow problems and get killed when I install packages. And when I restart I always got error messages like this:

```julia
(@v1.9) pkg> up
ERROR: TOML Parser error:
C:\Users\pkudu\.julia\logs\manifest_usage.toml:1:1 error: invalid bare key character: '\0'
  ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
  ^                                                                                                                     

Stacktrace:
  [1] parse
    @ .\toml_parser.jl:445 [inlined]
  [2] parsefile(f::String)
    @ TOML C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\TOML\src\TOML.jl:43
  [3] (::Pkg.Types.var"#51#54"{String, String, Dates.DateTime, String})()
    @ Pkg.Types C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\Types.jl:513
  [4] mkpidlock(f::Pkg.Types.var"#51#54"{String, String, Dates.DateTime, String}, at::String, pid::Int32; kwopts::Base.Pairs{Symbol, Int64, Tuple{Symbol}, NamedTuple{(:stale_age,), Tuple{Int64}}})
    @ FileWatching.Pidfile C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\FileWatching\src\pidfile.jl:82
  [5] mkpidlock
    @ C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\FileWatching\src\pidfile.jl:79 [inlined]
  [6] #mkpidlock#6
    @ C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\FileWatching\src\pidfile.jl:77 [inlined]
  [7] mkpidlock
    @ C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\FileWatching\src\pidfile.jl:77 [inlined]
  [8] write_env_usage(source_file::String, usage_filepath::String)
    @ Pkg.Types C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\Types.jl:511
  [9] Pkg.Types.EnvCache(env::Nothing)
    @ Pkg.Types C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\Types.jl:366
 [10] EnvCache
    @ C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\Types.jl:345 [inlined]
 [11] Context
    @ .\util.jl:567 [inlined]
 [12] up(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\API.jl:147
 [13] up(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\API.jl:145
 [14] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\REPLMode\REPLMode.jl:412
 [15] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\REPLMode\REPLMode.jl:390
 [16] do_cmd
    @ C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\REPLMode\REPLMode.jl:380 [inlined]
 [17] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\Pkg\src\REPLMode\REPLMode.jl:557
 [18] #invokelatest#2
    @ .\essentials.jl:819 [inlined]
 [19] invokelatest
    @ .\essentials.jl:816 [inlined]
 [20] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\REPL\src\LineEdit.jl:2647
 [21] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\Users\pkudu\AppData\Local\Programs\Julia-1.9.4\share\julia\stdlib\v1.9\REPL\src\REPL.jl:1300
 [22] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:514

```

My julia version:

```julia
Julia Version 1.9.4
Commit 8e5136fa29 (2023-11-14 08:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 32 × Intel(R) Core(TM) i9-14900KS
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, goldmont)
  Threads: 1 on 32 virtual cores

```

What is the issue here?

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [July 11, 2024, 9:24pm UTC](https://discourse.julialang.org/t/toml-parsing-error/116891/2 "2024-07-11T21:24:40Z")

</div>

> [@JianghuiDu](#):
>
> `C:\Users\pkudu\.julia\logs\manifest_usage.toml`

This file seems corrupt. Try renaming/deleting it. I don’t think it contained anything very valuable.  
This problem might hint a a deeper problem in you system though. Did you experience a hard crash (like BSOD, sudden power outage or so)? Otherwise this might be the drive failing. It’s probably worth an investigation. Check maybe the Windows event log for messages.

---

<div class="post-metadata">

**Author:** ![JianghuiDu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jianghuidu/32/8028_2.png) [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Post date:** [July 12, 2024, 5:29am UTC](https://discourse.julialang.org/t/toml-parsing-error/116891/3 "2024-07-12T05:29:36Z")

</div>

Thanks! This happens repeatedly and yes sometimes my windows get killed (blue screen). I have tried to delete it before but the problem keeps coming back. Do you know where to start investigate?

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [July 12, 2024, 5:46am UTC](https://discourse.julialang.org/t/toml-parsing-error/116891/4 "2024-07-12T05:46:26Z")

</div>

Some ideas:

- Start by checking the windows event log for warning/errors (e.g. [short tutorial](http://support.cybersecure.com/?p=1561))
- You can also check your drives’ health using something like CrystalDiskInfo
- Next time you get a bluescreen (BSOD) try to take a photo of the error and google that. That can give hints on what component is failing you.
- You can stress test various components, e.g. by benchmarking, and see whether this leads to BSOD. I think I would start with RAM (there is [Windows tool for that](https://www.howtogeek.com/260813/how-to-test-your-computers-ram-for-problems/#option-1-run-the-windows-memory-diagnostic)), but stresstesting the CPU (with e.g. Prime95) and GPU (e.g. FurMark) could also be interesting.

Typically drives are the most likely component to fail (imo). So I’d start there. Especially if you have an older SSD in your system.

---

<div class="post-metadata">

**Author:** ![JianghuiDu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jianghuidu/32/8028_2.png) [@JianghuiDu](https://discourse.julialang.org/u/JianghuiDu)\
**Post date:** [July 14, 2024, 8:48am UTC](https://discourse.julialang.org/t/toml-parsing-error/116891/5 "2024-07-14T08:48:21Z")

</div>

Updated the SSD driver and the problem seems to have disappeared. Thanks!
