PythonistaGuild / TwitchIO

An Async Bot/API wrapper for Twitch made in Python.
https://twitchio.dev
MIT License
791 stars 163 forks source link

post_create_clip query parameter does not work #294

Closed jcscottiii closed 2 years ago

jcscottiii commented 2 years ago

The library that builds the query parameters for requests expects a string, int or float. But has_delay is of type bool. We need to convert the boolean to a string and lower case it.

  File "C:\Users\james\code\twitch-jarvis-python\env\lib\site-packages\yarl\_url.py", line 923, in _query_var
    raise TypeError(
TypeError: Invalid variable type: value should be str, int or float, got False of type <class 'bool'>

image

https://dev.twitch.tv/docs/api/reference#create-clip

This happens if has_delay is provided or the default is used.

github-actions[bot] commented 2 years ago

Hello! Thanks for the issue. If this is a general help question, for a faster response consider joining the official Discord Server

Else if you have an issue with the library please wait for someone to help you here.

chillymosh commented 2 years ago

I can confirm by testing User.create_clip(token=token) that this is a bug. Calling .lower() is not necessary here.