-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
I'm trying to use your nice library to migrate some data from a self-hosted Bitwarden to a self-hosted Vaultwarden.
Hence, I am opening a connection to both softwares. There seems to be an incompatibility with the original Bitwarden software:
bitwarden_client = BitwardenAPIClient(
url="https://bitwarden.example.org",
email="[email protected]",
password="...",
client_id="...",
client_secret="...",
device_id="..."
)
vaultwarden_client = BitwardenAPIClient(
url="https://vaultwarden.example.org",
email="[email protected]",
password="...",
client_id="...",
client_secret="...",
device_id="..."
)
vw_data = vaultwarden_client.sync() # works
print(vw_org.collections()) # works
bw_data = bitwarden_client.sync() # fails
print(bw_org.collections()) # fails
It seems, Bitwarden returns less data than Vaultwarden. In both cases (.sync() and .collections()), this exception is generated:
Traceback (most recent call last):
File "myscript.py", line 58, in <module>
print(bitwarden_client.sync())
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/vaultwarden/clients/bitwarden.py", line 138, in sync
self._sync = SyncData.model_validate_json(resp.text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pydantic/main.py", line 766, in model_validate_json
return cls.__pydantic_validator__.validate_json(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 2 validation errors for SyncData
profile.name
Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]
For further information visit https://errors.pydantic.dev/2.12/v/string_type
profile._status
Field required [type=missing, input_value={'id': 'aaaaaaaa-bbbb-ccc...[], 'object': 'profile'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.12/v/missing
Metadata
Metadata
Assignees
Labels
No labels