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

ImportError: cannot import name InitialTransferWorker

Open noncicredo opened this issue 10 years ago • 11 comments

Expected Behavior

Starting the bot

Actual Behavior

Getting Import Error

Steps to Reproduce

The bot should start without problems

Other Information

OS: OSX 10.11.5 Python Version: 2.7.12

I decided to use MFizz set up to run the bot (I wanted something more "usefull" than the standard one, as this one can collect and open eggs); so I downloaded the entire PokemonGo folder and replaced the original one.

When I start the bot, I get this error

Traceback (most recent call last):
  File "pokecli.py", line 40, in <module>
    from pokemongo_bot import PokemonGoBot
  File "/Users/Alessio/PokemonGo-Bot/pokemongo_bot/__init__.py", line 17, in <module>
    from cell_workers import PokemonCatchWorker, SeenFortWorker, MoveToFortWorker, InitialTransferWorker, EvolveAllWorker
ImportError: cannot import name InitialTransferWorker

I also tried doing pip install requirements txt before starting the bot

Thanks for your help :)

noncicredo avatar Aug 01 '16 17:08 noncicredo

which folder did you download? the master or dev branch?

It would be easier to use git because that way you can keep track of what commit you're currently using and we can help you better.

xorinzor avatar Aug 01 '16 18:08 xorinzor

Thank you @xorinzor for your help I'm new to this ''world'' and I don't have any kind of skills about python and stuffs like that (but I can manage some ''codes'', if you what I mean)

Here you have the folder https://github.com/MFizz/PokemonGo-Bot/tree/dbc0e358d216527b684f449943d066104838f16a

I don't know if it's dev or master, but I'm pretty sure that I've installed the dev version of the Bot (replacing ''master'' with ''dev'' in the string/terminal)

What do you mean with ''git'' ? how does it work?

Thank for your time

noncicredo avatar Aug 01 '16 18:08 noncicredo

@noncicredo that does look like the dev branch, yes. However, it is about ~160 commits behind and a lot has changed since then.

I would recommend downloading the latest version.

The installation steps are described here: https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Installation

Just make sure to first install python, pip and git from the requirements section first (you can ignore the others, although it could be you need to install protobuf too) then follow these steps

$ git clone --recursive -b dev https://github.com/PokemonGoF/PokemonGo-Bot  
$ cd PokemonGo-Bot
$ pip install -r requirements.txt

Make sure to delete the PokemonGo-Bot directory before running the git clone command though

xorinzor avatar Aug 01 '16 18:08 xorinzor

I'm doing a fresh install as you suggested. Do you confirm that, installing the Dev one the Bot will manage the Eggs? (like hatch etc.) ? I should find the code about that on config.json right?

noncicredo avatar Aug 01 '16 19:08 noncicredo

@noncicredo yes, the latest version of the dev will incubate and hatch eggs too :)

I'd recommend starting with a new config though, it had a lot of changes

xorinzor avatar Aug 01 '16 19:08 xorinzor

You are very kind, so I'll push it a bit more :P (don't hate me) Today I run the standard config, so my pg just run around the area, catching pokemons transferring them and spinning pokestops. I'd like to do this thing: Catching and spinning till lvl 20; as soon as I reach that lvl, it would be great if i could select some pokemons to keep (according to iv/cp); I saw there is already a feature for this thing, but I'm very afraid that I could mess up again the entire code... so, do you have any pre-made config.json to suggest? Just something like easy to understand and, in case, to edit

Thank you a lot!

noncicredo avatar Aug 01 '16 19:08 noncicredo

If you scroll towards the bottom you'll find what you're looking for https://github.com/PokemonGoF/PokemonGo-Bot/blob/dev/configs/config.json.pokemon.example

I'd also recommend you to hop onto SLACK for more questions, lots of people to help you out over there ;)

xorinzor avatar Aug 01 '16 19:08 xorinzor

I was just reading that config file ^^ Btw, I did registered to slack, but ... how can I join the channel/chat? Couldn't find the right way :P

noncicredo avatar Aug 01 '16 19:08 noncicredo

Just go back to https://pokemongo-bot.slack.com/

then in the (left) sidebar around the top you'll find the different channels (general, help and random).

If this issue is solved, can you close it?

xorinzor avatar Aug 01 '16 19:08 xorinzor

just one more question

when I have something like ""evolve_all": "NONE",
if I want to evolve every single pokemon I can, what should I type? ALL? or ANY?

thank you again

noncicredo avatar Aug 01 '16 19:08 noncicredo

all

https://github.com/PokemonGoF/PokemonGo-Bot/wiki/Configuration-files

xorinzor avatar Aug 01 '16 19:08 xorinzor