vaphes / pocketbase

PocketBase client SDK for python
https://pypi.org/project/pocketbase/
MIT License
359 stars 41 forks source link

TypeError() raise when calling `client.collections.get_full_list()` #77

Closed chunlee888 closed 9 months ago

chunlee888 commented 10 months ago

Env

Code

from pocketbase import Client

client = Client('http://127.0.0.1:8090')

admin_data = client.admins.auth_with_password("test@example.com", "1234567890")

data = client.collections.get_full_list()

print(data)

Traceback

Traceback (most recent call last):
  File "/Users/kelvinlee/pocketbase/pb_python/example.py", line 15, in <module>
    data = client.collections.get_full_list()
  File "/Users/kelvinlee/anaconda3/envs/pb_python/lib/python3.10/site-packages/pocketbase/services/utils/crud_service.py", line 17, in get_full_list
    return self._get_full_list(self.base_crud_path(), batch, query_params)
  File "/Users/kelvinlee/anaconda3/envs/pb_python/lib/python3.10/site-packages/pocketbase/services/utils/base_crud_service.py", line 30, in _get_full_list
    return request(result, 1)
  File "/Users/kelvinlee/anaconda3/envs/pb_python/lib/python3.10/site-packages/pocketbase/services/utils/base_crud_service.py", line 22, in request
    list = self._get_list(base_path, page, batch_size, query_params)
  File "/Users/kelvinlee/anaconda3/envs/pb_python/lib/python3.10/site-packages/pocketbase/services/utils/base_crud_service.py", line 43, in _get_list
    items.append(self.decode(item))
  File "/Users/kelvinlee/anaconda3/envs/pb_python/lib/python3.10/site-packages/pocketbase/services/collection_service.py", line 10, in decode
    return Collection(data)
  File "/Users/kelvinlee/anaconda3/envs/pb_python/lib/python3.10/site-packages/pocketbase/models/utils/base_model.py", line 16, in __init__
    self.load(data)
  File "/Users/kelvinlee/anaconda3/envs/pb_python/lib/python3.10/site-packages/pocketbase/models/collection.py", line 37, in load
    self.schema.append(SchemaField(**field))
TypeError: SchemaField.__init__() got an unexpected keyword argument 'presentable'
m29h commented 10 months ago

This is an duplicate of #68 that was fixed in pull request #67

m29h commented 9 months ago

This issue should be fixed with the new release https://github.com/vaphes/pocketbase/tree/v0.10.0 please upgrade