Python - a bytes like object is required, not str

前端 未结 1 1278
无人及你
无人及你 2020-12-25 09:32

I\'m moving my Twitch bot from Python 2.7 to Python 3.5. I keep getting the error: a bytes like object is required not \'str\' on the 2nd line of the code belo

相关标签:
1条回答
  • 2020-12-25 10:11

    try

    data = twitchdata.decode().split(":")[1]
    

    instead of

    data = twitchdata.split(":")[1]
    
    0 讨论(0)
提交回复
热议问题