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

function get_realtime_statuses not work properly #17

Open
Setplus01 opened this issue Mar 4, 2022 · 1 comment
Open

function get_realtime_statuses not work properly #17

Setplus01 opened this issue Mar 4, 2022 · 1 comment

Comments

@Setplus01
Copy link

  • 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'}

@spralja
Copy link

spralja commented Mar 16, 2022

client.users.get_realtime_statuses(*['Sasageyo', 'Voinikonis_Nikita', 'Zugzwangerz']) or
client.users.get_realtime_statuses('Sasageyo', 'Voinikonis_Nikita', 'Zugzwangerz') should work,

kraktus pushed a commit to kraktus/berserk that referenced this issue Jul 28, 2023
Updating regex to treat search items as distinct path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants