kernelmachine / haveibeenpwned

Python interface to Have I Been Pwned API

Repository from Github https://github.comkernelmachine/haveibeenpwnedRepository from Github https://github.comkernelmachine/haveibeenpwned

RecursionError: maximum recursion depth exceeded while calling a Python object

athenabjorg opened this issue · comments

I was having problem with importing HIBP so I just downloaded the file and added it to my directory.
But then I got the error shown in the title. I'm leaving a comment in case it happens to someone else.

To fix it put the gevent import statement above the requests statement, like this:

try:
    import gevent
    from gevent import monkey
    from gevent.pool import Pool
except ImportError:
    raise RuntimeError('Gevent is required for hibp.')

monkey.patch_all(thread=False, select=False)

try:
    import requests
except ImportError:
    raise RuntimeError('Requests is required for hibp.')