Skip to content

Tests are failing: "Cannot convert unordered AbstractDicts into OrderedDicts" #44

Closed

Description

@ablaom

When running tests under Julia 1.12:

Error During Test at /Users/anthony/.julia/packages/ARFFFiles/uss3B/test/load.jl:46
  Got exception outside of a @test
  ArgumentError: Cannot convert unordered `AbstractDict`s into `OrderedDicts`
  Stacktrace:
    [1] convert(::Type{OrderedCollections.OrderedDict{Symbol, AbstractVector}}, d::Dict{Any, Any})
      @ OrderedCollections ~/.julia/packages/OrderedCollections/1sijc/src/ordered_dict.jl:105
    [2] Tables.DictColumnTable(schema::Tables.Schema{nothing, nothing}, values::Dict{Any, Any})
      @ Tables ~/.julia/packages/Tables/oWklV/src/dicts.jl:3
    [3] loadstreaming(io::IOStream, own::Bool; missingcols::Symbol, missingnan::Bool, categorical::Bool, chunkbytes::Int64, header::Nothing)

Activity

  1. changed the title [-]Tests are failing: "[/-] [+]Tests are failing: "Cannot convert unordered `AbstractDict`s into `OrderedDicts`"[/+] on Aug 7, 2026
  2. ablaom commented on Aug 7, 2026

    @ablaom
    ContributorAuthor

    Here are some clues. If I pin OrderedCollections to v1 (currently its 2.x) then tests pass, but I get the following deprecation warnings:

    Conversion to OrderedDict is deprecated for unordered associative containers (in this case, Dict{Any, Any}). Use an ordered or sorted associative type, such as SortedDict and OrderedDict.
    caller = DictColumnTable at dicts.jl:3 [inlined]
    @ Core ~/.julia/packages/Tables/oWklV/src/dicts.jl:3
    
  3. ablaom commented on Aug 7, 2026

    @ablaom
    ContributorAuthor

    So a Tables update of their compat for OrderedCollections, appears to have broken this package. But despite this, I'm not sure Tables.jl would regard this as an issue for them to resolve.

    cc @quinnj

  4. quinnj commented on Aug 9, 2026

    @quinnj
    Member

    Thanks for the ping. I reproduced this. The fix belongs in ARFFFiles: it passes plain Dicts to Tables.DictColumnTable, relying on the unordered-to-ordered conversion that OrderedCollections 2 now intentionally rejects. ARFFFiles should construct OrderedDicts directly and support OrderedCollections 1 and 2; I don't think Tables should restore the old conversion.

    [reviewed by codex & quinnj]

  5. ablaom commented on Aug 9, 2026

    @ablaom
    ContributorAuthor

    Thanks, @quinnj . I agree.

    The constructor Tables.DictColumnTable is non-public, and this is essentially what has gotten this package into trouble.

    Working on a patch along the lines suggested, and will open an issue re use of non-public API.

  6. added a commit that references this issue on Aug 14, 2026
    d82d554
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions