Skip to content

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

@dedosmedia

Description

@dedosmedia

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions