From eb3d52a0718d830a6e806dba44e800058e689095 Mon Sep 17 00:00:00 2001 From: Neythen Date: Mon, 21 Jun 2021 17:41:18 +0100 Subject: [PATCH] bug fix --- csv/crypto.csv | 4 ++-- csv/current_weather.json | 2 +- csv/last_update.csv | 2 +- csv/tickers.csv | 6 +++--- final.ppm | Bin 251631 -> 251631 bytes full.ppm | Bin 629775 -> 629775 bytes log.txt | 9 --------- server.py | 2 +- stockTicker.py | 5 +++-- 9 files changed, 11 insertions(+), 19 deletions(-) diff --git a/csv/crypto.csv b/csv/crypto.csv index a02d997..eb4a213 100644 --- a/csv/crypto.csv +++ b/csv/crypto.csv @@ -1,3 +1,3 @@ symbol,name,base,current,24hr change -BTC,bitcoin,usd,32687,-5.959078724239707 -ETH,ethereum,gbp,1419.67,-7.467260572537722 +BTC,bitcoin,usd,32709,-5.776193166295658 +ETH,ethereum,gbp,1419.48,-7.468105883111548 diff --git a/csv/current_weather.json b/csv/current_weather.json index 2d1a69e..5ebf130 100644 --- a/csv/current_weather.json +++ b/csv/current_weather.json @@ -1 +1 @@ -{"main_weather": "Clouds", "description": "overcast clouds", "temp": 29.9, "min_temp": 27.98, "max_temp": 30.74, "feels_like": 36.9, "humidity": 88, "clouds": 100, "wind_speed": 0.45, "wind_direction": 257, "visibility": 10000, "uv": 0, "rain_chance": 0.74} \ No newline at end of file +{"main_weather": "Clouds", "description": "overcast clouds", "temp": 29.78, "min_temp": 27.98, "max_temp": 30.21, "feels_like": 36.78, "humidity": 88, "clouds": 100, "wind_speed": 0.89, "wind_direction": 278, "visibility": 10000, "uv": 0, "rain_chance": 0.74} \ No newline at end of file diff --git a/csv/last_update.csv b/csv/last_update.csv index 0c796ce..4b1479d 100644 --- a/csv/last_update.csv +++ b/csv/last_update.csv @@ -1 +1 @@ -21/06/2021 12:36:08 +21/06/2021 12:41:07 diff --git a/csv/tickers.csv b/csv/tickers.csv index 0ef83c2..5699afb 100644 --- a/csv/tickers.csv +++ b/csv/tickers.csv @@ -1,4 +1,4 @@ name,current,opening -MSFT,262.3758,259.82 -NFLX,494.8007,501.64 -GOOG,2530.35,2514.8 +MSFT,262.3,259.82 +NFLX,495.166,501.64 +GOOG,2529.965,2514.8 diff --git a/final.ppm b/final.ppm index d2f037556d941c766e84a0e0a4f094db49ed4fbc..66a9adc737fd9aba7a85756ad3e136424afde8a9 100755 GIT binary patch delta 3824 zcmZ{nag0<~6~;6726WSf8D}%NvSm7(4vrbJ^)(w;*DmacLRYrC&H}BiNSRXGG(^I% zHVwvr^eC8u8BCq@+g7pp;&;1F~eu^p$g`cSyb* zNs4z@q*F>;%)g}m#YjRLJ0jVMR8$XTn}!*wZ!ihTuQRPuJ7YIC{j|!{hx}*T@R$|* z4O5rYnCX+!e4Cui+8!Qz*IM_=c){$RNG;}ZWRV;hF;4~;{nVt@xL<0on%#P;R|>PX zZ}I}qW5aw9R2+vHiT%dRms{7H-%q4k!+iSmnw@GpCNrB%w)*qC%<{N2vbI+mhd5u^ zX)=;JW(K4%XuWdbkv--5sYG?je)E+`dFoVFA9v~bmEt|j(W&Qci&Tcpuy2$<%D>)L zvrh)^iL}a@t>%}Kn6ZL9&~7|tTc!RJ+abj#%qjx^lBV1yYm4TP z4>GntUcqyEIM^Y=CWAZPJrY4|onHzC=RU&Tr3P-D zKAmzqBb}2E5G815CBMsh;dNDFyFH@!x-4)*Z0Bve6idWh%WGz{7RGGBFg0YNQjFS+ zT5}{}S4ib|=~yw$SoXXb2}je_S`lK$TqVlQw*qs?~9)L&s~;Uv&BUNw)( z%QJKa5Jr7sQpW!4phq@=DS=JeJ}JDVyu4uP=goYBI#GF`V$S*HqL%>c8a%60&zXJ7 zo}`8cfIu{n0;T$8R{69j9;3=$-Sp_sm1>s> z>{eI*bk5jF69rcZ{~C=csRp}2(6Q%6+4Gt?;HM7GE>_|SSP1o3`P`|zqI^Nd8T2#c1<+izc7>7$2V2p|9Ggo7Wv7Tcq~B$tVQ@g%}+ugmalv!s8H> zl_4lqK-m?M*r;jI%X;+Mw9m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nQD*nf6?w|*Kgd({=t#XDUd0Ktdjc4nW+LYy-A(TvvtqJ+dhtigy1Ld<7Wk>mwlKEr1M(Er3K*~?P&sdX*r zs6q<8MO^ktAl_6`0-ZYH87#~8s zNFt~lU%7rkWh#5RalDL0jg&sEx1w0QmRJ^DxMUS~=sj#vu4~mx3I-JkvDS!jbe2yh zZYp24RjXw+uaRx_maS4flmrSeXvSw48{*X)VmsB{k6c0oafQW&mPh|~IQ2Ng5PdD4 zyW7T35ou^tba6OrebOr_ce%MroMKXRWCYkW(2*6!OV+vQ8F0Mbcm(e|tlM&F17eg{ z@m$K{PFJ6?h0-hG2appsN_a8O)2iwnTWUO7^+D|Q(AcBK+tqCeYjJXu5uwssxRXGP RrHS&Dy~muh#`yc9{{i@p8D#(f diff --git a/log.txt b/log.txt index 70b5fcd..e69de29 100755 --- a/log.txt +++ b/log.txt @@ -1,9 +0,0 @@ -'Sheffield United'. file: stockTicker.py. line: 1402. type: - Traceback (most recent call last): - File "stockTicker.py", line 1402, in - stock_ticker.process_msg('P') - File "stockTicker.py", line 1361, in process_msg - img = self.getLeagueImage('premier_league', 'past') - File "stockTicker.py", line 680, in getLeagueImage - h_colour = mcolors.to_rgb(sports_info[home_team]['colour'].replace(' ', '')) -KeyError: 'Sheffield United' diff --git a/server.py b/server.py index 9fcc048..606678d 100644 --- a/server.py +++ b/server.py @@ -37,7 +37,7 @@ ALLOWED_EXTENSIONS = {'csv', 'png'} #time.sleep(10) # let api calls finish ticker = pexpect.spawn("sudo -E python3 stockTicker.py") -ticker.sendline('S') # run by default +ticker.sendline('A') # run by default #stock_ticker = StockTicker() def allowed_file(filename): diff --git a/stockTicker.py b/stockTicker.py index 7d363bb..bc2403a 100644 --- a/stockTicker.py +++ b/stockTicker.py @@ -599,7 +599,7 @@ class StockTicker(): sports_info = self.readSportsCSV(league) - print(sports_info) + buff_size = 25 @@ -1398,7 +1398,8 @@ if __name__ == '__main__': with open('log.txt', "w") as log: try: - + stock_ticker = StockTicker() +