I have a project that suddenly stopped running correctly. I don't see why since I made no changes to it beforehand.
I get the following error when building it:
Traceback (most recent call last):
File ".\engine.py", line 7, in <module>
from controllers.game_panel_controller import GamePanelController
File "D:\Documents - HDD\Code\Allies_RL_Prototype\controllers\game_panel_controller.py", line 3, in <module>
import model.game as game
File "D:\Documents - HDD\Code\Allies_RL_Prototype\model\game.py", line 1, in <module>
from model.floor import Floor
File "D:\Documents - HDD\Code\Allies_RL_Prototype\model\floor.py", line 5, in <module>
from model.components.player_component import PlayerComponent
File "D:\Documents - HDD\Code\Allies_RL_Prototype\model\components\player_component.py", line 1, in <module>
import model.game as game
AttributeError: module 'model' has no attribute 'game'
Everything being read here is import statements and nothing else.
The folder structure here:
.
├──engine.py
├──controllers
| └──game_panel_controller.py
└──model
├──game.py
├──floor.py
└──components
└──player_component.py
The weird part is that the problematic statement is
import model.game as game
when just a few statements above it, it runs that exact line successfully. It's not like it's an invalid module or a nonexistent file. What's wrong with it? Why would it suddenly stop running normally?
This is happening on windows 10, Python 3.5.4rc1, using windows powershell executing the program like so:
python .\engine.py