Teekeks / pyTwitchAPI

A Python 3.7 compatible implementation of the Twitch API, EventSub, PubSub and Chat
https://pytwitchapi.dev
MIT License
256 stars 38 forks source link

Bugfix - ValueError in modify_channel_information method #45

Closed asishm closed 3 years ago

asishm commented 3 years ago

There is a bug with the method modify_channel_information

It raises with

File "O:\Documents\Code\Git\gimpybot\main.py", line 41, in on_message
    await twitch.modify_channel_information(TYLER, id, "en", title)
  File "O:\Documents\Code\Git\gimpybot\env\lib\site-packages\twitchAPI\twitch.py", line 1564, in modify_channel_information
    'title': title} if v is not None}
  File "O:\Documents\Code\Git\gimpybot\env\lib\site-packages\twitchAPI\twitch.py", line 1562, in <dictcomp>
    body = {k: v for k, v in {'game_id': game_id,
ValueError: too many values to unpack (expected 2)

there's a missing .items() call in that dict-comprehension

Teekeks commented 3 years ago

Thanks!

Teekeks commented 3 years ago

Your fix is included in the release of version 2.2.1 which I just released to pypi, thanks for the contribution!