jacksmithinsulander / rsab

Other
4 stars 0 forks source link

Intermittent issue in FA scan - 'NoneType' object has no attribute 'get' #124

Open larsyngvelundin opened 11 months ago

larsyngvelundin commented 11 months ago

Intermittently during FA scans, we get these errors:

Traceback (most recent call last):
  File "C:\Users\nok13\Documents\GitHub\WAGMI\main.py", line 103, in <module>
    iterate_fa()
  File "C:\Users\nok13\Documents\GitHub\WAGMI\modules\fa\fa_iterate.py", line 51, in iterate
    result = full_fa(
  File "C:\Users\nok13\Documents\GitHub\WAGMI\modules\fa\fa.py", line 129, in full_fa
    goplus_analysis = goplus_fa(chain_name_arr[0], token)
  File "C:\Users\nok13\Documents\GitHub\WAGMI\modules\fa\fa.py", line 24, in goplus_fa
    token_data = res_json.get("result", {}).get(token.lower(), {})
AttributeError: 'NoneType' object has no attribute 'get'

Function where it originates in our code seems to be res_json.get("result", {}).get(token.lower(), {}), line 24, in fa.py

larsyngvelundin commented 11 months ago

This happened when checking this token:

_net = eth
_pool_main_contract = 0x1F98431c8aD98523631AE4a59f267346ea31F984
_pool_address = 0x64677e5D2F752161e8561804BFE74326d1794f94
_time_created = 1698352403
_token1_address = 0x837Cd1C09aEcA7c60A0cCb0f262A4e97492329C9
_token1_symbol = GOLD
_token2_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
_token2_symbol = WETH
_dex = uniswap3
_creation_block = 18436798
larsyngvelundin commented 11 months ago

Also happened with these:

[(67, 'eth', 'eth', 'ether', '0x1F98431c8aD98523631AE4a59f267346ea31F984', '0x806926e263dd95cd75d1246AfB59fC797FEEbc42', 1698352943, '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'WETH', '0xF818245A6d09815129f53f6BfaCC84ebfBc3d54a', 'DOGGY', 'uniswap3', 18436843)]
[(68, 'eth', 'eth', 'ether', '0x1F98431c8aD98523631AE4a59f267346ea31F984', '0xBED2DE3D952E934ad5fCa27Cf2AAECc79CbF1524', 1698354371, '0x85336A45Eb6Fc083Fe269b5D8a504a8c389ab9Ef', 'SQUID', '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'WETH', 'uniswap3', 18436961)]
[(69, 'eth', 'eth', 'ether', '0x1F98431c8aD98523631AE4a59f267346ea31F984', '0x1c56466A52A1A8bCc206b6A9a230DBAb2bba4A65', 1698511691, '0x65e175866133B10ac6f29093d0638A749a663e7b', 'RBT', '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'WETH', 'uniswap3', 18449986)]
[(70, 'eth', 'eth', 'ether', '0x1F98431c8aD98523631AE4a59f267346ea31F984', '0xA30EBe412e17aE91E80F36DED94B0AB09f99ca89', 1698514091, '0x53c6A49e8B07D7b05B81d65CaB43e360B8fbeA43', 'dev', '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'WETH', 'uniswap3', 18450185)]
[(71, 'eth', 'eth', 'ether', '0x1F98431c8aD98523631AE4a59f267346ea31F984', '0x607d09B37EcD175FDd92A113C9B20AebB16Cc59D', 1698514259, '0x135B7aB78565419E253AeebfC5c03E6B33F3f3e0', 'EMPTY', '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 'WETH', 'uniswap3', 18450198)]
[(72, 'matic', 'polygon', 'polygon', '0x1F98431c8aD98523631AE4a59f267346ea31F984', '0xf010Bd8B388E3ee7ca7cbaF7CC9Ba17ca7c024De', 1698581200, '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 'WMATIC', '0xdC3736F80480C344561e413ac7F33645049452d2', 'bveZERO', 'uniswap3', 49293335)]

There's probably a pattern that I'm too lazy to find right now.

Perhaps something wrong with how they're saved, sicne the issue happened to all pools saved past a certain point. (IDs going 67->72+)