rameshvarun / showdownbot

A Pokemon Showdown battling AI.
68 stars 27 forks source link

What's wrong... #3

Open squareRoot3 opened 7 years ago

squareRoot3 commented 7 years ago

[2017-08-01 14:23:08.199] [WARN] bot - Did not recognize command of type: formats [2017-08-01 14:23:08.199] [TRACE] bot - << |queryresponse|rooms|null [2017-08-01 14:23:08.199] [WARN] bot - Did not recognize command of type: queryresponse [2017-08-01 14:23:08.199] [TRACE] bot - << |challstr|4|3e0a36696ad6099fdb4850f3f36de77f07a07a08302bf82db704bbf96313bd42f82f1beeb5afaed8501240379aa52cbac2cfc72f1ad88dd60f30ec08e302f68325c406d061f5cb2674cc002dab37e6edf18e30e8954751fbd137df81ef31ac7157fd7781e71954fe69784a3be67d41a285a04af5d5701b056a2933ae54b795fe [2017-08-01 14:23:08.200] [INFO] bot - Recieved challenge string... /home/tjh/work/fun/showdownbot-master/util.js:3 if (data.length < 1) return; ^

TypeError: Cannot read property 'length' of undefined at Object.module.exports.safeJSON (/home/tjh/work/fun/showdownbot-master/util.js:3:10) at Request._callback (/home/tjh/work/fun/showdownbot-master/bot.js:115:19) at self.callback (/home/tjh/work/fun/showdownbot-master/node_modules/request/request.js:188:22) at emitOne (events.js:96:13) at Request.emit (events.js:188:7) at Request.init (/home/tjh/work/fun/showdownbot-master/node_modules/request/request.js:460:17) at new Request (/home/tjh/work/fun/showdownbot-master/node_modules/request/request.js:130:8) at request (/home/tjh/work/fun/showdownbot-master/node_modules/request/index.js:54:10) at Function.post (/home/tjh/work/fun/showdownbot-master/node_modules/request/index.js:62:12) at rename (/home/tjh/work/fun/showdownbot-master/bot.js:104:10)

rameshvarun commented 7 years ago

This project was written in 2014, but when I last tested it, it seemed to work when I restricted the game mode to gen6randombattle.

The error that your receiving might be due a change in how Showdown communicates with clients. When I get the chance, I'll take a look and see if it's an easy fix or not.

Updating the bot to work with newer Pokemon and battle rules might be more complicated.