Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'functions' #71

Closed
dedosmedia opened this issue Dec 21, 2024 · 1 comment
Closed

Comments

@dedosmedia
Copy link

My code was working with 0.1.21, after upgrading to 0.1.22 I am getting this error after instantiating Synthetix this way:

    snx = Synthetix(
        network_id=42161,  
        provider_rpc="https://arbitrum-one-rpc.publicnode.com"  
    )

Not sure what's happening, it seems to be breaking changes in the new release.

Here the log:


bot-1  |   File "/app/main.py", line 12, in main
bot-1  |     snx = Synthetix(
bot-1  |   File "/usr/local/lib/python3.10/site-packages/synthetix/synthetix.py", line 259, in __init__
bot-1  |     self.spot = Spot(self)
bot-1  |   File "/usr/local/lib/python3.10/site-packages/synthetix/spot/spot.py", line 63, in __init__
bot-1  |     self.markets_by_id, self.markets_by_name = self.get_markets()
bot-1  |   File "/usr/local/lib/python3.10/site-packages/synthetix/spot/spot.py", line 177, in get_markets
bot-1  |     addresses = multicall_erc7412(
bot-1  |   File "/usr/local/lib/python3.10/site-packages/synthetix/utils/multicall.py", line 375, in multicall_erc7412
bot-1  |     calls = handle_erc7412_error(snx, e) + calls
bot-1  |   File "/usr/local/lib/python3.10/site-packages/synthetix/utils/multicall.py", line 193, in handle_erc7412_error
bot-1  |     requests = aggregate_erc7412_price_requests(snx, error)
bot-1  |   File "/usr/local/lib/python3.10/site-packages/synthetix/utils/multicall.py", line 186, in aggregate_erc7412_price_requests
bot-1  |     raise error
bot-1  |   File "/usr/local/lib/python3.10/site-packages/synthetix/utils/multicall.py", line 353, in multicall_erc7412
bot-1  |     call = snx.multicall.functions.aggregate3Value(calls).call(
bot-1  | AttributeError: 'NoneType' object has no attribute 'functions'

@Tburm
Copy link
Collaborator

Tburm commented Jan 3, 2025

This issue has been fixed in version 0.1.23: #72

@Tburm Tburm closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants