Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stardust count error on new account #5883

Closed
davidakachaos opened this issue Jan 20, 2017 · 0 comments
Closed

Stardust count error on new account #5883

davidakachaos opened this issue Jan 20, 2017 · 0 comments

Comments

@davidakachaos
Copy link
Contributor

Expected Behavior

No crash, just set it to 0 and continue

Actual Behavior

Traceback (most recent call last):
  File "pokecli.py", line 865, in <module>
    main()
  File "pokecli.py", line 206, in main
    bot.tick()
  File "/home/david/Broncode/personal/PokemonGo-Bot/pokemongo_bot/__init__.py", line 770, in tick
    if worker.work() == WorkerResult.RUNNING:
  File "/home/david/Broncode/personal/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_optimizer.py", line 127, in work
    self.open_inventory()
  File "/home/david/Broncode/personal/PokemonGo-Bot/pokemongo_bot/cell_workers/pokemon_optimizer.py", line 294, in open_inventory
    self.ongoing_stardust_count = self.bot.stardust
  File "/home/david/Broncode/personal/PokemonGo-Bot/pokemongo_bot/__init__.py", line 75, in stardust
    return filter(lambda y: y['name'] == 'STARDUST', self._player['currencies'])[0]['amount']
KeyError: u'amount'

This happens on a fresh new account.

Output when issue occurred

Se above

Steps to Reproduce

Create a new account, run the bot from master.

Other Information

OS: Ubuntu
Branch: master
Git Commit: ce54971

davidakachaos added a commit to davidakachaos/PokemonGo-Bot that referenced this issue Jan 20, 2017
This fixes an issue when you have a brand new account (no stardust yet)
and run the bot. This makes sure the key is there before we do something
with it.
BreezeRo pushed a commit that referenced this issue Jan 27, 2017
* Added Total Stardust to UpdateLiveStats task (#5874)

* added Total Stardust to UpdateLiveStats task

* fixes to tests, thanks to @nelsyeung

* enabled option to log to file (#5881)

* Fixes #5883 (#5884)

This fixes an issue when you have a brand new account (no stardust yet)
and run the bot. This makes sure the key is there before we do something
with it.

* removing proto and protobuf and changing pogoapi to dev

* removing proto and protobuf, changing pogoapi to dev branch, fixing docs and install scripts
solderzzc pushed a commit that referenced this issue Jan 30, 2017
* Proto requirements fix (#5888)

* Added Total Stardust to UpdateLiveStats task (#5874)

* added Total Stardust to UpdateLiveStats task

* fixes to tests, thanks to @nelsyeung

* enabled option to log to file (#5881)

* Fixes #5883 (#5884)

This fixes an issue when you have a brand new account (no stardust yet)
and run the bot. This makes sure the key is there before we do something
with it.

* removing proto and protobuf and changing pogoapi to dev

* removing proto and protobuf, changing pogoapi to dev branch, fixing docs and install scripts

* Prevent bouncing between 2 forts

Added simple logic to prevent bouncing between 2 forts when using Polyline walker

* Original fixes by Anakin5

Original PR by Anakin5 which fixes the following:
#5407
Fix step walker timing issue. This solve some problems where we were moving more than the configured speed from time to time.
Improve a bit the computation speed of step_walker get_next_step
pep8 fixes

* Prevent bouncing between 2 forts

Added simple logic to prevent bouncing between 2 forts when using Polyline walker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant