Get `ERROR: julia: -t,--threads=<n>[,auto|<m>]; n must be an integer >= 1` when running test

Not sure what to do here. I have a laptop I haven’t really worked much on for like 6 months. Running Julia on it has been fine. However, now I tried to run the tests of a package that I develop. I activate the environment and do

] test

And I get this

ERROR: julia: -t,--threads=<n>[,auto|<m>]; n must be an integer >= 1

as output.

Just running Julia as normal does not yield any problem. This happens when I run on master (so nothing I have added to the package, this just to work on my desktop). I have tried restarting the computer and it was fine.

This is on Julai 1.11.5 and Ubuntu 22.04

Does that mean your issue goes away after rebooting?


In any case, this sounds to me like you have (the package has) a settings/preferences file/variable somewhere setting the number of threads incorrectly. Perhaps in an older version of Julia you could use -t 0 for what’s now -t auto?

I had this error, too, after upgrading to v1.11.5 using juliaup. I use vs code on windows. Number of threads was reported as (blank). To fix, I had to manually set the number of threads myself. Then it went back to normal. .

@Torkel Are you also using VS Code?

Yes, I was in VSCode. Thanks for the help, I changed to

    "julia.NumThreads": 2

(no idea what is best really)
and the tests can run now