Giter Club home page Giter Club logo

mikemountain / fantasy-football-scoreboard Goto Github PK

View Code? Open in Web Editor NEW
56.0 14.0 9.0 43.8 MB

Display the score of your fantasy football team on a Raspberry Pi driven RGB LED matrix for maximum ease of disappointment

License: GNU General Public License v3.0

Python 99.92% Shell 0.02% PowerShell 0.03% Batchfile 0.03%
sleeper raspberry-pi scoreboard fantasy-football fantasy-football-scoreboard led-matrix espn-fantasy-football yahoo-fantasy-football

fantasy-football-scoreboard's People

Contributors

jeremywww avatar mikemountain avatar mmethot avatar tjhall9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fantasy-football-scoreboard's Issues

Post game win/loss not working properly

Booted up my machine and it told me I already won my week 2 matchup, somehow. Even if I like that, it's still wrong. Gotta fix it before merging into master

Feature Request - Sleeper league median

A lot of leagues are playing with league median now, would love to have this on screen in small text between the logos.

Might try to attempt this myself but haven't done much API work yet so no promises.

128x64 support?

Hi!

I loved using this last code year with my Yahoo league. Recently, and with great tumult, I upgraded my board to 128x64 for Baseball which looks awesome. Would it be possible to have that support added? It would just be a resolution bump. I don’t need more info added, unless you feel adventurous. I could also look into adding it, but I fear it’ll take a newbie like me (when it comes to python coding) forever to get it working.

Error with datetime in data.py

Hi,

I'm getting this error when I try to launch the program.

Traceback (most recent call last):
File "main.py", line 27, in
data = Data(config)
File "/home/pi/fantasy-football-scoreboard/data/data.py", line 25, in init
self.refresh_start()
File "/home/pi/fantasy-football-scoreboard/data/data.py", line 73, in refresh_ start
start_delta = datetime.strptime("{} 20:20:00 EDT".format(self.config.opening _day), "%Y-%m-%d %H:%M:%S %Z") - datetime.now()
File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime
(data_string, format))
ValueError: time data '2020-09-10 20:20:00 EDT' does not match format '%Y-%m-%d %H:%M:%S %Z'

Yahoo logos issue

If anyone is having issues with the yahoo league the code for 2023 is 423 and then also try, mkdir logos; sudo chmod 0777 logos/

ESPN?

Hi,
are there any indications that the ticker will feature espn driven leagues for the new season?

Really looking forward to it...

Can't run on RPi Zero W 2

Upgraded to the Zero W 2 (mostly for enough power for NHL scoreboard) and I can't get the script to run. I get through a clean install but after calling main.py, the script gets as far as "getting teams" before my terminal becomes unresponsive and I have to unplug my Pi to get back. This is both with the default config file and with a copy of my previous config file from my previously-working original Zero W.
Haven't heard a lot about potential issues surrounding such a new board just yet, and this issue doesn't make a lot of sense. I'm able to run NFL-led-scoreboard just fine and a second clean install of this didn't help.

How close to Yahoo integration

I love this idea. It’d be awesome to keep the scoreboard above my TV setup so I don’t have to keep glancing at my phone and it would extend my scoreboard usage that I’m currently using for MLB scores. However, I’m a Yahoo user through and through. How soon down the road is Yahoo integration?

Showing Bench Players Scores

I got all my hardware in Thursday all pumped to try this out, only to see that Sleeper changed their API. Super glad you were able to get this back up and running. I just completed my scoreboard and my opponents score is showing his bench players scores as well. Is it something I did? Is it something that I just have to deal with? If so, no big deal. Just happy you were able to get this back up and running. Thanks

Team pictures don't update

Small bug, but if a team changes their picture midway through the year, it'll use their original picture. Maybe add a flag to say whether to check for team logo updates every week

NameError: global name 'matchup_info' is not defined

Getting the following traceback upon running
sudo python main.py --led-gpio-mapping=adafruit-hat --led-cols 64

INFO (22:57:16): Sleeper FF Scoreboard - v0.0.5 (64x32)
INFO (22:57:17): getting teams
INFO (22:57:18): getting avatars
INFO (22:57:20): render draft info
INFO (22:57:20): 459797164151795712
INFO (22:57:20): getting draft
INFO (22:57:20): getting list of players
uh oh?
Traceback (most recent call last):
File "main.py", line 29, in
MainRenderer(matrix, data).render()
File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 35, in render
self.__render_draft()
File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 76, in __render_draft
self.data.refresh_draft()
File "/home/pi/fantasy-football-scoreboard/data/data.py", line 60, in refresh_draft
self.draft = sleeper.get_draft(self.league_id)
File "/home/pi/fantasy-football-scoreboard/data/sleeper_api_parser.py", line 132, in get_draft
return matchup_info
NameError: global name 'matchup_info' is not defined

I just created a league with only myself in it, nothing yet scheduled. Could this be why it's throwing errors or did Sleeper break the API during the offseason?

Issue with trying to run program with ESPN & Sleeper

Capture

When I'm trying to run the program I am getting an error:

Traceback (most recent call last):
File "/home/sam/fantasy-football-scoreboard/main.py", line 38, in
data = Data(config)
File "/home/sam/fantasy-football-scoreboard/data/data.py", line 23, in init
self.api = self.choose_api()
File "/home/sam/fantasy-football-scoreboard/data/data.py", line 38, in choose_api
return espn.ESPNFantasyInfo(self.config.espn_league_id, self.config.espn_team_id, self.config.espn_swid, self.config.espn_s2, self.week, self.config.season)
File "/home/sam/fantasy-football-scoreboard/data/espn_api_parser.py", line 19, in init
self.teams_info = self.get_teams()
File "/home/sam/fantasy-football-scoreboard/data/espn_api_parser.py", line 114, in get_teams
owner = user['primaryOwner']
KeyError: 'primaryOwner'

TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

The script ran fine until the first kickoff of the year, but then it crashed.

Here's the log output:

INFO (21:57:57): Sleeper FF Scoreboard - v0.0.2 (64x32)
INFO (21:57:57): getting draft
INFO (21:57:59): getting teams
INFO (21:58:01): getting avatars
INFO (21:58:06): render game
INFO (21:58:06): Live State, checking every 1s
Traceback (most recent call last):
  File "main.py", line 29, in <module>
    MainRenderer(matrix, data).render()
  File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 39, in render
    self.__render_game()
  File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 67, in __render_game
    self._draw_game()
  File "/home/pi/fantasy-football-scoreboard/renderer/main.py", line 181, in _draw_game
    if matchup['user_score'] > user_score + 5 or matchup['opp_score'] > opp_score + 5:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

I have no players playing until sunday, so I guess Sleeper return null as the matchup['user_score'] value, which probably generates the error.

Permission denied fetching logos

Hey, think I'm pretty close to getting this working, using a Sleeper league, Got the league ID and user ID but when I run main.py I get

PermissionError: [Errno 13] Permission denied: '/home/pi/fantasy-football-scoreboard/logos'

Any ideas?

module not found error: Yahoo_oauth

I followed the instructions the best I could. Ran the yahoo install both in the fantasy_football_scoreboard directory and in the pi directory. But still getting this. I also ran the command to create the auth folder and manually created the token.json with the auth code from the app program once I authorized it. Any help would be appreciated. Thank you.

image

Wrong scores on Tuesday

Found this out after a trade happened, is also connected to the Sleeper matchup rework that was done on the fly. Players are removed from the lineup that the board reads the scores from, so teams are missing points if a player is traded. Might need to look into storing the scores locally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.