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

Sniper issues #5553

Closed
Gobberwart opened this issue Sep 19, 2016 · 1 comment
Closed

Sniper issues #5553

Gobberwart opened this issue Sep 19, 2016 · 1 comment

Comments

@Gobberwart
Copy link
Contributor

First off, let me say the new Sniper is excellent in concept, but I'm encountering a few difficulties getting it working properly as follows:

  1. If using social, everything works great so YAY :)
  2. If using url mode, I get a bot crash with error [ERROR] [u'IndexError: list index out of range. I can work around this by changing line 383 in sniper.py to pokemon_name = pokemon['pokemon_name'] but that's just a bandaid.
  3. Once I've done that, if using url with Pokemongo-Map (localhost:5000/raw_data), I get error (Source 'http://localhost:5000/raw_data' contains errors. Details: The following params dont exist: iv.) Could be my pokemongo-map config? Or something else?
  4. If using http://pokesnipers.com/api/v1/pokemon.json, it teleports there and back, but everything gives me a does not exist error. Not sure if issue is with bot or pokesnipers.

I haven't bothered including my full config etc as everything else is fine. Here's my current "Sniper" config, which I'm running with modified line 383 as mentioned in 2 above.

        "type": "Sniper",
        "config": {
            "enabled": true,
            "mode": "url",
            "bullets": 3,
            "homing_shots": true,
            "special_iv": 100,
            "order": ["missing", "iv", "priority", "vip", "expiration_timestamp_ms"],
            "sources": [
                {
                    "url": "http://localhost:5000/raw_data",
                    "key": "pokemons",
                    "mappings": {
                        "iv": { "param": "iv" },
                        "id": { "param": "pokemon_id" },
                        "name": { "param": "pokemon_name" },
                        "latitude": { "param": "latitude" },
                        "longitude": { "param": "longitude" },
                        "expiration": { "param": "disappear_time", "format": "milliseconds" }
                    },
                    "url": "http://pokesnipers.com/api/v1/pokemon.json",
                    "key": "results",
                    "mappings": {
                        "iv": { "param": "iv" },
                        "id": { "param": "id" },
                        "name": { "param": "name" },
                        "latitude": { "param": "coords" },
                        "longitude": { "param": "coords" },
                        "expiration": { "param": "until", "format": "utc" }
                    }
                }
            ],
            "catch": {
                "Snorlax": 1000,
                "Dragonite": 1000,
                "Growlithe": 600,
                "Kabuto": 500,
                "Dratini": 500,
                "Dragonair": 500,
                "Mr. Mime": 500,
                "Magmar": 500,
                "Electabuzz": 500,
                "Tauros": 500,
                "Mankey": 500,
                "Primeape": 500,
                "Chansey": 500,
                "Farfetch'd": 500
            }
        }
      },

Result from this is

[2016-09-20 08:43:16] [    Sniper] [INFO] Teleporting to meet Dratini (40.765892; -73.974508)...
[2016-09-20 08:43:21] [    Sniper] [INFO] Damn! Its not here. Reasons: too far, caught, expired or fake data. Skipping...
[2016-09-20 08:43:21] [    Sniper] [INFO] Teleporting back to the old position (-37.8181876802; 144.961045918)...
@Gobberwart
Copy link
Contributor Author

OK, spoke to @YvesHenri and issues 2 and 4 are caused by the "id" parameter in the pokesnipers.com config. Remove and it works correctly.

Issue 3 is caused by lack of 'iv' property in localhost:5000/raw_data. Remove iv param in config, and it works.

Nothing to see here :)

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