ElectrumABC icon indicating copy to clipboard operation
ElectrumABC copied to clipboard

ValueError: too many values to unpack (expected 2)

Open mccnash opened this issue 2 years ago • 1 comments

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

  • Electrum ABC version: 5.2.2
  • Python version: 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)]
  • Operating system: Windows-10-10.0.19044-SP0
  • Wallet type: standard
  • Locale: en_US

mccnash avatar Mar 22 '23 20:03 mccnash

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

PiRK avatar May 12 '23 11:05 PiRK