BitcoinArmory icon indicating copy to clipboard operation
BitcoinArmory copied to clipboard

Import from armoryengine * error

Open jordanbaucke opened this issue 11 years ago • 1 comments

I just did a fresh clone of the master branch, ran make, created a watch-only copy of my wallet, and loaded up the example getNextAddress file from the examples page.

Whenever I try to run the source files (and the other examples) I get errors with undefined methods (assuming these are not importing correctly?

jordanbaucke@ubuntu:~/Documents/BitcoinArmory$ python getNextAddress.py armory_bHR5JBS7_.watchonly.wallet 
Traceback (most recent call last):
  File "getNextAddress.py", line 3, in <module>
    wlt = PyBtcWallet().readWalletFile( CLI_ARGS[0] )
NameError: name 'PyBtcWallet' is not defined

and my getNextAddress.py (in the /BitcoinArmory directory...obviously)

#! /usr/bin/python
from armoryengine import *
wlt = PyBtcWallet().readWalletFile( CLI_ARGS[0] )
print wlt.getNextUnusedAddress().getAddrStr()

jordanbaucke avatar May 21 '14 23:05 jordanbaucke

armoryengine is now a directory. Try:

from armoryengine.ALL import *

AndyOfiesh avatar Jun 05 '14 18:06 AndyOfiesh