kozalosev / textUtilsBot

A simple bot for Telegram, that has some useful handlers of inline queries to make text conversions.
https://t.me/textUtilsBot
MIT License
5 stars 1 forks source link

Obsolete data on currency rates #39

Closed kozalosev closed 1 year ago

kozalosev commented 1 year ago

https://t.me/kozaloru/579?comment=680

kozalosev commented 1 year ago

The ruble currency rate in the currates.db file was very wrong:

>>> r['RSD']
b'107.1726'
>>> r['RUB']
b'91.4496'

I don't know yet why it was not updating, but deletion of this file and restarting of the bot was enough to fetch the actual data.

2023-08-15T15:01:24.884327000Z INFO:strconv.currates:The following volatile currencies were updated: {"AED": 3.6725, "AFN": 84.4006, "ALL": 94.9721, "AMD": 386.3169, "ANG": 1.79, "AOA": 833.8872, "ARS": 287.3943, "AUD": 1.5413, "AWG": 1.79, "AZN": 1.7012, "BAM": 1.792, "BBD": 2.0, "BDT": 109.4867, "BGN": 1.7918, "BHD": 0.376, "BIF": 2830.075, "BMD": 1.0, "BND": 1.3557, "BOB": 6.9371, "BRL": 4.9099, "BSD": 1.0, "BTC": 3.4e-05, "BTN": 83.1151, "BWP": 13.5833, "BYN": 2.8647, "BZD": 2.0, "CAD": 1.3455, "CDF": 2431.2221, "CHF": 0.8781, "CLF": 0.031386, "CLP": 860.22, "CNH": 7.303244, "CNY": 7.2695, "COP": 3959.9582, "CRC": 536.0351, "CUC": 1.000297, "CUP": 24.0, "CVE": 101.031, "CZK": 22.0212, "DJF": 177.721, "DKK": 6.8257, "DOP": 56.9359, "DZD": 135.9957, "EGP": 30.9345, "ERN": 15.0, "ETB": 55.2329, "EUR": 0.9162, "FJD": 2.2474, "FKP": 0.7886, "GBP": 0.7886, "GEL": 2.6149, "GGP": 0.7886, "GHS": 11.2997, "GIP": 0.7886, "GMD": 62.9904, "GNF": 8547.4913, "GTQ": 7.8745, "GYD": 209.2704, "HKD": 7.8195, "HNL": 24.6516, "HRK": 6.9035, "HTG": 136.5435, "HUF": 351.2325, "IDR": 15323.1843, "ILS": 3.7458, "IMP": 0.7886, "INR": 83.1154, "IQD": 1309.5235, "IRR": 42008.5658, "ISK": 132.3105, "JEP": 0.7886, "JMD": 154.4367, "JOD": 0.709, "JPY": 145.3278, "KES": 143.9731, "KGS": 87.9505, "KHR": 4155.9272, "KMF": 450.7687, "KPW": 899.827499, "KRW": 1334.9388, "KWD": 0.3077, "KYD": 0.8333, "KZT": 448.5342, "LAK": 19351.1588, "LBP": 15000.0, "LKR": 320.8561, "LRD": 188.9907, "LSL": 19.0551, "LYD": 4.7955, "MAD": 9.8674, "MDL": 17.6496, "MGA": 4512.0347, "MKD": 55.9486, "MMK": 2108.4782, "MNT": 3435.8377, "MOP": 8.0541, "MRU": 37.861, "MUR": 45.2335, "MVR": 15.4523, "MWK": 1086.346, "MXN": 17.0575, "MYR": 4.614, "MZN": 63.8769, "NAD": 19.0551, "NGN": 768.8253, "NIO": 36.6569, "NOK": 10.4693, "NPR": 132.9842, "NZD": 1.6731, "OMR": 0.3845, "PAB": 1.0, "PEN": 3.696, "PGK": 3.5732, "PHP": 56.8737, "PKR": 287.468, "PLN": 4.0668, "PYG": 7318.5471, "QAR": 3.64, "RON": 4.521, "RSD": 107.0848, "RUB": 100.7969, "RWF": 1218.1427, "SAR": 3.75, "SBD": 8.4929, "SCR": 13.4052, "SDG": 483.1032, "SEK": 10.8108, "SGD": 1.3557, "SHP": 0.7886, "SLL": 22028.3555, "SOS": 569.6586, "SRD": 38.1682, "SSP": 1010.0517, "STD": 22277.52876, "STN": 22.4483, "SVC": 8.778744, "SYP": 12965.1815, "SZL": 19.0551, "THB": 35.2049, "TJS": 10.8975, "TMT": 3.5001, "TND": 3.0912, "TOP": 2.3421, "TRY": 27.0597, "TTD": 6.7487, "TWD": 31.9279, "TZS": 2503.8295, "UAH": 36.9319, "UGX": 3712.5244, "USD": 1, "UYU": 38.0048, "UZS": 12127.6597, "VES": 31.5251, "VND": 23780.7686, "VUV": 120.7187, "WST": 2.7529, "XAF": 601.025, "XAG": 0.044504, "XAU": 0.001569, "XCD": 2.7, "XDR": 0.7506, "XOF": 601.025, "XPD": 0.001114, "XPF": 109.3387, "XPT": 0.001074, "YER": 250.4203, "ZAR": 19.0553, "ZMW": 19.2312, "ZWL": 4679.5902, "FOK": 6.8356, "KID": 1.5413, "SLE": 22.0284, "TVD": 1.5413}

The ruble is present in the dictionary and everything is working well again. At least for now. I will keep an eye on this issue and try to investigate it further.