Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test DSGE fails #52

Closed
JohannesNaegele opened this issue Mar 6, 2020 · 2 comments
Closed

test DSGE fails #52

JohannesNaegele opened this issue Mar 6, 2020 · 2 comments

Comments

@JohannesNaegele
Copy link

Hey, test DSGE creates multiple errors:

  1. For some reason the file data_dsid=1922016_vint=190822.csv can not be opened without root rights. Giving w+r rights to the user solves this problem.
Test Summary:                      | Pass  Total
Test various forms of data loading |    6      6
 * data/load_data_poolmodel.jl
[ Info: The following warnings are expected
Creating dataset...
Reading data from /home/johannes/.julia/packages/DSGE/gCSuP/test/data/../reference/raw/wrongorigmatlab_190822.csv...
┌ Warning: /home/johannes/.julia/packages/DSGE/gCSuP/test/data/../reference/raw/wrongorigmatlab_190822.csv does not contain the entire date range specified; missings used.
└ @ DSGE ~/.julia/packages/DSGE/gCSuP/src/data/load_data.jl:190
Test various forms of data loading: Error During Test at /home/johannes/.julia/packages/DSGE/gCSuP/test/data/load_data_poolmodel.jl:24
  1. transform_data.jl errors:
Test Summary:       | Pass  Total
Check 4q transforms |   26     26
 * data/transform_data.jl
ERROR: LoadError: LoadError: MethodError: Cannot `convert` an object of type Array{Union{Missing, Date},1} to an object of type AbstractArray{T,1} where T
Closest candidates are:
  convert(::Type{T<:AbstractArray}, ::T<:AbstractArray) where T<:AbstractArray at abstractarray.jl:14
  convert(::Type{T<:AbstractArray}, ::Factorization) where T<:AbstractArray at /buildworker/worker/package_linux32/build/usr/share/julia/stdlib/v1.0/LinearAlgebra/src/factorization.jl:46
  convert(::Type{S}, ::T<:(Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R)) where {S, T<:(Union{CategoricalString{R}, CategoricalValue{T,R} where T} where R)} at /home/johannes/.julia/packages/CategoricalArrays/dmrjI/src/value.jl:103
  ...
Stacktrace:
 [1] jlconvert at /home/johannes/.julia/packages/JLD2/hB4ya/src/data.jl:675 [inlined]
 [2] macro expansion at /home/johannes/.julia/packages/JLD2/hB4ya/src/dataio.jl:70 [inlined]
 [3] macro expansion at ./simdloop.jl:73 [inlined]
 [4] read_array!(::Array{AbstractArray{T,1} where T,1}, ::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadRepresentation{AbstractArray{T,1} where T,JLD2.RelOffset}) at /home/johannes/.julia/packages/JLD2/hB4ya/src/dataio.jl:68
 [5] read_array(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadDataspace, ::JLD2.ReadRepresentation{AbstractArray{T,1} where T,JLD2.RelOffset}, ::Int32, ::UInt16, ::JLD2.RelOffset, ::Array{JLD2.ReadAttribute,1}) at /home/johannes/.julia/packages/JLD2/hB4ya/src/datasets.jl:323
 [6] read_data(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadRepresentation{Any,JLD2.RelOffset}, ::Array{JLD2.ReadAttribute,1}) at /home/johannes/.julia/packages/JLD2/hB4ya/src/datasets.jl:198
 [7] macro expansion at /home/johannes/.julia/packages/JLD2/hB4ya/src/datasets.jl:156 [inlined]
 [8] macro expansion at /home/johannes/.julia/packages/JLD2/hB4ya/src/datatypes.jl:76 [inlined]
 [9] read_data(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadDataspace, ::UInt8, ::Int64, ::Int64, ::Int32, ::UInt16, ::JLD2.RelOffset, ::Array{JLD2.ReadAttribute,1}) at /home/johannes/.julia/packages/JLD2/hB4ya/src/datasets.jl:152
 [10] load_dataset(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.RelOffset) at /home/johannes/.julia/packages/JLD2/hB4ya/src/datasets.jl:92
 [11] jlconvert at /home/johannes/.julia/packages/JLD2/hB4ya/src/data.jl:674 [inlined]
 [12] macro expansion at /home/johannes/.julia/packages/JLD2/hB4ya/src/data.jl:1322 [inlined]
 [13] jlconvert(::JLD2.ReadRepresentation{DataFrame,JLD2.OnDiskRepresentation{(0, 8),Tuple{Any,DataFrames.Index},Tuple{JLD2.RelOffset,JLD2.OnDiskRepresentation{(0, 8),Tuple{Dict{Symbol,Int64},Any},Tuple{JLD2.CustomSerialization{Array,JLD2.RelOffset},JLD2.RelOffset}}()}}()}, ::JLD2.JLDFile{JLD2.MmapIO}, ::Ptr{Nothing}, ::JLD2.RelOffset) at /home/johannes/.julia/packages/JLD2/hB4ya/src/data.jl:1269
 [14] read_data(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadRepresentation{DataFrame,JLD2.OnDiskRepresentation{(0, 8),Tuple{Any,DataFrames.Index},Tuple{JLD2.RelOffset,JLD2.OnDiskRepresentation{(0, 8),Tuple{Dict{Symbol,Int64},Any},Tuple{JLD2.CustomSerialization{Array,JLD2.RelOffset},JLD2.RelOffset}}()}}()}, ::Array{JLD2.ReadAttribute,1}) at /home/johannes/.julia/packages/JLD2/hB4ya/src/dataio.jl:37
 [15] read_data(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.ReadDataspace, ::UInt8, ::Int64, ::Int64, ::Int32, ::UInt16, ::JLD2.RelOffset, ::Array{JLD2.ReadAttribute,1}) at /home/johannes/.julia/packages/JLD2/hB4ya/src/datasets.jl:149
 [16] load_dataset(::JLD2.JLDFile{JLD2.MmapIO}, ::JLD2.RelOffset) at /home/johannes/.julia/packages/JLD2/hB4ya/src/datasets.jl:92
 [17] getindex(::JLD2.Group{JLD2.JLDFile{JLD2.MmapIO}}, ::String) at /home/johannes/.julia/packages/JLD2/hB4ya/src/groups.jl:108
 [18] read(::JLD2.JLDFile{JLD2.MmapIO}, ::String) at /home/johannes/.julia/packages/JLD2/hB4ya/src/JLD2.jl:326
 [19] #17 at /home/johannes/.julia/packages/DSGE/gCSuP/test/data/transform_data.jl:24 [inlined]
 [20] #jldopen#31(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::getfield(Main, Symbol("##17#18")), ::String, ::Vararg{String,N} where N) at /home/johannes/.julia/packages/JLD2/hB4ya/src/loadsave.jl:4
 [21] jldopen(::Function, ::String, ::String) at /home/johannes/.julia/packages/JLD2/hB4ya/src/loadsave.jl:2
 [22] top-level scope at none:0
 [23] include at ./boot.jl:317 [inlined]
 [24] include_relative(::Module, ::String) at ./loading.jl:1044
 [25] include(::Module, ::String) at ./sysimg.jl:29
 [26] include(::String) at ./client.jl:392
 [27] top-level scope at /home/johannes/.julia/packages/DSGE/gCSuP/test/runtests.jl:94 [inlined]
 [28] top-level scope at ./none:0
 [29] include at ./boot.jl:317 [inlined]
 [30] include_relative(::Module, ::String) at ./loading.jl:1044
 [31] include(::Module, ::String) at ./sysimg.jl:29
 [32] include(::String) at ./client.jl:392
 [33] top-level scope at none:0
in expression starting at /home/johannes/.julia/packages/DSGE/gCSuP/test/data/transform_data.jl:22
in expression starting at /home/johannes/.julia/packages/DSGE/gCSuP/test/runtests.jl:91

I'm using Julia version 1.0.4 on Elementary OS.

@chenwilliam77
Copy link
Collaborator

Hi @JohannesNaegele,

  1. This is not my expertise, but I don't see why this would be a problem with the DSGE.jl package.

  2. Could you tell me what version of DSGE you have? When I tested my version of the DSGE master branch (from which I pulled before testing) I don't get your error. Note that when I tested in package mode, I first removed my DSGE Manifest, then activated DSGE in package mode, instantiated, and finally tested.

@JohannesNaegele
Copy link
Author

  1. Yeah, same here. However, I never encountered a similar error before with Julia and a friend of mine reported the same issue on Arch Linux.

  2. It's all kinda strange. I reinstalled Julia 1.0.4 -> 1.1.1. Since then, everything works fine (except for 1.). In my great and unmatched wisdom, I didn't write down the DSGE.jl version from 1.0.4. Sorry :|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants