ethereum / pyethapp

MIT License
1.28k stars 604 forks source link

some eth command not working #279

Open cmaliwal opened 6 years ago

cmaliwal commented 6 years ago

In [5]: blockhash == eth.chain.index.get_block_by_number(433960)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-5-cc44e1ef515d> in <module>()
----> 1 blockhash == eth.chain.index.get_block_by_number(433960)

AttributeError: 'Chain' object has no attribute 'index'

In [6]: eth.chain.get(blockhash)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-6-8b4ee92deafc> in <module>()
----> 1 eth.chain.get(blockhash)

AttributeError: 'Chain' object has no attribute 'get'

In [9]: eth.latest.header.check_pow()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-9-d2acbc6a9067> in <module>()
----> 1 eth.latest.header.check_pow()

AttributeError: 'BlockHeader' object has no attribute 'check_pow'

In [11]: eth.latest.get_transactions()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-11-f91c2e1449dd> in <module>()
----> 1 eth.latest.get_transactions()

/home/rails/Desktop/block-chain/envs/local/lib/python2.7/site-packages/ethereum/block.pyc in __getattribute__(self, name)
    179             return rlp.Serializable.__getattribute__(self, name)
    180         except AttributeError:
--> 181             return getattr(self.header, name)
    182 
    183     @property

AttributeError: 'BlockHeader' object has no attribute 'get_transactions'


Note : I am using python 2.7 and using ubuntu 16.04.
cmaliwal commented 6 years ago

Steps I followed :

Create virtual environment and active virtual environment . Git clone https://github.com/ethereum/pyethapp.git Cd pyethapp Pip install -r requirements.txt Python setup.py install

mhan11 commented 6 years ago

I got the same problem.