Bitcoin Forum
January 17, 2019, 06:08:50 AM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Electrum - Check balance - EOF Error  (Read 1122 times)
Jude Austin
Legendary
*
Offline Offline

Activity: 1126
Merit: 1000


The Real Jude Austin


View Profile WWW
June 05, 2016, 08:00:23 PM
 #1

Hello,

I am currently working on a Python script that will be ran through Electrum Python Console but I keep getting an EOF error.

My code is as follows:

Code:
balance = input(getbalance())

When that is executed I get this:

Code:
>> balance = input(getbalance())
{'confirmed': '0'}
Traceback (most recent call last):
EOFError: EOF when reading a line
>>

How is it not reading the output from getbalance() when it is clearly showing in console?

I am trying to run a loop in Electrum Python Console that checks the balance and if it is above a set amount then it will automatically pay to another address.

Thanks,
Jude

Get paid BTC to sign up for free tokens: http://earn.com/judeaustin/referral/?a=d3euriwoffdrlv4b
1547705330
Hero Member
*
Offline Offline

Posts: 1547705330

View Profile Personal Message (Offline)

Ignore
1547705330
Reply with quote  #2

1547705330
Report to moderator
1547705330
Hero Member
*
Offline Offline

Posts: 1547705330

View Profile Personal Message (Offline)

Ignore
1547705330
Reply with quote  #2

1547705330
Report to moderator
1547705330
Hero Member
*
Offline Offline

Posts: 1547705330

View Profile Personal Message (Offline)

Ignore
1547705330
Reply with quote  #2

1547705330
Report to moderator
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1547705330
Hero Member
*
Offline Offline

Posts: 1547705330

View Profile Personal Message (Offline)

Ignore
1547705330
Reply with quote  #2

1547705330
Report to moderator
1547705330
Hero Member
*
Offline Offline

Posts: 1547705330

View Profile Personal Message (Offline)

Ignore
1547705330
Reply with quote  #2

1547705330
Report to moderator
Jude Austin
Legendary
*
Offline Offline

Activity: 1126
Merit: 1000


The Real Jude Austin


View Profile WWW
June 05, 2016, 08:56:47 PM
 #2

Problem solved.

Solution:

Code:
balance = getbalance()

Get paid BTC to sign up for free tokens: http://earn.com/judeaustin/referral/?a=d3euriwoffdrlv4b
Pages: [1]
  Print  
 
Jump to:  

Bitcointalk.org is not available or authorized for sale. Do not believe any fake listings.
Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!