Creating new lockfile fails with `Eof at character 0`
Checks
-
[X] I have checked that this issue has not already been reported.
-
[X] I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
Running:
pixi shell
For the following pyproject.toml:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "xugrid"
description = "Xarray extension for unstructured grids"
readme = { file = "README.rst", content-type = "text/x-rst" }
maintainers = [{ name = "Huite Bootsma", email = "[email protected]" }]
requires-python = ">=3.9"
dependencies = [
'pandas',
'numba',
'numba_celltree',
'numpy',
'pooch',
'scipy',
'xarray',
]
dynamic = ["version"]
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering',
]
keywords = ['mesh', 'ugrid', 'unstructured grid', 'xarray']
license = { text = "MIT" }
[project.urls]
Home = "https://github.com/deltares/xugrid"
Code = "https://github.com/deltares/xugrid"
Issues = "https://github.com/deltares/xugrid/issues"
[project.optional-dependencies]
all = [
'geopandas',
'mapbox_earcut',
'matplotlib',
'meshkernel >= 3.0.0',
'netcdf4',
'pooch',
'shapely >= 2.0',
'pyproj',
'zarr',
]
[tool.hatch.version]
path = "xugrid/__init__.py"
[tool.hatch.build.targets.sdist]
only-include = ["xugrid", "tests"]
[tool.isort]
profile = "black"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"@abc.abstractmethod",
]
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
[tool.pixi.pypi-dependencies]
xugrid = { path = ".", editable = true }
[tool.pixi.dependencies]
dask = "*"
geopandas = "*"
mapbox_earcut = "*"
matplotlib-base = "*"
netcdf4 = "*"
numba_celltree = ">=0.1.8"
numpy = "<2.0"
pip = "*"
pooch = "*"
pre-commit = "*"
pydata-sphinx-theme = "*"
pymetis = "*"
pyproj = "*"
pytest = "*"
pytest-cases = "*"
pytest-cov = "*"
python = ">=3.9"
ruff = "*"
shapely = ">=2.0"
scipy = "*"
sphinx = "*"
sphinx-gallery = "*"
xarray = "*"
zarr = "*"
ipykernel = "*" # So we can run examples
twine = "*"
build = "*"
[tool.pixi.tasks]
install-pre-commit = "pre-commit install"
pre-commit = "pre-commit run --all-files"
test = "NUMBA_DISABLE_JIT=1 pytest --cov=xugrid --cov-report xml --cov-report term"
docs = "NUMBA_DISABLE_JIT=1 sphinx-build docs docs/_build"
all = { depends_on = ["pre-commit", "test", "docs"]}
pypi-publish = "rm --recursive --force dist && python -m build && twine check dist/* && twine upload dist/*"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
[tool.pixi.feature.py310.dependencies]
python = "3.10.*"
[tool.pixi.feature.py309.dependencies]
python = "3.9.*"
[tool.pixi.environments]
default = { features = ["py312"], solve-group = "py312" }
py312 = { features = ["py312"], solve-group = "py312" }
py311 = ["py311"]
py310 = ["py310"]
py309 = ["py309"]
[tool.ruff.lint]
# See https://docs.astral.sh/ruff/rules/
select = ["C4", "D2", "D3", "D4", "E", "F", "I", "NPY", "PD"]
ignore = [
"D202",
"D205",
"D206",
"D400",
"D404",
"E402",
"E501",
"E703",
"PD002",
"PD901",
"PD003",
"PD004",
]
fixable = ["I"]
ignore-init-module-imports = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
Repo link: https://github.com/Deltares/xugrid
Issue description
This innocuous PR has failing pipelines: https://github.com/Deltares/xugrid/pull/269
So I tried updating the lockfile, but it's giving me this error:
❯ pixi install
WARN The feature 'all' is defined but not used in any environment
⠁ py312:win-64 [00:00:00] loading repodata
py312:osx-arm64 ..
⠁ py309:linux-64 [00:00:00] loading repodata
⠁ py312:linux-64 [00:00:00] loading repodata
⠁ py309:osx-arm64 [00:00:00] loading repodata
⠁ py309:win-64 [00:00:00]
⠁ py311:win-64 [00:00:00] loading repodata
⠁ py311:linux-64 [00:00:00] loading repodata
⠁ py311:osx-64 [00:00:00] loading repodata
⠁ py311:osx-arm64 [00:00:00] loading repodata
py310:osx-64 ..
py310:osx-arm64 ..
⠁ py312:osx-64 [00:00:00] loading repodata
py309:osx-64 ..
× failed to instantiate a prefix for 'py311'
╰─▶ Eof at character 0
(The warning isn't the issue, although I should address it soon...)
I then tried switching back to the main branch as a sanity check, but I'm unable to generate a new lockfile there as well -- while it was working yesterday. I can still create a lockfile just fine for some other projects of mine.
Expected behavior
My suspicion in this case is that some repodata (maybe for a specific project) is wrong. So in this case, a more meaningful error message would help.
Do you have any files under .pixi or more specifically .pixi/envs? I am wondering if there are (partial) files under a conda-meta folder.
Thanks, I'll try that now. That makes the most sense. The example above runs if I remove the py311 = ["py311"] bit.
Removing the .pixi directory indeed does the trick. Thanks!
Normally, I think I would've thought of that myself -- but in this case I made a specific change to the pyproject.toml, priming me to think there's where the problem would be.
So a more specific error message would still help!