You-OpenSource/You-Python

I get this error "ValueError: not enough values to unpack (expected 2, got 1)"

MagaTaku opened this issue ยท 5 comments

๐Ÿ”ง API Error Report

When I executed the following source in python as specified, an error in the subject was detected and it did not work properly.

๐Ÿ”ฌ How To Reproduce (url used)

What url dit you use: (remove your api key before posting it here)
https://betterapi.net/about/


from youdotcom import Chat # import all the classes
import requests # import requests for the api call
API_KEY = "today_create_key" # your api key

url = "https://api.betterapi.net/youdotcom/chat?message=hello&key=" + API_KEY # set api url
json = requests.get(url).json() # load json form api

print(json.keys()) # print -> dict_keys(['error'])

print(json["error"]) # print -> Error, not likly made by you: not enough values to unpack (expected 2, got 1)

print(json["message"]) # print -> KeyError: 'message'


Screenshots

๐Ÿ“ˆ Expected behavior

Hope to see chat replies.

๐Ÿ“Ž Additional context

Hello @MagaTaku, thank you for your interest in youdotcom/betterapi.

If this is a bug/issue with the api (betterapi.net) note that this is still in beta.

Please note that repository is made and maintained by a single developer, @SilkePilon.

Thank you for submitting a issue! @SilkePilon will respond as soon as possible.

Hi there I'm still working on fixing the api, it's a work in progress. And it's reversed engineered

thank you.
However, when I tried it now, it was displayed as follows, so I will try again.
"Service Temporarily Unavailable"

Yeah, if you want you can join the discord for updates (it's linked down in the readme) I'm a single developer so it's really hard to bypass Cloudflare at a large scale

I tried it again now and it worked fine.
I will check the discord one by one.
thank you.