EmperorMew / python-snowtrace

MIT License
3 stars 2 forks source link

Conflict with etherscan-python #1

Open ocuil opened 1 year ago

ocuil commented 1 year ago

Hi !!!

I am working in a multiple network scan ... and I am using etherscan-python (ETH) and trying to use python-snowtrace (AVAX) but there is a conflict ...

I am trying to install it with another target with pip pip install --target=/.../lib/python3.10/site-packages/avx_etherscan python-snowtrace

And import them on this way:

from avx_etherscan import etherscan AVA_API_KEY = "XXXX" client = etherscan.Snowtrace(AVA_API_KEY)

But is getting the etherscan-python config and connect to ETH and not to Avalanche ...

Any idea ?

EmperorMew commented 1 year ago

Hello, Ocuil

I've run into a very similar issue. The etherscan-python package is typically incompatible with other similar calls.

Using Web3.py for all of your ETH calls and python-snowtrace for all of your AVAX calls would be the simplest solution on your end.

You will need to launch a new environment, as the etherscan-python package will continue to cause issues. 

The web3.py is superior and is what I'd suggest using in the future. 

zhranj commented 1 year ago

Coming a bit late, perhaps, but I had the same issue as OP. Fixed it by doing a mass rename. Have not done thorough testing, but fwiw, the use cases I've tried it for, I get the same results as the baseline.

Submitted a PR https://github.com/EmperorMew/python-snowtrace/pull/2