sugarlabs / cartoon-builder

GNU General Public License v2.0
1 stars 9 forks source link

Global name 'theme' is not defined #2

Closed quozl closed 7 years ago

quozl commented 7 years ago

@zeecoder606, this error occurs when the reset button is clicked;

Traceback (most recent call last):
  File "/home/guest/Activities/CartoonBuilder.activity/activity.py", line 139, in __clear_tape_cb
    for i in range(theme.TAPE_COUNT):
NameError: global name 'theme' is not defined

And the reset does not happen.

chimosky commented 7 years ago

It happened because of the call to 'theme.TAPE_COUNT' which doesn't exist because of the import on line 36 so it's been changed to 'TAPE_COUNT'. Fix @https://github.com/sugarlabs/cartoon-builder/pull/5, works fine now.