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

Bugs and Improvements #4057

Closed
seehuily opened this issue Aug 16, 2016 · 3 comments
Closed

Bugs and Improvements #4057

seehuily opened this issue Aug 16, 2016 · 3 comments

Comments

@seehuily
Copy link
Contributor

seehuily commented Aug 16, 2016

`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()
`

@k4n30
Copy link
Contributor

k4n30 commented Aug 16, 2016

Please follow issue template

@k4n30 k4n30 closed this as completed Aug 16, 2016
@seehuily
Copy link
Contributor Author

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

@k4n30
Copy link
Contributor

k4n30 commented Aug 16, 2016

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

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

2 participants