Dentosal / python-sc2

A StarCraft II bot api client library for Python 3
MIT License
588 stars 182 forks source link

cannot import name 'run_game' #307

Closed prismspecs closed 4 years ago

prismspecs commented 4 years ago

I've looked over and done a few suggested fixes, such as changing my SC2 dir in paths.py and making sure I have the Maps/ directory structure correct. Oh and I downgraded to 3.6. When I run the basic script:

import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer

class SentdeBot(sc2.BotAI):
    async def on_step(self, iteration):
        # what to do every step
        await self.distribute_workers()  # in sc2/bot_ai.py

run_game(maps.get("AbyssalReefLE"), [
    Bot(Race.Protoss, SentdeBot()),
    Computer(Race.Terran, Difficulty.Easy)
], realtime=True)

I get cannot import name 'run_game'

prismspecs commented 4 years ago

I had named my script sc2.py ... oi vey, sorry.