Тема: Помилка при роботі з json
Помилка виникає динамічно, то вона присутня то відсутні. 
записав відос проблеми:
https://www.youtube.com/watch?v=hJJNTDCpgrg&&
проблемний код:
import requests
import time
# === GET запит =======================================
def getWaves():
    while True:
        pairs = "https://api.tidex.com/api/3/depth/" + 'waves_btc'  +  '-' \
                                                     + 'waves_eth'  +  '-' \
                                                     + 'waves_usdt' + '-' \
                                                     + 'waves_wusd' + '-' \
                                                     + 'waves_weur' + '-' \
                                                     + 'eth_btc'    + '-' \
                                                     + 'btc_usdt'   + '-' \
                                                     + 'eth_usdt'   + '-' \
                                                     + 'btc_wusd'   + '-' \
                                                     + 'eth_wusd'   + '-' \
                                                     + 'btc_weur'   + '-' \
                                                     + 'eth_weur'
        pairsRequests = requests.get(pairs)
        if pairsRequests.status_code == 200:
            pairsRequests = pairsRequests.json()
            try:
                if pairsRequests['error'] != '':
                    print(pairsRequests['error get Depth'])
                    time.sleep(3)
            except KeyError:
                return pairsRequests
# === Робота з основним массивом =======================
def arrProcent(u):
    # Розпарс ліпших цін
    def bestPrice(u, pairs, ask_bid):
        return u[pairs][ask_bid][0][0]
    # Розпарс обʼма ліпших цін
    def bestPriceVolume(u, pairs, ask_bid):
        return u[pairs][ask_bid][0][1]
    # Мінімальний обʼєм
    def minVolume(p1, pA, p2):
        return min(p1, pA, p2)
    # Конвертація арбітраж обєма в кількість покупки
    def arbVolume (aPrice, aVolume, buyPrice):
        return (aPrice * aVolume) / buyPrice
    # Основний массив
    arr = {
        'WavesEth_EthBtc_WavesBtc':   [bestPrice(u,'waves_eth', 'bids') * bestPrice(u,'eth_btc', 'bids') / bestPrice(u,'waves_btc', 'asks'),   'waves_eth', bestPrice(u,'waves_eth', 'bids'),   'eth_btc' ,bestPrice(u,'eth_btc', 'bids'),   'waves_btc', bestPrice(u,'waves_btc', 'asks'),    minVolume(bestPriceVolume(u,'waves_eth', 'bids'),  arbVolume(bestPriceVolume(u,'eth_btc', 'bids'),bestPrice(u,'eth_btc', 'bids'),bestPrice(u,'waves_btc', 'asks')),  bestPriceVolume(u,'waves_btc', 'asks'))],
        'WavesBtc_EthBtc_WavesEth':   [bestPrice(u,'waves_btc', 'bids') / bestPrice(u,'eth_btc', 'asks') / bestPrice(u,'waves_eth', 'asks'),   'waves_btc', bestPrice(u,'waves_btc', 'bids'),   'eth_btc' ,bestPrice(u,'eth_btc', 'asks'),   'waves_eth', bestPrice(u,'waves_eth', 'asks'),    minVolume(bestPriceVolume(u,'waves_btc', 'bids'),  arbVolume(bestPriceVolume(u,'eth_btc', 'asks'),bestPrice(u,'eth_btc', 'asks'),bestPrice(u,'waves_eth', 'asks')),  bestPriceVolume(u,'waves_eth', 'asks'))],
        'WavesBtc_BtcUsdt_WavesUsdt': [bestPrice(u,'waves_btc', 'bids') * bestPrice(u,'btc_usdt','bids') / bestPrice(u,'waves_usdt','asks'),   'waves_btc', bestPrice(u,'waves_btc', 'bids'),   'btc_usdt',bestPrice(u,'btc_usdt','bids'),   'waves_usdt',bestPrice(u,'waves_usdt','asks'),    minVolume(bestPriceVolume(u,'waves_btc', 'bids'),  arbVolume(bestPriceVolume(u,'btc_usdt','bids'),bestPrice(u,'btc_usdt','bids'),bestPrice(u,'waves_usdt','asks')),  bestPriceVolume(u,'waves_usdt','asks'))],
        'WavesUsdt_BtcUsdt_WavesBtc': [bestPrice(u,'waves_usdt','bids') / bestPrice(u,'btc_usdt','asks') / bestPrice(u,'waves_btc', 'asks'),   'waves_usdt',bestPrice(u,'waves_usdt','bids'),   'btc_usdt',bestPrice(u,'btc_usdt','asks'),   'waves_btc', bestPrice(u,'waves_btc', 'asks'),    minVolume(bestPriceVolume(u,'waves_usdt','bids'),  arbVolume(bestPriceVolume(u,'btc_usdt','asks'),bestPrice(u,'btc_usdt','asks'),bestPrice(u,'waves_btc', 'asks')),  bestPriceVolume(u,'waves_btc', 'asks'))],
        'WavesEth_EthUsdt_WavesUsdt': [bestPrice(u,'waves_eth', 'bids') * bestPrice(u,'eth_usdt','bids') / bestPrice(u,'waves_usdt','asks'),   'waves_eth', bestPrice(u,'waves_eth', 'bids'),   'eth_usdt',bestPrice(u,'eth_usdt','bids'),   'waves_usdt',bestPrice(u,'waves_usdt','asks'),    minVolume(bestPriceVolume(u,'waves_eth', 'bids'),  arbVolume(bestPriceVolume(u,'eth_usdt','bids'),bestPrice(u,'eth_usdt','bids'),bestPrice(u,'waves_usdt','asks')),  bestPriceVolume(u,'waves_usdt','asks'))],
        'WavesUsdt_EthUsdt_WavesEth': [bestPrice(u,'waves_usdt','bids') / bestPrice(u,'eth_usdt','asks') / bestPrice(u,'waves_eth', 'asks'),   'waves_usdt',bestPrice(u,'waves_usdt','bids'),   'eth_usdt',bestPrice(u,'eth_usdt','asks'),   'waves_eth', bestPrice(u,'waves_eth', 'asks'),    minVolume(bestPriceVolume(u,'waves_usdt','bids'),  arbVolume(bestPriceVolume(u,'eth_usdt','asks'),bestPrice(u,'eth_usdt','asks'),bestPrice(u,'waves_eth', 'asks')),  bestPriceVolume(u,'waves_eth', 'asks'))],
        'WavesBtc_BtcWusd_WavesWusd': [bestPrice(u,'waves_btc', 'bids') * bestPrice(u,'btc_wusd','bids') / bestPrice(u,'waves_wusd','asks'),   'waves_btc', bestPrice(u,'waves_btc', 'bids'),   'btc_wusd',bestPrice(u,'btc_wusd','bids'),   'waves_wusd',bestPrice(u,'waves_wusd','asks'),    minVolume(bestPriceVolume(u,'waves_btc', 'bids'),  arbVolume(bestPriceVolume(u,'btc_wusd','bids'),bestPrice(u,'btc_wusd','bids'),bestPrice(u,'waves_wusd','asks')),  bestPriceVolume(u,'waves_wusd','asks'))],
        'WavesWusd_BtcWusd_WavesBtc': [bestPrice(u,'waves_wusd','bids') / bestPrice(u,'btc_wusd','asks') / bestPrice(u,'waves_btc', 'asks'),   'waves_wusd',bestPrice(u,'waves_wusd','bids'),   'btc_wusd',bestPrice(u,'btc_wusd','asks'),   'waves_btc', bestPrice(u,'waves_btc', 'asks'),    minVolume(bestPriceVolume(u,'waves_wusd','bids'),  arbVolume(bestPriceVolume(u,'btc_wusd','asks'),bestPrice(u,'btc_wusd','asks'),bestPrice(u,'waves_btc', 'asks')),  bestPriceVolume(u,'waves_btc', 'asks'))],
        'WavesEth_EthWusd_WavesWusd': [bestPrice(u,'waves_eth', 'bids') * bestPrice(u,'eth_wusd','bids') / bestPrice(u,'waves_wusd','asks'),   'waves_eth', bestPrice(u,'waves_eth', 'bids'),   'eth_wusd',bestPrice(u,'eth_wusd','bids'),   'waves_wusd',bestPrice(u,'waves_wusd','asks'),    minVolume(bestPriceVolume(u,'waves_eth', 'bids'),  arbVolume(bestPriceVolume(u,'eth_wusd','bids'),bestPrice(u,'eth_wusd','bids'),bestPrice(u,'waves_wusd','asks')),  bestPriceVolume(u,'waves_wusd','asks'))],
        'WavesWusd_EthWusd_WavesEth': [bestPrice(u,'waves_wusd','bids') / bestPrice(u,'eth_wusd','asks') / bestPrice(u,'waves_eth', 'asks'),   'waves_wusd',bestPrice(u,'waves_wusd','bids'),   'eth_wusd',bestPrice(u,'eth_wusd','asks'),   'waves_eth', bestPrice(u,'waves_eth', 'asks'),    minVolume(bestPriceVolume(u,'waves_wusd','bids'),  arbVolume(bestPriceVolume(u,'eth_wusd','asks'),bestPrice(u,'eth_wusd','asks'),bestPrice(u,'waves_eth', 'asks')),  bestPriceVolume(u,'waves_eth', 'asks'))],
        'WavesBtc_BtcWeur_WavesWeur': [bestPrice(u,'waves_btc', 'bids') * bestPrice(u,'btc_weur','bids') / bestPrice(u,'waves_weur','asks'),   'waves_btc', bestPrice(u,'waves_btc', 'bids'),   'btc_weur',bestPrice(u,'btc_weur','bids'),   'waves_weur',bestPrice(u,'waves_weur','asks'),    minVolume(bestPriceVolume(u,'waves_btc', 'bids'),  arbVolume(bestPriceVolume(u,'btc_weur','bids'),bestPrice(u,'btc_weur','bids'),bestPrice(u,'waves_weur','asks')),  bestPriceVolume(u,'waves_weur','asks'))],
        'WavesWeur_BtcWeur_WavesBtc': [bestPrice(u,'waves_weur','bids') / bestPrice(u,'btc_weur','asks') / bestPrice(u,'waves_btc', 'asks'),   'waves_weur',bestPrice(u,'waves_weur','bids'),   'btc_weur',bestPrice(u,'btc_weur','asks'),   'waves_btc', bestPrice(u,'waves_btc', 'asks'),    minVolume(bestPriceVolume(u,'waves_weur','bids'),  arbVolume(bestPriceVolume(u,'btc_weur','asks'),bestPrice(u,'btc_weur','asks'),bestPrice(u,'waves_btc', 'asks')),  bestPriceVolume(u,'waves_btc', 'asks'))],
        'WavesEth_EthWeur_WavesWeur': [bestPrice(u,'waves_eth', 'bids') * bestPrice(u,'eth_weur','bids') / bestPrice(u,'waves_weur','asks'),   'waves_eth', bestPrice(u,'waves_eth', 'bids'),   'eth_weur',bestPrice(u,'eth_weur','bids'),   'waves_weur',bestPrice(u,'waves_weur','asks'),    minVolume(bestPriceVolume(u,'waves_eth', 'bids'),  arbVolume(bestPriceVolume(u,'eth_weur','bids'),bestPrice(u,'eth_weur','bids'),bestPrice(u,'waves_weur','asks')),  bestPriceVolume(u,'waves_weur','asks'))],
        'WavesWeur_EthWeur_WavesEth': [bestPrice(u,'waves_weur','bids') / bestPrice(u,'eth_weur','asks') / bestPrice(u,'waves_eth', 'asks'),   'waves_weur',bestPrice(u,'waves_weur','bids'),   'eth_weur',bestPrice(u,'eth_weur','asks'),   'waves_eth', bestPrice(u,'waves_eth', 'asks'),    minVolume(bestPriceVolume(u,'waves_weur','bids'),  arbVolume(bestPriceVolume(u,'eth_weur','asks'),bestPrice(u,'eth_weur','asks'),bestPrice(u,'waves_eth', 'asks')),  bestPriceVolume(u,'waves_eth', 'asks'))]
          }
    return arr
print(getWaves())import lib.TidexLib
# ===============================
depthTidex = lib.TidexLib.getWaves()
t = lib.TidexLib.arrProcent(depthTidex)
# ===============================По ідеї можна обійти помилку циклом та try(break), але це не зовсім правильно. Товариші пайтоністи допоможіть будь-ласка.



