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

Pyral returns incorrect results for ConversationPosts sometimes #188

Open
RebeccaMcCann-Young opened this issue Feb 17, 2022 · 0 comments
Open

Comments

@RebeccaMcCann-Young
Copy link

RebeccaMcCann-Young commented Feb 17, 2022

I've noticed in my Rally instance (SaaS), sometimes the pyral library returns incorrect results when querying for ConversationPost data - it returns 0 when there are numerous posts. I don't know why it's not consistent but it's not.

This code seems to work for the items that are just returning 0:

url = f'https://{server}/slm/webservice/v2.0/conversationpost?workspace={WORKSPACEURL}&query={query}&start=1&pagesize=20'
req = requests.get(url,headers=None, auth=auth)

resp = json.loads(req.content)
QueryResults = resp["QueryResult"]["Results"]
for result in QueryResults:
    req = requests.get( result["_ref"], headers=None, auth=auth)
    resp = json.loads(req.content)

I'm still fairly new to python and don't fully understand where it would belong/if it should be implemented a different way for the current codebase. I just wanted to raise this issue as I've spent time investigating it and would prefer to use pyral for my whole project if possible.

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

1 participant