home-assistant-libs / home-assistant-libs/zwave-js-server-python
Pydantic 2 does not support all of the V1 capabilities
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 63
- Forks
- 26
- Avg merge
- 13h 14m
- Merged PRs (30d)
- 10
Description
hello. Trying to launch zwave-js-server-python, but it terminates with import error.
Install was done with pip3 install zwave-js-server-python
Launching it, I get the error below:
$ ./zwave-js-server-python
Traceback (most recent call last):
File "./zwave-js-server-python", line 5, in <module>
from zwave_js_server.__main__ import main
File "/home/chr/.local/lib/python3.8/site-packages/zwave_js_server/__main__.py", line 9, in <module>
from .client import Client
File "/home/chr/.local/lib/python3.8/site-packages/zwave_js_server/client.py", line 28, in <module>
from .model.driver import Driver
File "/home/chr/.local/lib/python3.8/site-packages/zwave_js_server/model/driver.py", line 4, in <module>
from pydantic import create_model_from_typeddict
File "/home/chr/.local/lib/python3.8/site-packages/pydantic/__init__.py", line 218, in __getattr__
return _getattr_migration(attr_name)
File "/home/chr/.local/lib/python3.8/site-packages/pydantic/_migration.py", line 300, in wrapper
raise PydanticImportError(f'`{import_path}` has been removed in V2.')
pydantic.errors.PydanticImportError: `pydantic:create_model_from_typeddict` has been removed in V2.
For further information visit https://errors.pydantic.dev/2.4/u/import-error
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in zwave_js_server/model/driver.py at the create_model_from_typeddict import shown in the traceback, then review the surrounding model definitions for Pydantic compatibility. Confirm the library imports and launches successfully with Pydantic 2; the payload does not name a specific test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100