Skip to content

pretty_table throws MethodError: length(::Nothing) for large matrices when show_column_labels=false #270

@abcdvvvv

Description

@abcdvvvv

Hi, PrettyTables developers,

Minimal repro

using PrettyTables

# OK
pretty_table(ones(3, 3); show_column_labels = false)

# ERROR
pretty_table(rand(500, 500); show_column_labels = false)

Expected
Render a table normally, without error.

Actual
For large matrices (e.g., 500×500), it errors with:

ERROR: MethodError: no method matching length(::Nothing)
Stacktrace:
  [1] _text__print_table(pspec::PrettyTables.PrintingSpec; …, table_format::TextTableFormat)
    @ PrettyTables ~/.julia/packages/PrettyTables/.../src/backends/text/text_backend.jl:518

Small tables (e.g., 3×3) work.

Environment

  • Julia 1.10.10 (Windows, juliaup mingw)
  • PrettyTables v3.0.8
  • Plain REPL / VS Code terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions