NameError: name 'json' is not defined #453

Closed
zgoda opened this Issue Jun 13, 2017 · 0 comments

Comments

Projects
None yet
1 participant
Contributor

zgoda commented Jun 13, 2017

What I tried:

$ umake games superpowers

What I got:

ERROR: Unhandled exception
Traceback (most recent call last):
  File "/home/jazg/src/ubuntu-make/umake/frameworks/games.py", line 286, in get_metadata_and_check_license
    assets = json.loads(page.buffer.read().decode())["assets"]
NameError: name 'json' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jazg/src/ubuntu-make/umake/tools.py", line 158, in wrapper
    function(*args, **kwargs)
  File "/home/jazg/src/ubuntu-make/umake/frameworks/games.py", line 293, in get_metadata_and_check_license
    except (json.JSONDecodeError, IndexError):
NameError: name 'json' is not defined

This is in current master from git but I'm getting the same from version installed from PPA (16.02.1). Indeed, import json is missing in frameworks/games.py:

$ flake8 umake/frameworks/games.py | grep json
umake/frameworks/games.py:286:22: F821 undefined name 'json'
umake/frameworks/games.py:293:17: F821 undefined name 'json'

@didrocks didrocks closed this in 063efd5 Jun 13, 2017

didrocks added a commit that referenced this issue Jun 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment