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

TypeError when adding a sku in the entitlements() method #2627

Closed
3 tasks done
UnBonWhisky opened this issue Oct 27, 2024 · 4 comments · Fixed by #2628
Closed
3 tasks done

TypeError when adding a sku in the entitlements() method #2627

UnBonWhisky opened this issue Oct 27, 2024 · 4 comments · Fixed by #2628
Labels
unconfirmed bug A bug report that needs triaging

Comments

@UnBonWhisky
Copy link
Contributor

Summary

When calling entitlements() method with the skus argument, a TypeError is raised.

Reproduction Steps

Make a call with guild.entitlements(limit=None, skus=[<sku Object>])

Minimal Reproducible Code

No response

Expected Results

return all the entitlements that correspond to the SKU

Actual Results

It raises something like this TypeError: sequence item 0: expected str instance, int found

Intents

guilds, messages, reactions, message_content

System Information

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

The source code that raises the error is this one :

params["sku_ids"] = ",".join(sku_ids)

I have checked, edited and verified that if we edit this line into this one :
params["sku_ids"] = ",".join(str(sku_id) for sku_id in sku_ids)

The code works perfectly.

@UnBonWhisky UnBonWhisky added the unconfirmed bug A bug report that needs triaging label Oct 27, 2024
@NeloBlivion
Copy link
Member

Well, if you have the solution you can just PR it directly 😅

@UnBonWhisky
Copy link
Contributor Author

I don't understand everything plun made on his PR about the entitlements and SKU, so I prefer to make an issue, in case this part of the code is not anymore in the 2.7 with this PR #2564

So I make an issue in case it is not needed to PR this.
If it is, then I will PR it, but for now I am not sure about the code of the upcoming 2.7

@plun1331
Copy link
Member

PR it, it still exists in my pr

UnBonWhisky added a commit to UnBonWhisky/pycord that referenced this issue Oct 27, 2024
Signed-off-by: UnBonWhisky <65244389+UnBonWhisky@users.noreply.github.com>
@UnBonWhisky
Copy link
Contributor Author

PR added !

OmLanke pushed a commit to OmLanke/pycord that referenced this issue Dec 16, 2024
…lopment#2628)

* Fix Pycord-Development#2627

Signed-off-by: UnBonWhisky <65244389+UnBonWhisky@users.noreply.github.com>

* Update CHANGELOG.md

Signed-off-by: UnBonWhisky <65244389+UnBonWhisky@users.noreply.github.com>

* Update CHANGELOG.md

Signed-off-by: UnBonWhisky <65244389+UnBonWhisky@users.noreply.github.com>

* style(pre-commit): auto fixes from pre-commit.com hooks

* Update CHANGELOG.md

Signed-off-by: plun1331 <plun1331@gmail.com>

---------

Signed-off-by: UnBonWhisky <65244389+UnBonWhisky@users.noreply.github.com>
Signed-off-by: plun1331 <plun1331@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: plun1331 <plun1331@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unconfirmed bug A bug report that needs triaging
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants