Git Product home page Git Product logo

Comments (11)

uberfastman avatar uberfastman commented on August 26, 2024 1

@austinbeauch I've implemented a fix for this issue you've found in v4.1.1, in #23. Now when retrieving all players, if it fails on one of the requests it will attempt to individually retrieve all players in that request and simply skip failed players, and log the failures. Give it a whirl and see how it works for you. If any other problems arise regarding this, just reopen this issue.

from yfpy.

uberfastman avatar uberfastman commented on August 26, 2024

Hmm. A few thoughts pop out @austinbeauch… first, unless you intentionally censored your league ID, then that request URL will fail with the asterisks.

However if that was just you, I will say that I only just updated the functionality to iterate through all players 25 at a time and retrieve them all, as I’d been missing that before. I tested it but it’s possible something about an end condition where it gets to the last players is not catching and stopping correctly.

What fantasy sport are you retrieving players for?

from yfpy.

austinbeauch avatar austinbeauch commented on August 26, 2024

Thank for the speedy reply @uberfastman! That was indeed me who censored the league id. This is for hockey. I'm on the most recent version as well. It's weird because it's been working fine until last night/today. Could be more players were added to the league and it's creating a new edge case.

I know you developed this mainly focusing on NFL. If this seems to be NHL specific right now I can try and see what's causing it later day, just wanted to see if I was alone in experiencing this or not!

from yfpy.

uberfastman avatar uberfastman commented on August 26, 2024

No problem @austinbeauch, I’ll test it later on in one of my old hockey leagues and see if I can reproduce it. I definitely only tested the new functionality for NFL, but there’s no reason it shouldn’t work for NHL/NBA/MLB.

from yfpy.

austinbeauch avatar austinbeauch commented on August 26, 2024

Just a quick update as I'm working through this: this appears to not be an issue with some sort of end-of-list case. For whatever reason it's only at start=1425 that it throws an error. Skipping to start=1450 works. Something wonky is going on in that call. Something tells me that this is more an issue on Yahoo's end. I'll keep looking

from yfpy.

austinbeauch avatar austinbeauch commented on August 26, 2024

Yep, looks like Yahoo is getting upset that one of its own players "doesn't exist"

'Player key 411.p.8205 does not exist.'

Is the description of the returned response. Rather strange, considering he does exist, but not on the website players list.

When sorting all players available, it'll put plays with equal points in chronological order of their ID's. So everyone with zero points is sorted by increasing ID until the players with negative points. Viel hasn't played this year and should have zero points, but Kristians Rubins has an ID of 8191, so Viel at 8205 should come after, but he's absent from the list. However Viel does exist if you search him up manually.

image

Something strange is going on with Yahoo's API, Viel is somehow dropped from their list of players. I'm not sure exactly what the best way of handling this would be, since an easy solution would be to just ignore those 25 players, but it's possible someone important exists there. Could be worth it to contact Yahoo? Looks like they have an active rep on Reddit, u/YahooFantasyCare, that can report bugs to the engineering teams.

from yfpy.

uberfastman avatar uberfastman commented on August 26, 2024

Wow thanks @austinbeauch you did all the hard work for me! I was just getting on to take a look at this (I was traveling yesterday), and here you've already discovered the issue! Unfortunately the is not the first time Yahoo's API has had some questionable issues... I've been working with it for like 7 years and it's always been a mess.

Anyway, I'm gonna take a look at the player response for that particular request and see if I can implement some sort of error handling for this annoying edge case that will then retrieve all players that DO exist within that 25 player block and ignore failures.

from yfpy.

Pensfan66 avatar Pensfan66 commented on August 26, 2024

Kind of a similar issue, however I believe mine is an expired token issue.

What I'm trying to do is run the test_get_league_scoreboard_by_week() function on a thread in order to push live updates (every 30 sec) to a led matrix. So far it works flawlessly for about an hour and then 401 errors repeating. I restart the code and everything runs as it should for another hour until I hit 401's again. Looked into this in YF api documentation and it checks out that the token expires every hour.

Any thoughts on how I could code a refresh into the 401 error try/except portion? Or any thoughts in general on getting around this?

from yfpy.

uberfastman avatar uberfastman commented on August 26, 2024

@Pensfan66 if you don't mind, could you open a separate issue for the token refresh? That seems like a reasonable update to make, but just for the sake of keeping things somewhat organized I'd appreciate having a separate thread for it.

from yfpy.

austinbeauch avatar austinbeauch commented on August 26, 2024

Looks like it's working, thanks a ton for your effort!!

from yfpy.

uberfastman avatar uberfastman commented on August 26, 2024

@austinbeauch fantastic, glad we got it sorted! You did the hard leg work figuring it out after all, I just had to implement the workaround haha.

from yfpy.

Related Issues (20)

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.