skoczen / will

Will is a simple, beautiful-to-code bot for slack, hipchat, and a whole lot more.
https://heywill.io
MIT License
406 stars 171 forks source link

image me fails frequently (suspected throttling on google end) #68

Closed rustyrazorblade closed 9 years ago

rustyrazorblade commented 10 years ago

I get this quite a bit:

Traceback (most recent call last):
  File "/home/meatbot/.virtualenvs/meatbot/local/lib/python2.7/site-packages/will/listener.py", line 148, in fn
    listener["fn"](*args, **kwargs)
  File "/home/meatbot/.virtualenvs/meatbot/local/lib/python2.7/site-packages/will/decorators.py", line 6, in wrapped_f
    f(*args, **kwargs)
  File "/home/meatbot/.virtualenvs/meatbot/local/lib/python2.7/site-packages/will/plugins/productivity/images.py", line 19, in image_me
    results = r.json()["responseData"]["results"]
TypeError: 'NoneType' object has no attribute '__getitem__'

But google image search does return images. This has been happening with the search term "jim webber" today, with will==0.5.7

Is it possible my bot is being throttled?

rustyrazorblade commented 10 years ago

I suspect the bot is being throttled, because waiting a couple of minutes then trying again works.

dpoirier commented 10 years ago

Seeing the same thing. And it's not like we use "image me" very often.

skoczen commented 10 years ago

That error was an unhandled exception when google returned no results - this should have been fixed in 0.6.0. What version of will are you both using, @rustyrazorblade , @dpoirier ?

Also, I have strong concern that 0.6.0 contains a critical bug that's causing will to drop off chat, that came in on one of the PRs - if either of you are using > 0.6, please let me know if your will's been stable!

rustyrazorblade commented 10 years ago

It looks like I was running an old version of the lib, I'll upgrade now.

skoczen commented 10 years ago

@rustyrazorblade great, please let me know if you see will drop out of your chat rooms once you do. Thanks!

dpoirier commented 10 years ago

Now I'm not sure if I should upgrade to fix the 'image me' problem at the risk of having Will drop out of chat rooms altogether...

skoczen commented 10 years ago

@dpoirier totally your call - if you do have that issue, you can downgrade to 0.5.7, ping me here, and I'll have a fix out pronto. The fix I have is to pull the shared instance improvements - that fixes what I'm seeing here, but I want to have more data points before I remove functionality.

skoczen commented 9 years ago

@dpoirier as an update, for what it's worth, I've been running the latest will in two instances for three weeks now without a dropout or similar problems. I'd suspect you're good to go.

rustyrazorblade commented 9 years ago

I haven't seen it in a while either, but I haven't upgraded or changed anything. My bot's been running for a couple weeks now without issue.

skoczen commented 9 years ago

This hasn't shown up for me in a few months. Closing - please reopen if you still see it!