Skip to content
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

[Bug]: TypeError: dumps_kwargs keyword arguments are no longer supported. when running tests on pynwb 2.5.0 #1799

Closed
3 tasks done
TheChymera opened this issue Dec 11, 2023 · 4 comments
Labels
category: bug errors in the code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users topic: dependencies updates to dependencies

Comments

@TheChymera
Copy link

What happened?

Full build log including tests: https://ppb.chymera.eu/345788.log

Steps to Reproduce

python3.11 -m pytest -vv -ra -l -Wdefault --color=yes -o console_output_style=count -p no:cov -p no:flake8 -p no:flakes -p no:pylint -p no:markdown -p no:sugar -p no:xvfb -p no:pytest-describe -p no:plus -p no:tavern --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_cached --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_cached_bad_ns --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_cached_core --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_cached_extension --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_cached_extension_pass_ns --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_cached_hdmf_common --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_cached_ignore --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_invalid --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_list_namespaces_core --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_list_namespaces_extension --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_no_cache --deselect tests/validation/test_validate.py::TestValidateCLI::test_validate_file_no_cache_bad_ns

Traceback

No response

Operating System

Linux

Python Executable

Python

Python Version

3.11

Package Versions

No response

Code of Conduct

@oruebel
Copy link
Contributor

oruebel commented Dec 11, 2023

Thanks for sharing the log. As far as I can tell from the log, this looks like an error in the DANDIAPI related to the use of pydantic. From a quick google search, it looks pydantic removed in version 2 the option to pass custom options to json dumps https://stackoverflow.com/questions/77076597/is-it-possible-to-get-pydantic-v2-to-dump-json-with-sorted-keys

PyNWB does not have pydantic as a dependency, so this gets probably installed via the dandi python package. I don't think this is an issue we can fix in PyNWB, but is something that I think will need to be fixed in dandi. A possible workaround may be to install v1.10.13 of `pydantic.

I would recommend creating an issue on https://github.com/dandi/dandi-cli for this.

@oruebel oruebel added category: bug errors in the code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users topic: dependencies updates to dependencies labels Dec 11, 2023
@oruebel
Copy link
Contributor

oruebel commented Dec 11, 2023

Actually, I think the issue may be https://github.com/dandi/dandi-schema instead

@oruebel
Copy link
Contributor

oruebel commented Dec 11, 2023

Looking at the requirements for dandi-schema, it actually requires pydantic[email] >= 1.8.1, < 2.0 (see
https://github.com/dandi/dandi-schema/blob/36753193205198b7855aed842af76d5e5829816f/setup.cfg#L33). I.e., it looks like the only solution is to either downgrade pydantic to version 1.10x. or to update dandi-schema to support pydantic >2.0.

It looks like there is already an open issue for this here dandi/dandi-schema#176 . I'll close this issue for now here, since we can't fix this on our end, and leave a note about this issue there.

@TheChymera
Copy link
Author

Thank you for the clarification!

gentoo-bot pushed a commit to gentoo/sci that referenced this issue Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior priority: medium non-critical problem and/or affecting only a small set of NWB users topic: dependencies updates to dependencies
Projects
None yet
Development

No branches or pull requests

2 participants