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

ValueError: invalid literal for int() with base 10: '!' #8232

Open
TARS-bot opened this issue Mar 1, 2023 · 2 comments
Open

ValueError: invalid literal for int() with base 10: '!' #8232

TARS-bot opened this issue Mar 1, 2023 · 2 comments
Labels
bug 🐞 topic-invoice-payreq invoices and payment requests topic-wallet 👛 related to wallet.py, or maybe address_synchronizer.py/coinchooser.py

Comments

@TARS-bot
Copy link

TARS-bot commented Mar 1, 2023

Crash Report

This crash report was reported through the automatic crash reporting system 🤖

Traceback

Traceback (most recent call last):
  File "electrum\gui\qt\request_list.py", line 199, in create_menu
  File "electrum\wallet.py", line 2339, in get_request_URI
  File "electrum\invoices.py", line 179, in get_bip21_URI
ValueError: invalid literal for int() with base 10: '!'

ValueError: invalid literal for int() with base 10: '!'

Reporter

This issue was reported by 5 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
4.3.4 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)] Windows-8-6.2.9200-SP0 imported sk_SK
4.3.4 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported,standard sv_SE
4.3.4 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported,standard sv_SE
4.3.4 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported,standard sv_SE
4.3.4 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:24:45) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.19045-SP0 imported,standard sv_SE

Additional Information

The reporting user(s) did not provide additional information.

@SomberNight SomberNight added bug 🐞 topic-invoice-payreq invoices and payment requests topic-wallet 👛 related to wallet.py, or maybe address_synchronizer.py/coinchooser.py labels Mar 9, 2023
@SomberNight
Copy link
Member

Unclear how the user might have ended up with a "max" amount receive request in the wallet.
There are several guards against this, such as:

electrum/electrum/wallet.py

Lines 2561 to 2564 in aaca7c5

def create_request(self, amount_sat: int, message: str, exp_delay: int, address: Optional[str]):
# for receiving
amount_sat = amount_sat or 0
assert isinstance(amount_sat, int), f"{amount_sat!r}"

@SomberNight
Copy link
Member

Exporting receive requests, modifying the file, and importing it back, is one way to trigger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 topic-invoice-payreq invoices and payment requests topic-wallet 👛 related to wallet.py, or maybe address_synchronizer.py/coinchooser.py
Projects
None yet
Development

No branches or pull requests

2 participants