talkpython / mastering-pycharm-course

Course demos and handouts for Talk Python's Effective PyCharm course
https://training.talkpython.fm/courses/explore_pycharm/mastering-pycharm-ide
GNU General Public License v2.0
1.12k stars 716 forks source link

bad_wizard missing Wizard.attack() function #25

Closed jgoldfed closed 4 years ago

jgoldfed commented 4 years ago

Class Wizard in 2-the editor folder is missing an the .attack() function. This is causing an unresolved reference in the program.py file (note, this was probably a miss, but could be added to instructions on how to resolve)

jgoldfed commented 4 years ago

Actually, on my machine, we are calling the wrong import function: your-turn/2-the-editor/bad_wizard/actors.py does contain the attack function, program.py (same directory) is callilng demos/wizard/actors.py which does not contain the attack function. This is causing the problem.

mikeckennedy commented 4 years ago

Ah, glad you figured it out. Probably you have both sections loaded in PyCharm and both have "mark directory as source root" set. At least, that's what trips me up when I hit this type of error.