python-discord / sir-lancebot

A Discord bot started as a community project for Hacktoberfest 2018, later evolved to an introductory project for aspiring new developers starting out with open source development.
MIT License
240 stars 240 forks source link

ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: application/json', url=URL('http://a... #1019

Open sentry-io[bot] opened 2 years ago

sentry-io[bot] commented 2 years ago

Sentry Issue: SIR-LANCEBOT-7P

ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: application/json', url=URL('http://api.wolframalpha.com/v2/query?input=y+%3D+W%E2%88%921(x)+if+%E2%88%921/e+%E2%89%A4+x+%3C+0&appid=EJTXQJ-PHQXE29HLK&output=JSON&format=image,plaintext&location=the+moon&latlong=0.0,0.0&ip=1.1.1.1')
  File "discord/ext/commands/core.py", line 167, in wrapped
    ret = await coro(*args, **kwargs)
  File "bot/exts/utilities/wolfram.py", line 244, in wolfram_cut_command
    pages = await get_pod_pages(ctx, self.bot, query)
  File "bot/exts/utilities/wolfram.py", line 123, in get_pod_pages
    json = await response.json(content_type="text/plain")
  File "aiohttp/client_reqrep.py", line 1097, in json
    raise ContentTypeError(

Unhandled command error: 0, message='Attempt to decode JSON with unexpected mimetype: application/json', url=URL('http://api.wolframalpha.com/v2/query?input=y+%3D+W%88%921(x)+if+%88%921/e+%89%A4+x+%3C+0&appid=EJTXQJ-PHQXE29HLK&output=JSON&format=image,plaintext&location=the+moon&latlong=0.0,0.0&ip=1.1.1.1')

This was caused by running .wa cut y = W−1(x) if −1/e ≤ x < 0

Brodevil commented 2 years ago

Hey Can I work on it?

ChrisLovering commented 2 years ago

Hey Can I work on it?

Yup! Assigned.

wookie184 commented 2 years ago

Hey Can I work on it?

Are you still interested in working on this? Did you get anywhere with identifying the cause of the error?