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

init() error parsing Celestrak file #4

Closed
fgasdia opened this issue Sep 12, 2023 · 1 comment
Closed

init() error parsing Celestrak file #4

fgasdia opened this issue Sep 12, 2023 · 1 comment

Comments

@fgasdia
Copy link

fgasdia commented Sep 12, 2023

SpaceIndices is failing one of its own tests with the following (partial) error message:

Testing Running tests...
Functions init_space_index_sets and init_space_index_set: Error During Test at C:\dev\SpaceIndices.jl\test\initialization.jl:11
  Got exception outside of a @test
  MethodError: no method matching AbstractFloat(::SubString{String})
  
  Closest candidates are:
    (::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number}
    (::Type{T})(::Complex) where T<:Real
     @ Base complex.jl:44
    ...
[SW-All.csv](https://github.com/JuliaSpace/SpaceIndices.jl/files/12582114/SW-All.csv)


  Stacktrace:
    [1] float(x::SubString{String})
      @ Base .\float.jl:294
    [2] (::SpaceIndices.var"#13#15"{Matrix{Any}, Int64})(j::Int64)
      @ SpaceIndices .\essentials.jl:0
    [3] iterate
      @ .\generator.jl:47 [inlined]
    [4] collect(itr::Base.Generator{UnitRange{Int64}, SpaceIndices.var"#13#15"{Matrix{Any}, Int64}})
      @ Base .\array.jl:782
    [5] parse_files(#unused#::Type{SpaceIndices.Celestrak}, filepaths::Vector{String})
      @ SpaceIndices C:\dev\SpaceIndices.jl\src\space_index_sets\celestrak.jl:108
    [6] init(; blocklist::Vector{Any})
      @ SpaceIndices C:\dev\SpaceIndices.jl\src\initialize.jl:63
[SW-All.csv](https://github.com/JuliaSpace/SpaceIndices.jl/files/12582088/SW-All.csv)

    [7] init()
      @ SpaceIndices C:\dev\SpaceIndices.jl\src\initialize.jl:51

I've downloaded the current Celestrak csv file from https://celestrak.org/SpaceData/SW-All.csv (attached) and the entry for today (2023-09-11) has no values for Kp. This line is causing the error in parse_files.
SW-All.csv

@ronisbr
Copy link
Member

ronisbr commented Sep 12, 2023

Fixed! Thanks!

I will tag a new version when the tests pass.

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