pierredavidbelanger / chatter-bot-api

A Mono/.NET, JAVA, Python and PHP chatter bot API that supports Cleverbot, JabberWacky and Pandorabots.
182 stars 71 forks source link

Webservicemin 404? #18

Closed applejag closed 9 years ago

applejag commented 9 years ago

I am getting this error when I am trying to do a simple session.think(str):

java.io.FileNotFoundException: http://www.cleverbot.com/webservicemin
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
    at com.google.code.chatterbotapi.Utils.post(Utils.java:71)
    at com.google.code.chatterbotapi.Cleverbot$Session.think(Cleverbot.java:59)
    at com.google.code.chatterbotapi.Cleverbot$Session.think(Cleverbot.java:99)

This is the script:

ChatterBotFactory factory = new ChatterBotFactory();

try
{
    ChatterBot bot = factory.create(ChatterBotType.CLEVERBOT);
    ChatterBotSession session = bot.createSession();

    LogHelper.info("Me > bot: Hi");
    LogHelper.info("Bot > me: " + session.think("Hi"));
}
catch (Exception e)
{
    e.printStackTrace();
}

I saw that you mentioned in #15 that the site now requires cookies, and I am mistaking that the java version isn't up to date. Not sure tho.

I got the chatter-bot-api via maven so maybe that's not up to date...?

applejag commented 9 years ago

Yea I just compared the source on my end with the source here (link) and they are totally different.

I am using chatter-bot-api v1.3.2 that you've specified in your README.md

applejag commented 9 years ago

Ok haha I just changed the version on my maven dependency from 1.3.2 to LATEST (help from this post) and it got a different version that now works :yum:

Call me noob but I'm not that experienced with maven.

So just change the README to have the latest stable version instead :smiley:

pierredavidbelanger commented 9 years ago

Oh, thank you for noticing this. I made the change to the README. Thank you!