spesmilo / spesmilo/electrum

TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

Open
#7,384 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Crash Report

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

Traceback

  File "electrum\gui\qt\swap_dialog.py", line 152, in on_send_edited
  File "electrum\submarine_swaps.py", line 524, in get_recv_amount

TypeError: unsupported operand type(s) for -: 'int' and 'NoneType'

Reporter

This issue was reported by 13 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
4.1.4 3.8.8 (tags/v3.8.8:024d805, Feb 19 2021, 13:08:11) [MSC v.1928 32 bit (Intel)] Windows-10-10.0.22000-SP0 standard en_US
4.1.5 3.7.10 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] Linux-5.4.0-81-generic-x86_64-with-debian-bullseye-sid standard en_US
4.2.1 3.8.10 (default, Nov 26 2021, 20:14:08) [GCC 9.3.0] Linux-5.4.0-104-generic-x86_64-with-glibc2.29 standard en_US
4.2.1 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] Linux-5.16.0-12parrot1-amd64-x86_64-with-glibc2.31 standard en_US
4.2.1 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22000-SP0 standard en_US
4.2.1 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22000-SP0 standard en_US
4.2.2 3.9.11 (v3.9.11:2de452f8bf, Mar 16 2022, 10:34:36) [Clang 6.0 (clang-600.0.57)] macOS-10.16-x86_64-i386-64bit standard ?
4.1.5 3.7.10 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] Linux-4.4.0-21-generic-x86_64-with-debian-stretch-sid standard en_GB
4.2.1 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22621-SP0 standard en_US
4.2.1 3.9.11 (tags/v3.9.11:2de452f, Mar 16 2022, 14:21:37) [MSC v.1929 32 bit (Intel)] Windows-10-10.0.22621-SP0 standard en_US
4.6.2 3.13.3 (main, Nov 24 2025, 20:53:35) [GCC 14.2.0] Linux-6.14.0-36-generic-x86_64-with-glibc2.41 standard it_IT
4.6.2 3.13.3 (main, Nov 24 2025, 20:53:35) [GCC 14.2.0] Linux-6.14.0-36-generic-x86_64-with-glibc2.41 standard it_IT
4.7.1 3.12.3 (main, Mar 3 2026, 12:15:18) [GCC 13.3.0] Linux-6.17.0-14-generic-x86_64-with-glibc2.39 standard en_US

Additional Information

trying to swap ln for btc


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with electrum/gui/qt/swap_dialog.py at on_send_edited and electrum/submarine_swaps.py at get_recv_amount, using the reported traceback as the entry point. Reproduce the LN-to-BTC swap flow while editing the amount and determine the expected behavior when a value is None. Done means this interaction no longer raises the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.