Bitcoin-ABC / ElectrumABC

Mirror of https://reviews.bitcoinabc.org/source/bitcoin-abc/browse/master/electrum/
https://bitcoinabc.org/electrum
Other
32 stars 16 forks source link

ValueError: too many values to unpack (expected 2) #283

Open mccnash opened 1 year ago

mccnash commented 1 year ago

Description

This message came up after installing the latest wallet on Windows 10. It might be related to using Trezor device. I had an old version (4.x) installed and uninstalled that one before installing the latest version. Once I opened the new app this message comes up. I deleted my wallet so it would start with creating a new wallet. Everything worked until I selected my terzor device. Thats when everything goes haywire again. The window with the error message below just keeps poping up over and over. No matter if you do anything or not. I cant use the app right now at all.

Traceback

Traceback (most recent call last):
  File "electrumabc_gui\qt\main_window.py", line 1132, in timer_actions
  File "electrumabc_gui\qt\main_window.py", line 1319, in _update_wallet
  File "electrumabc_gui\qt\main_window.py", line 1255, in update_status
  File "electrumabc_gui\qt\main_window.py", line 1160, in format_amount_and_units
  File "electrumabc_gui\qt\main_window.py", line 1151, in format_amount
  File "electrumabc\util.py", line 534, in format_satoshis
ValueError: too many values to unpack (expected 2)

System information

PiRK commented 1 year ago

Does your computer by any chance use a numeric locale that prints number using a . as thousands separator?

e.g. 10.000.123,45

The only way I can see this happening is if the software gets confused because the . is used both for thousands separator and for decimal point (which could happen if for some reason my code is not able to detect the actual character used for decimal point and falls back to .) https://github.com/PiRK/ElectrumABC/blob/b78e96bb39b64496b94ddce789cdd00769c00021/electrumabc/util.py#LL496C24-L496C24