{"action":"opened","issue":{"url":"https://api.github.com/repos/spesmilo/electrum/issues/4771","repository_url":"https://api.github.com/repos/spesmilo/electrum","labels_url":"https://api.github.com/repos/spesmilo/electrum/issues/4771/labels{/name}","comments_url":"https://api.github.com/repos/spesmilo/electrum/issues/4771/comments","events_url":"https://api.github.com/repos/spesmilo/electrum/issues/4771/events","html_url":"https://github.com/spesmilo/electrum/issues/4771","id":369656615,"node_id":"MDU6SXNzdWUzNjk2NTY2MTU=","number":4771,"title":"Invalid format specifier: .01f","user":{"login":"pooler","id":1183229,"node_id":"MDQ6VXNlcjExODMyMjk=","avatar_url":"https://avatars1.githubusercontent.com/u/1183229?v=4","gravatar_id":"","url":"https://api.github.com/users/pooler","html_url":"https://github.com/pooler","followers_url":"https://api.github.com/users/pooler/followers","following_url":"https://api.github.com/users/pooler/following{/other_user}","gists_url":"https://api.github.com/users/pooler/gists{/gist_id}","starred_url":"https://api.github.com/users/pooler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pooler/subscriptions","organizations_url":"https://api.github.com/users/pooler/orgs","repos_url":"https://api.github.com/users/pooler/repos","events_url":"https://api.github.com/users/pooler/events{/privacy}","received_events_url":"https://api.github.com/users/pooler/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-12T18:12:50Z","updated_at":"2018-10-12T18:12:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"70cca3b appears to break Electrum on Python 3.7. When starting the GUI I get:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"electrum/electrum/gui/qt/__init__.py\", line 242, in start_new_window\r\n    w = self.create_window_for_wallet(wallet)\r\n  File \"electrum/electrum/gui/qt/__init__.py\", line 191, in create_window_for_wallet\r\n    w = ElectrumWindow(self, wallet)\r\n  File \"electrum/electrum/gui/qt/main_window.py\", line 146, in __init__\r\n    self.send_tab = self.create_send_tab()\r\n  File \"electrum/electrum/gui/qt/main_window.py\", line 1153, in create_send_tab\r\n    self.fee_slider = FeeSlider(self, self.config, fee_cb)\r\n  File \"electrum/electrum/gui/qt/fee_slider.py\", line 19, in __init__\r\n    self.update()\r\n  File \"electrum/electrum/gui/qt/fee_slider.py\", line 49, in update\r\n    tooltip = self.get_tooltip(pos, fee_rate)\r\n  File \"electrum/electrum/gui/qt/fee_slider.py\", line 36, in get_tooltip\r\n    target, estimate = self.config.get_fee_text(pos, self.dyn, mempool, fee_rate)\r\n  File \"electrum/electrum/simple_config.py\", line 404, in get_fee_text\r\n    rate_str = format_fee_satoshis(fee_rate/1000) + ' sat/byte'\r\n  File \"electrum/electrum/util.py\", line 544, in format_fee_satoshis\r\n    return format_satoshis(fee, num_zeros, 0, precision=FEERATE_PRECISION)\r\n  File \"electrum/electrum/util.py\", line 524, in format_satoshis\r\n    result = (\"{:\" + decimal_format + \"f}\").format(x / scale_factor)\r\n  File \"/usr/lib/python3.7/_pydecimal.py\", line 3762, in __format__\r\n    spec = _parse_format_specifier(specifier, _localeconv=_localeconv)\r\n  File \"/usr/lib/python3.7/_pydecimal.py\", line 6192, in _parse_format_specifier\r\n    raise ValueError(\"Invalid format specifier: \" + format_spec)\r\n```\r\n\r\nAs far as I can tell the issue is due to the extra zero right after the decimal point (see [this line](https://github.com/spesmilo/electrum/commit/70cca3bad9a40b5b5230e13c0d2fce7ae1312b53#diff-fca387ea434f3be37124dd66cbf029a6L514)), whose purpose I could not ascertain (but I may have missed something in the Python docs). This was not an issue before 70cca3b because `float` does not complain about the extra zero, while `Decimal` does."}}
{"actor":{"display_login":"pooler"}}