Skip to content

ValueError with a simple cross-match #1314

@hombit

Description

@hombit

Bug report

lsdb.open_catalog(
    's3://stpubdata/panstarrs/ps1/public/hats/otmo'
).crossmatch(
    lsdb.open_catalog('s3://stpubdata/gaia/gaia_dr3/public/hats'),
).partitions[0].compute()

Environment Information

INSTALLED VERSIONS
--------      SYSTEM INFO      --------
python        : 3.13.12
python-bits   : 64
OS            : Darwin
OS-release    : 25.3.0
Version       : Darwin Kernel Version 25.3.0: Wed Jan 28 20:53:05 PST 2026; root:xnu-12377.81.4~5/RELEASE_ARM64_T6020
machine       : arm64
processor     : arm
byteorder     : little
LC_ALL        : en_US.UTF-8
LANG          : en_US.UTF-8
--------   INSTALLED VERSIONS   --------
lsdb          : 0.9.0
hats          : 0.9.0
nested-pandas : 0.6.8
pandas        : 2.3.3
numpy         : 2.4.3
dask          : 2026.3.0
pyarrow       : 23.0.1
fsspec        : 2026.2.0
Traceback
File ~/.virtualenvs/lsdb-release/lib/python3.13/site-packages/lsdb/catalog/dataset/healpix_dataset.py:154, in HealpixDataset.compute(self, progress_bar, tqdm_kwargs)
    152 desc = tqdm_kwargs.pop("desc", "Computing Catalog") if tqdm_kwargs else "Computing Catalog"
    153 with TqdmCallback(desc=desc, disable=not progress_bar, **(tqdm_kwargs or {})):
--> 154     res = self._ddf.compute()
    155 return res

File ~/.virtualenvs/lsdb-release/lib/python3.13/site-packages/lsdb/nested/core.py:362, in NestedFrame.compute(self, **kwargs)
    360 def compute(self, **kwargs):
    361     """Compute this Dask collection, returning the underlying dataframe or series."""
--> 362     return npd.NestedFrame(super().compute(**kwargs))

File ~/.virtualenvs/lsdb-release/lib/python3.13/site-packages/dask/base.py:377, in DaskMethodsMixin.compute(self, **kwargs)
    353 def compute(self, **kwargs):
    354     """Compute this dask collection
    355
    356     This turns a lazy Dask collection into its in-memory equivalent.
   (...)    375     dask.compute
    376     """
--> 377     (result,) = compute(self, traverse=False, **kwargs)
    378     return result

File ~/.virtualenvs/lsdb-release/lib/python3.13/site-packages/dask/base.py:685, in compute(traverse, optimize_graph, scheduler, get, *args, **kwargs)
    682     expr = expr.optimize()
    683     keys = list(flatten(expr.__dask_keys__()))
--> 685     results = schedule(expr, keys, **kwargs)
    687 return repack(results)

File ~/.virtualenvs/lsdb-release/lib/python3.13/site-packages/dask/dataframe/utils.py:382, in check_meta(x, meta, funcname, numeric_equal)
    376         return x
    377     errmsg = "Partition type: `{}`\n{}".format(
    378         typename(type(meta)),
    379         asciitable(["", "dtype"], [("Found", x.dtype), ("Expected", meta.dtype)]),
    380     )
--> 382 raise ValueError(
    383     "Metadata mismatch found{}.\n\n"
    384     "{}".format((f" in `{funcname}`" if funcname else ""), errmsg)
    385 )

ValueError: Metadata mismatch found in `from_delayed`.

Partition type: `nested_pandas.nestedframe.core.NestedFrame`
+---------------+-------+----------------+
| Column        | Found | Expected       |
+---------------+-------+----------------+
| 'Dir_otmo'    | -     | int64[pyarrow] |
| 'Norder_otmo' | -     | int8[pyarrow]  |
| 'Npix_otmo'   | -     | int64[pyarrow] |
+---------------+-------+----------------+

Before submitting
Please check the following:

  • I have described the situation in which the bug arose, including what code was executed, and any applicable data others will need to reproduce the problem.
  • I have included information about my environment, including the version of this package (e.g. lsdb.show_versions())
  • I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
  • If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedBlocked by other issuesbugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions