Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

World: the 'principle_selection_rates' code is throwing a weird exception #308

Closed
toconnell opened this issue Oct 12, 2017 · 2 comments
Closed

Comments

@toconnell
Copy link
Owner

From the production API logs:

[2017-10-12 14:39:05] ERROR:    Exception caught while refreshing 'principle_selection_rates' asset!
[2017-10-12 14:39:05] ERROR:    global name 'alert' is not defined
Traceback (most recent call last):
  File "/home/toconnell/kdm-manager/v2/api/world.py", line 118, in refresh_asset
    self.update_asset_dict(asset_dict)
  File "/home/toconnell/kdm-manager/v2/api/world.py", line 160, in update_asset_dict
    exec "value = self.%s()" % asset_dict["handle"]
  File "<string>", line 1, in <module>
  File "/home/toconnell/kdm-manager/v2/api/world.py", line 764, in principle_selection_rates
    mep_dict = I.get_mutually_exclusive_principles()
  File "/home/toconnell/kdm-manager/v2/api/models/innovations.py", line 47, in get_mutually_exclusive_principles
    alternatives_list = [self.get_asset(option)["name"], self.get_asset(option)["handle"]]
  File "/home/toconnell/kdm-manager/v2/api/Models.py", line 186, in get_asset
    raise utils.InvalidUsage(msg)
  File "/home/toconnell/kdm-manager/v2/api/utils.py", line 503, in __init__
    alert()
NameError: global name 'alert' is not defined
@toconnell
Copy link
Owner Author

This was a missing 'self' in the init() method.

@toconnell
Copy link
Owner Author

Yeah, this looks resolved now. I'm closing this out: it will go out in the next release.

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

No branches or pull requests

1 participant