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

Bugs and Improvements

Open seehuily opened this issue 10 years ago • 3 comments

`diff --git a/pokemongo_bot/init.py b/pokemongo_bot/init.py index 3f5c0eb..6bb26de 100644 --- a/pokemongo_bot/init.py +++ b/pokemongo_bot/init.py

@@ -538,18 +558,28 @@ class PokemonGoBot(object): cells = self.find_close_cells(*location)

     user_data_cells = os.path.join(_base_dir, 'data', 'cells-%s.json' % self.config.username)
  •    with open(user_data_cells, 'w') as outfile:
    
  •        json.dump(cells, outfile)
    
  •    try:
    
  •        with open(user_data_cells, 'w') as outfile:
    
  •            json.dump(cells, outfile)
    
  •    except IOError as e:
    
  •        self.logger.info('[x] Error while opening location file: %s' % e)
    

@@ -695,10 +725,10 @@ class PokemonGoBot(object): full_path = path + '/'+ file_name if not os.path.isfile(full_path): self.logger.error(file_name + ' is not found! Please place it in the bots root directory or set encrypt_location in config.')

  •        self.logger.info('Platform: '+ _platform + ' Encrypt.so directory: '+ path)
    
  •        self.logger.info('Platform: '+ _platform + ' ' + file_name + ' directory: '+ path)
         sys.exit(1)
     else:
    
  •        self.logger.info('Found '+ file_name +'! Platform: ' + _platform + ' Encrypt.so directory: ' + path)
    
  •        self.logger.info('Found '+ file_name +'! Platform: ' + _platform + ' ' + file_name + ' directory: ' + path)
    

@@ -832,8 +884,11 @@ class PokemonGoBot(object):

     user_web_inventory = os.path.join(_base_dir, 'web', 'inventory-%s.json' % self.config.username)
  •    with open(user_web_inventory, 'w') as outfile:
    
  •        json.dump(inventory_dict, outfile)
    
  •    try:
    
  •        with open(user_web_inventory, 'w') as outfile:
    
  •            json.dump(inventory_dict, outfile)
    
  •    except IOError as e:
    
  •        self.logger.info('[x] Error while opening location file: %s' % e)
    

diff --git a/pokemongo_bot/inventory.py b/pokemongo_bot/inventory.py index c59ba4b..cbc78b3 100644 --- a/pokemongo_bot/inventory.py +++ b/pokemongo_bot/inventory.py @@ -1071,8 +1071,11 @@ class Inventory(object): i.refresh(inventory)

     user_web_inventory = os.path.join(_base_dir, 'web', 'inventory-%s.json' % (self.bot.config.username))
  •    with open(user_web_inventory, 'w') as outfile:
    
  •        json.dump(inventory, outfile)
    
  •    try:
    
  •        with open(user_web_inventory, 'w') as outfile:
    
  •            json.dump(inventory, outfile)
    
  •    except IOError as e:
    
  •        errmsg = '[x] Error while opening location file: user_web_inventory'
    

Also colored_logging_handler.py is not working in Windows, unless comment out below: diff --git a/pokemongo_bot/cell_workers/utils.py b/pokemongo_bot/cell_workers/utils.py index 946c757..eb26229 100644 --- a/pokemongo_bot/cell_workers/utils.py +++ b/pokemongo_bot/cell_workers/utils.py @@ -9,7 +9,7 @@ from networkx.algorithms.clique import find_cliques import networkx as nx import numpy as np

-init() +#init() `

seehuily avatar Aug 16 '16 05:08 seehuily

Please follow issue template

k4n30 avatar Aug 16 '16 05:08 k4n30

I did code review and made fix for that. I pasted a patch but looks like it's not showing correctly. :(

seehuily avatar Aug 16 '16 05:08 seehuily

that what pull requests are for, dont paste issues with code in them, read the readme for pull request info

k4n30 avatar Aug 16 '16 07:08 k4n30