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

Can't list items from vault with API_CREDENTIAL item #13

Closed
mdrumond opened this issue May 6, 2021 · 0 comments · Fixed by #15
Closed

Can't list items from vault with API_CREDENTIAL item #13

mdrumond opened this issue May 6, 2021 · 0 comments · Fixed by #15
Assignees
Labels
bug Something isn't working

Comments

@mdrumond
Copy link

mdrumond commented May 6, 2021

Your environment

SDK Version: 1.0.1

Connect Server Version: 1.1.0

OS: Ubuntu 20.04

Python Version: 3.8.5

What happened?

I have created an API_CREDENTIAL item on my vault. When I run client.get_items("{vault_id"), I get the following error:

ValueError: Invalid value for `category` (API_CREDENTIAL), must be one of ['LOGIN', 'PASSWORD', 'SERVER', 'DATABASE', 'CREDIT_CARD', 'MEMBERSHIP', 'PASSPORT', 'SOFTWARE_LICENSE', 'OUTDOOR_LICENSE', 'SECURE_NOTE', 'WIRELESS_ROUTER', 'BANK_ACCOUNT', 'DRIVER_LICENSE', 'IDENTITY', 'REWARD_PROGRAM', 'DOCUMENT', 'EMAIL_ACCOUNT', 'SOCIAL_SECURITY_NUMBER', 'CUSTOM']

What did you expect to happen?

I expected to get a list of items in the vault.

Steps to reproduce

Run client.get_items("{vault_id") on a vault that has an item of the API_CREDENTIAL category.

Notes & Logs

[{'attribute_version': 1,
 'content_version': 3,
 'created_at': datetime.datetime(2021, 5, 6, 8, 43, 21, tzinfo=tzlocal()),
 'description': None,
 'id': 'REDACTED',
 'items': 2,
 'name': 'Development',
 'type': 'USER_CREATED',
 'updated_at': datetime.datetime(2021, 5, 6, 8, 44, 33, tzinfo=tzlocal())}]
Traceback (most recent call last):
  File "get_env.py", line 16, in <module>
    main()
  File "get_env.py", line 12, in main
    client.get_items("REDACTED")
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/client.py", line 131, in get_items
    return self.deserialize(response.content, "list[SummaryItem]")
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/client.py", line 294, in deserialize
    return self.__deserialize(data, response_type)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/client.py", line 354, in __deserialize
    return [self.__deserialize(sub_data, sub_kls) for sub_data in data]  # noqa: E501
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/client.py", line 354, in <listcomp>
    return [self.__deserialize(sub_data, sub_kls) for sub_data in data]  # noqa: E501
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/client.py", line 377, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/client.py", line 463, in __deserialize_model
    instance = klass(**kwargs)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/models/summary_item.py", line 84, in __init__
    self.category = category
  File "/home/ubuntu/.local/lib/python3.8/site-packages/onepasswordconnectsdk/models/summary_item.py", line 185, in category
    raise ValueError(
ValueError: Invalid value for `category` (API_CREDENTIAL), must be one of ['LOGIN', 'PASSWORD', 'SERVER', 'DATABASE', 'CREDIT_CARD', 'MEMBERSHIP', 'PASSPORT', 'SOFTWARE_LICENSE', 'OUTDOOR_LICENSE', 'SECURE_NOTE', 'WIRELESS_ROUTER', 'BANK_ACCOUNT', 'DRIVER_LICENSE', 'IDENTITY', 'REWARD_PROGRAM', 'DOCUMENT', 'EMAIL_ACCOUNT', 'SOCIAL_SECURITY_NUMBER', 'CUSTOM']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants