{"action":"created","issue":{"url":"https://api.github.com/repos/holgern/beem/issues/87","repository_url":"https://api.github.com/repos/holgern/beem","labels_url":"https://api.github.com/repos/holgern/beem/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/holgern/beem/issues/87/comments","events_url":"https://api.github.com/repos/holgern/beem/issues/87/events","html_url":"https://github.com/holgern/beem/issues/87","id":365222902,"node_id":"MDU6SXNzdWUzNjUyMjI5MDI=","number":87,"title":"beempy power gives divide by zero error for accounts with 0 SP","user":{"login":"steemsidequest","id":43722866,"node_id":"MDQ6VXNlcjQzNzIyODY2","avatar_url":"https://avatars2.githubusercontent.com/u/43722866?v=4","gravatar_id":"","url":"https://api.github.com/users/steemsidequest","html_url":"https://github.com/steemsidequest","followers_url":"https://api.github.com/users/steemsidequest/followers","following_url":"https://api.github.com/users/steemsidequest/following{/other_user}","gists_url":"https://api.github.com/users/steemsidequest/gists{/gist_id}","starred_url":"https://api.github.com/users/steemsidequest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steemsidequest/subscriptions","organizations_url":"https://api.github.com/users/steemsidequest/orgs","repos_url":"https://api.github.com/users/steemsidequest/repos","events_url":"https://api.github.com/users/steemsidequest/events{/privacy}","received_events_url":"https://api.github.com/users/steemsidequest/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-30T13:00:15Z","updated_at":"2018-09-30T14:30:51Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nIn playing around with beempy this morning I found that since accounts can be created with 0 SP, using beempy to look up account power can lead to division by zero:\r\n\r\n```\r\n$ beempy power scms-sc\r\n\r\n@scms-sc\r\nTraceback (most recent call last):\r\n  File \"/Environments/alpha/bin/beempy\", line 11, in <module>\r\n    sys.exit(cli())\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/click/core.py\", line 764, in __call__\r\n    return self.main(*args, **kwargs)\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/click/core.py\", line 717, in main\r\n    rv = self.invoke(ctx)\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/click/core.py\", line 1163, in invoke\r\n    rv.append(sub_ctx.command.invoke(sub_ctx))\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/click/core.py\", line 956, in invoke\r\n    return ctx.invoke(self.callback, **ctx.params)\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/click/core.py\", line 555, in invoke\r\n    return callback(*args, **kwargs)\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/beem/cli.py\", line 974, in power\r\n    a.print_info(use_table=True)\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/beem/account.py\", line 320, in print_info\r\n    vote_mana = self.get_manabar()\r\n  File \"/Environments/alpha/lib/python3.6/site-packages/beem/account.py\", line 403, in get_manabar\r\n    estimated_pct = estimated_mana / estimated_max * 100\r\nZeroDivisionError: division by zero\r\n```\r\nI'm sorry I don't know the fix (adding some prettier error handling code somewhere?), I don't know much python."},"comment":{"url":"https://api.github.com/repos/holgern/beem/issues/comments/425724769","html_url":"https://github.com/holgern/beem/issues/87#issuecomment-425724769","issue_url":"https://api.github.com/repos/holgern/beem/issues/87","id":425724769,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTcyNDc2OQ==","user":{"login":"crokkon","id":33018033,"node_id":"MDQ6VXNlcjMzMDE4MDMz","avatar_url":"https://avatars1.githubusercontent.com/u/33018033?v=4","gravatar_id":"","url":"https://api.github.com/users/crokkon","html_url":"https://github.com/crokkon","followers_url":"https://api.github.com/users/crokkon/followers","following_url":"https://api.github.com/users/crokkon/following{/other_user}","gists_url":"https://api.github.com/users/crokkon/gists{/gist_id}","starred_url":"https://api.github.com/users/crokkon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crokkon/subscriptions","organizations_url":"https://api.github.com/users/crokkon/orgs","repos_url":"https://api.github.com/users/crokkon/repos","events_url":"https://api.github.com/users/crokkon/events{/privacy}","received_events_url":"https://api.github.com/users/crokkon/received_events","type":"User","site_admin":false},"created_at":"2018-09-30T14:30:51Z","updated_at":"2018-09-30T14:30:51Z","author_association":"CONTRIBUTOR","body":"which beem version are you using? This should be fixed with [0.20.4](https://github.com/holgern/beem/commit/39476777d25e6bf6cd2337a10ff03f75c8cfe096)\r\n```\r\n# beempy power scms-sc\r\n\r\n@scms-sc\r\n+-----------------------------+------------------------+\r\n| Key                         | Value                  |\r\n+-----------------------------+------------------------+\r\n| Name (rep)                  | scms-sc (25.00)        |\r\n| Voting Power                | 24.69 %,               |\r\n| Vote Value                  | 0.00 $                 |\r\n| Last vote                   | 427310:27:57 ago       |\r\n| Full in                     | 90:22:29               |\r\n| Steem Power                 | 0.00 STEEM             |\r\n| Balance                     | 0.000 STEEM, 0.000 SBD |\r\n| Remaining RC                | 100.00 %               |\r\n| Remaining RC                | (6 G RC of 6 G RC)     |\r\n| Full in                     | 0:00:00                |\r\n| Est. RC for a comment       | 1.51 G RC              |\r\n| Est. RC for a vote          | 0.31 G RC              |\r\n| Est. RC for a transfer      | 0.12 G RC              |\r\n| Est. RC for a custom_json   | 0.18 G RC              |\r\n| Comments with current RC    | 4 comments             |\r\n| Votes with current RC       | 19 votes               |\r\n| Transfer with current RC    | 50 transfers           |\r\n| Custom_json with current RC | 33 transfers           |\r\n+-----------------------------+------------------------+\r\n```"}}
{"actor":{"display_login":"crokkon"}}