-
Notifications
You must be signed in to change notification settings - Fork 392
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
MissingIDFieldWarning
in reads
#1306
Comments
Thank you @jorenham for reporting this, I will look into this, especially as it sounds that this will become a hard error at some point! |
At this stage I have not yet been able to reproduce the warning. Could you confirm which version of I think that it would be useful if Jupytext could tell about which file is being read, I could try to add that - indeed at the two locations you point out that information is not available as Are you able to reproduce the problem with a simpler snippet in your env, e.g. something like this? from pathlib import Path
from nbformat import reads
with open('docs/examples/visual_intro.ipynb') as fp:
nb = reads(fp.read(), as_version=4) |
Did you try these repro steps?
$ uv tree --package jupytext
Resolved 147 packages in 1ms
jupytext v1.16.6
├── markdown-it-py v3.0.0
│ └── mdurl v0.1.2
├── mdit-py-plugins v0.4.2
│ └── markdown-it-py v3.0.0 (*)
├── nbformat v5.10.4
│ ├── fastjsonschema v2.21.1
│ ├── jsonschema v4.23.0
│ │ ├── attrs v24.3.0
│ │ ├── jsonschema-specifications v2024.10.1
│ │ │ └── referencing v0.35.1
│ │ │ ├── attrs v24.3.0
│ │ │ └── rpds-py v0.22.3
│ │ ├── referencing v0.35.1 (*)
│ │ └── rpds-py v0.22.3
│ ├── jupyter-core v5.7.2
│ │ ├── platformdirs v4.3.6
│ │ └── traitlets v5.14.3
│ └── traitlets v5.14.3
├── packaging v24.2
└── pyyaml v6.0.2
(*) Package tree already displayed (ran while still within the so it's the latests
I also can't repo it this way, so perhaps ping @danielfrg |
When I use mkdocs-jupyter to build the
Lmo
docs, I see manyMissingIDFieldWarning
's:to repro:
A text search in the
.venv
showed that the relevantnbformat.reads
call can only originate fromjuypytext
. Specifically, atjupytext/src/jupytext/jupytext.py
Line 368 in 8409313
jupytext/src/jupytext/formats.py
Line 394 in 8409313
I'm not familiar with the
jupytext
ornbformat
codebases, but as the warning message suggests, I'm guessing that this could be solved by callingnbformat.validator.normalize
beforenbformat.reads
🤷🏻The text was updated successfully, but these errors were encountered: