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

Fixed() error #125

Closed
valentinkm opened this issue Jan 22, 2024 · 1 comment
Closed

Fixed() error #125

valentinkm opened this issue Jan 22, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@valentinkm
Copy link
Collaborator

valentinkm commented Jan 22, 2024

Fixed type not recognized as a subtype of Number in the JudgementNumber and JudgementVecNumber types.

  1. StandaloneFactor(n_variables = 6, factor_variance = Fixed(1.0), loadings = missing, quest_scale = 7)
    raises:
    """
    ERROR: TypeError: in JudgementNumber, in T, expected T<:(Union{Missing, var"#s21"} where var"#s21"<:Number), got Type{Fixed{Float64}}
    Stacktrace:
    [1] JudgementNumber(r::Fixed{Float64}, c::Float64, l::Missing) (repeats 2 times)
    @ Taxonomy.Judgements ~/.julia/packages/Taxonomy/SLRyy/src/judgements/judgement.jl:52
    [2] convert
    @ ~/.julia/packages/Taxonomy/SLRyy/src/judgements/judgement.jl:133 [inlined]
    [3] Measurement
    @ ~/.julia/packages/Taxonomy/SLRyy/src/taxons/measurement.jl:35 [inlined]
    [4] #Measurement#8
    @ ~/.julia/packages/Taxonomy/SLRyy/src/taxons/measurement.jl:68 [inlined]
    [5] #StandaloneFactor#9
    @ ~/.julia/packages/Taxonomy/SLRyy/src/taxons/measurement.jl:89 [inlined]
    [6] top-level scope
    @ ~/Desktop/Literature-Research-Pilot/DB_extended_judgements.jl:389
    """

  2. :SSB => Measurement(n_variables = 3, factor_variance = missing, loadings = [Fixed(1), 0.98, 0.92], quest_scale = 4)
    raises:
    """
    ERROR: TypeError: in JudgementVecNumber, in T, expected T<:(Union{Missing, var"#s21"} where var"#s21"<:(Vector{<:Union{Missing, Number}})), got Type{Vector{Any}}
    Stacktrace:
    [1] JudgementVecNumber(r::Vector{Any}, c::Float64, l::Missing) (repeats 2 times)
    @ Taxonomy.Judgements ~/.julia/packages/Taxonomy/SLRyy/src/judgements/judgement.jl:52
    [2] convert
    @ ~/.julia/packages/Taxonomy/SLRyy/src/judgements/judgement.jl:133 [inlined]
    [3] Measurement
    @ ~/.julia/packages/Taxonomy/SLRyy/src/taxons/measurement.jl:35 [inlined]
    [4] #Measurement#8
    @ ~/.julia/packages/Taxonomy/SLRyy/src/taxons/measurement.jl:68 [inlined]
    [5] top-level scope
    @ ~/Desktop/Literature-Research-Pilot/DB_extended_judgements.jl:346
    """

@valentinkm valentinkm added the bug Something isn't working label Jan 22, 2024
@aaronpeikert
Copy link
Contributor

We did figure out why, there was a redefinition of the struct Fixed as something other than a Number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants