Simple things surprisingly broken

Days ago everything was working beautifully and fast with 1.9.

Now, I have mysterious breakage that I can’t figure out.

I have installed 1.9.1 and I have installed the package LazyTables. The latter should make no difference by itself.

I have a package on my local machine: it is more of what S. Karpinski would call an “application”: a bunch of code in multiple files that does a job and is not meant as infrastructure for others to build on. I had to add the LazyTables dependency to its project.toml which I did manually.

But, it reports an error about a file I am trying to load. I changed the location for the file 2 weeks ago and changed the code to load it. It used to work, but not now.

The stack trace in the error messages use completely wrong line numbers. It’s almost as if the wrong version of the package is being run. I have rm’ed the package and re-added it.

Also, Revise seems like it doesn’t operate. I put some println’s in the code to see where things were breaking down. The println statements never run.

There is more weirdness. When I load a Jupyter notebook in jupyterlab and do using , it goes through a lengthy compilation process. When I use the package in the Julia repl, it loads instantly and is ready to go. This is what makes me thing that somehow I have 2 Julia environments, but I don’t know how that could have occurred.

Short of reinstalling Julia and all the packages I am at a bit of a loss.

This error message won’t help much because it is specific to my code, but nothing I’ve done changes this message. It’s as though my Julia instance is in its own world and not using what it finds on my machine. In fact, that compilation fails with the message that I am missing a dependency, but when I look at my environment and the project.toml for the my package, the dependency is there.

[ Info: Precompiling CovidSim_ilm [c70e2dfc-8e06-4fce-bc57-ad774aa1cb0a]
ERROR: LoadError: ArgumentError: Package CovidSim_ilm does not have TypedTables in its dependencies:
- You may have a partially installed environment. Try `Pkg.instantiate()`
  to ensure all packages in the environment are installed.
- Or, if you have CovidSim_ilm checked out for development and have
  added TypedTables as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with CovidSim_ilm

Here is the error message from running the package in the Julia repl. Line numbers are wrong, println statements don’t run, and the code that properly creates a path to the file doesn’t run:

ERROR: ArgumentError: "geo2data.csv" is not a valid file or doesn't exist
 [1] CSV.Context(source::CSV.Arg, header::CSV.Arg, normalizenames::CSV.Arg, datarow::CSV.Arg, skipto::CSV.Arg, footerskip::CSV.Arg, transpose::CSV.Arg, comment::CSV.Arg, ignoreemptyrows::CSV.Arg, ignoreemptylines::CSV.Arg, select::CSV.Arg, drop::CSV.Arg, limit::CSV.Arg, buffer_in_memory::CSV.Arg, threaded::CSV.Arg, ntasks::CSV.Arg, tasks::CSV.Arg, rows_to_check::CSV.Arg, lines_to_check::CSV.Arg, missingstrings::CSV.Arg, missingstring::CSV.Arg, delim::CSV.Arg, ignorerepeated::CSV.Arg, quoted::CSV.Arg, quotechar::CSV.Arg, openquotechar::CSV.Arg, closequotechar::CSV.Arg, escapechar::CSV.Arg, dateformat::CSV.Arg, dateformats::CSV.Arg, decimal::CSV.Arg, groupmark::CSV.Arg, truestrings::CSV.Arg, falsestrings::CSV.Arg, stripwhitespace::CSV.Arg, type::CSV.Arg, types::CSV.Arg, typemap::CSV.Arg, pool::CSV.Arg, downcast::CSV.Arg, lazystrings::CSV.Arg, stringtype::CSV.Arg, strict::CSV.Arg, silencewarnings::CSV.Arg, maxwarnings::CSV.Arg, debug::CSV.Arg, parsingdebug::CSV.Arg, validate::CSV.Arg, streaming::CSV.Arg)
   @ CSV ~/.julia/packages/CSV/OnldF/src/context.jl:314
 [2] #File#32
   @ ~/.julia/packages/CSV/OnldF/src/file.jl:222 [inlined]
 [3] CSV.File(source::String)
   @ CSV ~/.julia/packages/CSV/OnldF/src/file.jl:162
 [4] buildgeodata(filename::String)
   @ CovidSim_ilm ~/.julia/packages/CovidSim_ilm/78kQ7/src/setup.jl:265
 [5] setup(ndays::Int64, locales::Vector{Int64}; day1::Date, dovax::Bool, paramdir::String, geofilename::String, socialfilename::String, vaccinefilename::String, scheddir::String, variantfilename::String)
   @ CovidSim_ilm ~/.julia/packages/CovidSim_ilm/78kQ7/src/setup.jl:18
 [6] setup
   @ ~/.julia/packages/CovidSim_ilm/78kQ7/src/setup.jl:6 [inlined]
 [7] #buildsim#198
   @ ~/.julia/packages/CovidSim_ilm/78kQ7/src/sim.jl:19 [inlined]
 [8] top-level scope
   @ REPL[7]:1

I realize this is a complex jumble but I don’t really know how to diagnose. I have never seen anything like it in 6 years of using Julia.

I deleted everything. Reinstalled everything. All is working as it should. Not clear what broke and no obvious way to diagnose it.

In the process of re-installing Julia and adding packages, I made no change at all to the code of my package.

Everything is working as it was before.

Good to hear! Did it take a long time?

I usually blame cosmic rays for causing unexplained computer issues. Or my cat. :smiley_cat:

1 Like