user86380: When I run the code below, sending a BTC transaction to the blockchain (using blockcypher api) I get an Assertion Error. I am not sure what an Assertion error means.

The code:

Btw the address had only around 5000 satoshi left.... 
Link to api documentation
https://www.blockcypher.com/dev/bitcoin/#creating-transactions
Thanks 

user5757: This comes from the code where the checksum of your private key is validated, and suggests that the key is not valid.  However, the private key shown in your code seems to pass validation on bitaddress.org, so the Python library you're using might have a bug.
(By the way, please don't reveal the private keys to real addresses!  It looks like all the coins were moved out of that address (1LLZQ...) a couple hours ago, hopefully by you, but any further coins sent to that address are likely to be stolen immediately.)

86380: <p>When I run the code below, sending a BTC transaction to the blockchain (using blockcypher api) I get an Assertion Error. I am not sure what an Assertion error means.</p>

<p><a href="https://i.stack.imgur.com/TtBHT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TtBHT.png" alt="enter image description here"></a></p>

<p>The code:
<a href="https://i.stack.imgur.com/KUGKJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KUGKJ.png" alt="enter image description here"></a></p>

<p>Btw the address had only around 5000 satoshi left.... 
Link to api documentation</p>

<p><a href="https://www.blockcypher.com/dev/bitcoin/#creating-transactions" rel="nofollow noreferrer">https://www.blockcypher.com/dev/bitcoin/#creating-transactions</a></p>

<p>Thanks </p>
 5757: <p>This comes from the code where the checksum of your private key is validated, and suggests that the key is not valid.  However, the private key shown in your code seems to pass validation on bitaddress.org, so the Python library you're using might have a bug.</p>

<p>(By the way, please don't reveal the private keys to real addresses!  It looks like all the coins were moved out of that address (1LLZQ...) a couple hours ago, hopefully by you, but any further coins sent to that address are likely to be stolen immediately.)</p>
