JuliaIO / JLD2.jl

HDF5-compatible file format in pure Julia
Other
547 stars 85 forks source link

issue under Julia v1.8.3 #440

Closed StefanPofahl closed 1 year ago

StefanPofahl commented 1 year ago

Here is my Julia Version:

Julia Version 1.8.3
Commit 0434deb161 (2022-11-14 20:14 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 8 virtual cores

the package status is:

 pkg> st JLD2
Status `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
⌃ [033835bb] JLD2 v0.4.3
Info Packages marked with ⌃ have new versions available and may be upgradable.

Now my short test:

using JLD2
a_vec = [1,2,3]
JLD2.jldsave("filename.jld", true; a_vec)

the response is:

ERROR: UndefVarError: jldsave not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base .\Base.jl:31
 [2] top-level scope
   @ REPL[4]:1
JonasIsensee commented 1 year ago

Hi @StefanPofahl, the latest release is v0.4.28 which means your version is from before jldsave was implemented. Please try to do a package update.

StefanPofahl commented 1 year ago

remove and add is not sufficient ...

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.8.3 (2022-11-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.8) pkg> rm JLD2
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
  [033835bb] - JLD2 v0.4.3
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Manifest.toml`
  [033835bb] - JLD2 v0.4.3

(@v1.8) pkg> add JLD2
    Updating registry at `C:\Users\stefanpofahl\.julia\registries\General.toml`
   Resolving package versions...
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
⌃ [033835bb] + JLD2 v0.4.3
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Manifest.toml`
⌃ [033835bb] + JLD2 v0.4.3
        Info Packages marked with ⌃ have new versions available and may be upgradable.

(@v1.8) pkg>
JonasIsensee commented 1 year ago

In that case you probably have other packages installed or specific version requirements for dependencies of JLD2.

I recommend checking for FileIO.jl

StefanPofahl commented 1 year ago
(@v1.8) pkg> st FileIO
Status `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
  [5789e2e9] FileIO v1.16.0

I have removed both packages and have re-installed JLD2:

(@v1.8) pkg> rm FileIO
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
  [5789e2e9] - FileIO v1.16.0
  No Changes to `C:\Users\stefanpofahl\.julia\environments\v1.8\Manifest.toml`
[ Info: We haven't cleaned this depot up for a bit, running Pkg.gc()...
      Active manifest files: 7 found
      Active artifact files: 133 found
      Active scratchspaces: 18 found
     Deleted 62 package installations (123.706 MiB)
     Deleted 1 artifact installation (33.115 MiB)
     Deleted 2 scratchspaces (0.000 byte)

(@v1.8) pkg> rm JLD2
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
  [033835bb] - JLD2 v0.4.3
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Manifest.toml`
  [033835bb] - JLD2 v0.4.3

(@v1.8) pkg> add JLD2
    Updating registry at `C:\Users\stefanpofahl\.julia\registries\General.toml`
   Resolving package versions...
ERROR: expected package `WindowFunctions [f8d1b8c8]` to exist at path `C:\Users\stefanpofahl\.julia\packages\WindowFunctions\fYhHv`

removing of WindowFunctions was not sufficient:

(@v1.8) pkg> rm WindowFunctions
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
  [f8d1b8c8] - WindowFunctions v0.1.0 `C:\Users\stefanpofahl\.julia\packages\WindowFunctions\fYhHv`
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Manifest.toml`
  [f8d1b8c8] - WindowFunctions v0.1.0 `C:\Users\stefanpofahl\.julia\packages\WindowFunctions\fYhHv`

(@v1.8) pkg> rm JLD2
ERROR: The following package names could not be resolved:
 * JLD2 (not found in project or manifest)

(@v1.8) pkg> add JLD2
   Resolving package versions...
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Project.toml`
⌃ [033835bb] + JLD2 v0.4.3
    Updating `C:\Users\stefanpofahl\.julia\environments\v1.8\Manifest.toml`
⌃ [033835bb] + JLD2 v0.4.3
        Info Packages marked with ⌃ have new versions available and may be upgradable.
JonasIsensee commented 1 year ago

there seems to be something quite wrong with julia installation.

I would recommend to rename your .julia folder (delete in the end but for now just rename) and start fresh.

StefanPofahl commented 1 year ago

After having removed the package via pkg> rm JLD2 I have removed the folders in: C:\Users\[...]\.julia\packages\JLD2 and specified the the version of package JLD2 in the following form:

Pkg.add(name="JLD2", version="0.4.28")

This worked as well. Really strange to me .... Thanks for your support!!!