Open kubesqrt opened 2 years ago
Thanks for reporting this issue, we are on it :)
@kubesqrt this happens because your code is inside a file named etherscan.py
. If you rename it, the error will go away
still not working , what we have to rename?
@Terkey7762 Try:
import etherscan
eth = etherscan.Client('CU3GAMEJKER5MVUKJ4Z3NVTIK5Y2A75D58')
@kubesqrt I think this is because you have installed etherscan instead of etherscan-python - as per the installation guide of this repo.
pip uninstall etherscan
pip install etherscan-python
You may need to check where actually the etherscan lib installed if you have different python versions install on your computer. For my case somehow the lib installed in my conda envriments, however, I was run install command in another python enviroment. I just found this when I try to uninstall etherscan-python
from etherscan import Etherscan eth = Etherscan('CU3GAMEJKER5MVUKJ4Z3NVTIK5Y2A75D58')
eth.get_gas_oracle()
Terminal: ImportError: cannot import name 'Etherscan' from 'etherscan'
I am running python 3.9.7 on windows 10.
I encountered this problem yesterday. Incorrectly, I use pip install etherscan rather than pip install etherscan-python. Moreover, if both are placed in the same environment, they will clash.
from etherscan import Etherscan eth = Etherscan('CU3GAMEJKER5MVUKJ4Z3NVTIK5Y2A75D58')
eth.get_gas_oracle()
Terminal: ImportError: cannot import name 'Etherscan' from 'etherscan'
I am running python 3.9.7 on windows 10.