PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

TypeError: object of type 'bool' has no len()

Open mizhgan opened this issue 10 years ago • 4 comments

Please check configuration at http://jsonlint.com/ before posting an issue.

Expected Behavior

Actual Behavior

Traceback (most recent call last):
  File "./pokecli.py", line 521, in <module>    main()
  File "./pokecli.py", line 95, in main
    bot.tick()
  File "/home/mizhgan/Projects/clones/pogobot-dev/PokemonGo-Bot/pokemongo_bot/__init__.py", line 449, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/home/mizhgan/Projects/clones/pogobot-dev/PokemonGo-Bot/pokemongo_bot/cell_workers/catch_lured_pokemon.py", line 16, in work
    if len(lured_pokemon) > 0:
TypeError: object of type 'bool' has no len()
2016-08-09 12:37:01,174 [sentry.errors] [ERROR] Sentry responded with an error: 'module' object has no attribute 'HTTPSHandler' (url: https://app.getsentry.com/api/90254/store/)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/raven/transport/threaded.py", line 174, in send_sync
    super(ThreadedHTTPTransport, self).send(data, headers)
  File "/usr/local/lib/python2.7/dist-packages/raven/transport/http.py", line 47, in send
    ca_certs=self.ca_certs,  File "/usr/local/lib/python2.7/dist-packages/raven/utils/http.py", line 44, in urlopen
    class ValidHTTPSHandler(urllib2.HTTPSHandler):AttributeError: 'module' object has no attribute 'HTTPSHandler'
2016-08-09 12:37:01,174 [sentry.errors.uncaught] [ERROR] [u"TypeError: object of type 'bool' has no len()", u'  File "pokecli.py", line 521, in <module>', u'  File "pokecli.py", line 95, in main', u'  File "pokemongo_bot/__init__.py", line 449, in tick', u'  File "pokemongo_bot/cell_workers/catch_lured_pokemon.py", line 16, in work']

Steps to Reproduce

run latest dev

Other Information

Also sentry reporting does not work as you can see.

OS: Debian 7 x64 Git Commit: 4c95259c25543b483a539a928ae67e7e590778f3 Python Version: Python 2.7.3

mizhgan avatar Aug 09 '16 09:08 mizhgan

here?

https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/pokemongo_bot/cell_workers/catch_lured_pokemon.py#L16-L30

nearalias avatar Aug 09 '16 10:08 nearalias

my temp fix, change line 16 in catch_lured_pokemon.py from if len(lured_pokemon) > 0: to if (not isinstance(lured_pokemon, bool)) and (len(lured_pokemon) > 0):

chadhao avatar Aug 09 '16 11:08 chadhao

@mizhgan are you still experiencing this on the latest version?

k4n30 avatar Aug 12 '16 04:08 k4n30

No, it`s ok now.

2016-08-12 7:41 GMT+03:00 k4n30 [email protected]:

@mizhgan https://github.com/mizhgan are you still experiencing this on the latest version?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PokemonGoF/PokemonGo-Bot/issues/3248#issuecomment-239359695, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmSkI3ECBj6nvmGMo_uZ5_7-pUdl0c3ks5qe_mRgaJpZM4Jf5zD .

mizhgan avatar Aug 12 '16 05:08 mizhgan