superboum / cleverbot

A python3 binding of cleverbot wich support special characters
3 stars 7 forks source link

urllib.error.HTTPerror: HTTP Error 404: Not Found #5

Open RomanSC opened 8 years ago

RomanSC commented 8 years ago

Hey Quentin, this is a really neat library. Thanks for making it.

I'm having an issue testing your library. I run this, like you mention on the readme page:

import cleverbot

myBot = cleverbot.Session()
answer = myBot.Ask("Hello there")
print(answer)

But when I try to run myBot.Ask("Hello there'), I get 404 errors. Here's the full output:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/roman/github/Introduction-to-Programming-with-Python/mid-term/cleverbot.py", line 41, in Ask
    asw=self.Send()
  File "/home/roman/github/Introduction-to-Programming-with-Python/mid-term/cleverbot.py", line 34, in Send
    with urllib.request.urlopen(req,None,5000) as url:
  File "/usr/lib/python3.5/urllib/request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 472, in open
    response = meth(req, response)
  File "/usr/lib/python3.5/urllib/request.py", line 582, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.5/urllib/request.py", line 510, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 444, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/urllib/request.py", line 590, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Thanks, Roman

RomanSC commented 8 years ago

This here seems to be the problem: http://www.cleverbot.com/webservicemin

superboum commented 8 years ago

Thanks for reporting this error, I'll look at it ASAP :D