jkcgs / alexis-bot

Another Discord bot, initially created for /r/chile's guild (https://discord.gg/chile)
https://alexisbot.mak.wtf/
MIT License
9 stars 7 forks source link

Comando !value roto #55

Closed lucio007 closed 5 years ago

lucio007 commented 6 years ago

El comando value no funciona a excepción de UTM y UF me parece.

santisteban commented 6 years ago

Por favor adjuntar el traceback cuando creen un issue.

jkcgs commented 6 years ago

El error se ha visto varias veces en el server, seguramente es referido a esto

image

jkcgs commented 6 years ago

Registro del error:

03-11-2017 23:59:32 | DEBUG    | [command] makzk#5585 sent message: "!value clp ars" command value
03-11-2017 23:59:32 | DEBUG    | Cargando datos de divisa, intento 1
03-11-2017 23:59:32 | DEBUG    | Sending message "ocurr.. 1.error c0n'el$##com@nd..
```'NoneType' object is not subscriptable```" to 198944348379938816#bots
03-11-2017 23:59:33 | ERROR    | 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/root/alexis/alexis.py", line 174, in on_message
    await i.handle(message, i.parse(message))
  File "/root/alexis/modules/commands/value/value.py", line 112, in handle
    value = await self.convert(div1, div2)
  File "/root/alexis/modules/commands/value/value.py", line 133, in convert
    value = float(data['query']['results']['rate']['Rate'])
TypeError: 'NoneType' object is not subscriptable
03-11-2017 23:59:33 | DEBUG    | [sw] makzk#5585 sent message: "!value clp ars" handler "!"
jkcgs commented 6 years ago

Lamentablemente la fuente desde la que se obtenían las divisas ha dejado de funcionar, y el bot no estaba manejando el problema correctamente. Me veo obligado a aplicar ténicas de scraping para obtenier dicha info desde otra fuente.

jkcgs commented 6 years ago

Queda pendiente agregar compatibilidad con BTC nuevamente.

jkcgs commented 5 years ago

Terminado en d31314f4f4e9397a5d0cf14475508f75e6456834 hace varios días jaja