berserk
berserk copied to clipboard
function get_realtime_statuses not work properly
- berserk version: berserk-downstream 0.11.8
- Python version: 3.8.10
- Operating System: Ubuntu 20.04
Description
I am trying to call the function get_realtime_statuses
.
import berserk
session = berserk.TokenSession(API_TOKEN)
client = berserk.Client(session=session)
client.users.get_realtime_statuses(['Sasageyo', 'Voinikonis_Nikita', 'Zugzwangerz'])
Output
What i have got:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/lichess/venv/lib/python3.8/site-packages/berserk/clients.py", line 193, in get_realtime_statuses
params = {'ids': ','.join(user_ids)}
TypeError: sequence item 0: expected str instance, list found
In source code of this function i've found this string:
params = {'ids': ','.join(user_ids)}
and withoung calling directly get_realtime_statuses
:
params = {'ids': ','.join(['Sasageyo', 'Voinikonis_Nikita', 'Zugzwangerz'])}
returns {'ids': 'Sasageyo,Voinikonis_Nikita,Zugzwangerz'}
client.users.get_realtime_statuses(*['Sasageyo', 'Voinikonis_Nikita', 'Zugzwangerz'])
or
client.users.get_realtime_statuses('Sasageyo', 'Voinikonis_Nikita', 'Zugzwangerz')
should work,