Closed mehdibaha closed 5 years ago
Seems like you are using windows. I didn't test it out on that. Let me test it out on windows I will let you know.
I append this issue ticket here with another one I get on win10 powershell.
PS C:\Users\Hermann> soccer --standings --league=BL
POS CLUB PLAYED GOAL DIFF POINTS
Traceback (most recent call last):
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\Scripts\soccer-script.py", line 9, in <module>
load_entry_point('soccer-cli==0.0.2.4', 'console_scripts', 'soccer')()
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\lib\site-packages\click\core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\lib\site-packages\click\core.py", line 680, in main
rv = self.invoke(ctx)
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\lib\site-packages\click\core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\lib\site-packages\click\core.py", line 508, in invoke
return callback(*args, **kwargs)
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\Scripts\main.py", line 179, in main
get_standings(league)
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\Scripts\main.py", line 92, in get_standings
print_standings(req.json())
File "C:\Users\Hermann\AppData\Local\Programs\Python\Python35\Scripts\main.py", line 108, in print_standings
goaldiff=str(team["goalDifference"]), points=str(team["points"])
TypeError: non-empty format string passed to object.__format__
Every other command is working perfect, only --standings
lead to this error message.
Hi @Heart1010 ! Unfortunately, I don't have a windows machine and I am not able to reproduce this error on my linux. It would be nice if someone in the community could help me with this.
Latest git, cmd on Windows 10, Python 2.7.10 (Anaconda):
[py2] C:\Users\thurask\git\soccer-cli>soccer --standings --league=BL
POS CLUB PLAYED GOAL DIFF POINTS
1 Borussia Dortmund 3 10 9
2 FC Bayern M├╝nchen 3 9 9
3 VfL Wolfsburg 3 4 7
4 1. FC K├╢ln 3 3 7
5 1. FSV Mainz 05 3 3 6
6 Bayer Leverkusen 3 -1 6
7 FC Ingolstadt 04 3 -2 6
8 Eintracht Frankfurt 3 2 4
9 FC Schalke 04 3 0 4
10 Hertha BSC 3 -1 4
11 Werder Bremen 3 -2 4
12 SV Darmstadt 98 3 0 3
13 Hamburger SV 3 -5 3
14 TSG 1899 Hoffenheim 3 -2 1
15 FC Augsburg 3 -2 1
16 Hannover 96 3 -4 1
17 VfB Stuttgart 3 -6 0
18 Bor. M├╢nchengladbach 3 -6 0
The same, but with Python 3.4.3:
C:\Users\thurask\git\soccer-cli>soccer --standings --league=BL
POS CLUB PLAYED GOAL DIFF POINTS
Traceback (most recent call last):
File "C:\Users\thurask\Anaconda3\Scripts\soccer-script.py", line 9, in <module>
load_entry_point('soccer-cli==0.0.3.1', 'console_scripts', 'soccer')()
File "C:\Users\thurask\Anaconda3\lib\site-packages\click-5.0-py3.4.egg\click\core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "C:\Users\thurask\Anaconda3\lib\site-packages\click-5.0-py3.4.egg\click\core.py", line 680, in main
rv = self.invoke(ctx)
File "C:\Users\thurask\Anaconda3\lib\site-packages\click-5.0-py3.4.egg\click\core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\thurask\Anaconda3\lib\site-packages\click-5.0-py3.4.egg\click\core.py", line 508, in invoke
return callback(*args, **kwargs)
File "C:\Users\thurask\Anaconda3\lib\site-packages\soccer_cli-0.0.3.1-py3.4.egg\EGG-INFO\scripts\main.py", line 190, in main
File "C:\Users\thurask\Anaconda3\lib\site-packages\soccer_cli-0.0.3.1-py3.4.egg\EGG-INFO\scripts\main.py", line 97, in get_standings
File "C:\Users\thurask\Anaconda3\lib\site-packages\soccer_cli-0.0.3.1-py3.4.egg\EGG-INFO\scripts\main.py", line 113, in print_standings
TypeError: non-empty format string passed to object.__format__
Thanks @thurask for clearing it out. @Heart1010 the package isn't python3.x
compatible, you'll need to use it with python2.x
. Let me know if that resolves the issue.
2015-09-02 21:49 GMT+02:00 Archit Verma notifications@github.com:
Thanks @thurask https://github.com/thurask for clearing it out. @Heart1010 https://github.com/Heart1010 the package isn't python3.x compatible, you'll need to use it with python2.x. Let me know if that resolves the issue.
— Reply to this email directly or view it on GitHub https://github.com/architv/soccer-cli/issues/1#issuecomment-137224991.
@Heart1010 if you change team=u''.join(team["teamName"]).encode('utf-8')
to just team["teamName"]
, in the print_standings
function in main.py
, it should work fine in python3.
I'm having the same issue but in Python 2.7
@nare469 Thanks!
Hi, Thanks for this, i hope we get it working soon, i have similar issue, im using Archlinux and on launch i get ..
cirrus blade soccer-cli soccer --standings --league=EPL
Traceback (most recent call last):
File "/usr/bin/soccer", line 9, in
heh i fixed my error by simply sourcing my ~/.zshrc where i point to the API key, after sourcing it works great, i LOVE it, thanks brogrammer. heres a handy function
score() { watch -n10 --no-title "w3m http://www.livescore.com/ |awk '/live [0-9H]+[^ ]/,/red cards/'" ; }
After successfully installing soccer-cli, this is the traceback error I'm getting when trying to use it
Thanks !