Git Product home page Git Product logo

Comments (1)

Pringleman83 avatar Pringleman83 commented on July 23, 2024

This has been resolved. This was a very strange issue and I'm still not entirely sure of what the cause was. I believe it was something to do with the way the values were assigned.

In testing, I found that if I added a league by selecting it and having it scraped, when I left the menu and returned, it was still there. However, if I added a league via an import from a JSON file, even though the dictionary appeared identically, when I left the function, the dictionary was empty. This was still the case if I swapped out the code that returned the league dictionary so that it returned the import dictionary.

I've solved it by having the leagueData dictionary initialised at the very start of the application and calling the import function from the football menu. This means it all operates in one file. Amongst the various other things I tried.

A trace of the bug still exists. If you import a JSON file, all appears fine. If you exit back to the main menu and then go back into football, the leagueData dictionary is empty again. However, if you select a league from the league selection menu, it stays even when you exit to the main menu. Strange!

from sportsbook.

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.