• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-PGA

Scheduled Pinned Locked Moved Sport
48 Posts 7 Posters 29.7k Views 7 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    swvalenti Project Sponsor @sdetweil
    last edited by swvalenti Jul 30, 2021, 6:10 PM Jul 30, 2021, 3:05 PM

    @sdetweil Not sure I follow Sam I am new to json

    S 1 Reply Last reply Aug 1, 2021, 1:38 PM Reply Quote 0
    • S Offline
      swvalenti Project Sponsor @swvalenti
      last edited by Aug 1, 2021, 1:38 PM

      @cowboysdude @Mykle1 Calling on the big guns here if you have any ideas :face_with_tongue:

      S 1 Reply Last reply Aug 5, 2021, 8:44 PM Reply Quote 0
      • S Offline
        swvalenti Project Sponsor @swvalenti
        last edited by Aug 5, 2021, 8:44 PM

        Can anyone explain or help me to try and get this module working again? Seems simple enough as ‘athlete’ is throwing the error but idk where to start.

        S 1 Reply Last reply Aug 5, 2021, 8:50 PM Reply Quote 0
        • S Away
          sdetweil @swvalenti
          last edited by Aug 5, 2021, 8:50 PM

          @swvalenti as I said, u can use some tools in the coding to get the json data structure printed out so you can examine it

          or, use the url in a browser to collect the info.

          once u have that you can attempt to find the info the module needed
          and maybe change the code to match

          I use this site for validating json documents
          https://codebeautify.org/jsonvalidator?/jsonvalidate

          but it also allows you to format the data in a more readable fashion

          the code is trying to extract the player from the data returned
          Cannot read property ‘athlete’ of undefined
          0|MagicMirror | at Request._callback (/home/pi/MagicMirror/modules/MMM-PGA/ESPN.js:49:65)

          the code is the ESPN.js line 45, column 65

          u also may get noting back from the api at all…

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Aug 5, 2021, 8:52 PM Reply Quote 0
          • S Offline
            swvalenti Project Sponsor @sdetweil
            last edited by Aug 5, 2021, 8:52 PM

            @sdetweil Ok but which url do I use to check the json?

            S S 2 Replies Last reply Aug 5, 2021, 8:54 PM Reply Quote 0
            • S Offline
              swvalenti Project Sponsor @swvalenti
              last edited by Aug 5, 2021, 8:54 PM

              I just commented that line out and now it works! HA

              1 Reply Last reply Reply Quote 0
              • S Away
                sdetweil @swvalenti
                last edited by Aug 5, 2021, 9:07 PM

                @swvalenti the url used by the code to get the data from the api…

                I don’t know the module at all, just trying to give some help.

                Someone (You) will have to become the programmer.
                learn how the module works in enough detail to :

                  1. find where the error occurs (this is given to you)
                  1. develop some mechanism to capture the data that results in the failure
                  1. analyze the data to determine the cause
                  1. develop a strategy for fixing the ‘problem’
                  1. apply the strategy to the existing code

                  repeat 1-5 til you have resolved the problem(s) successfully, or abandon the task

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                S M 2 Replies Last reply Aug 5, 2021, 11:16 PM Reply Quote 0
                • S Away
                  sdetweil @sdetweil
                  last edited by Aug 5, 2021, 11:16 PM

                  @swvalenti you could also open an issue on the module github page and hope the author might look at it… has updates from about 9 months ago…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 0
                  • M Offline
                    mumblebaj Module Developer @sdetweil
                    last edited by Aug 6, 2021, 11:11 AM

                    @sdetweil It is a screen scraper. I see he says he commented some line and it is working again for him.

                    Check out my modules at: https://github.com/mumblebaj?tab=repositories

                    S 1 Reply Last reply Aug 6, 2021, 12:28 PM Reply Quote 0
                    • S Away
                      sdetweil @mumblebaj
                      last edited by Aug 6, 2021, 12:28 PM

                      @mumblebaj cool. but doesn’t change the work

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      S 1 Reply Last reply Aug 6, 2021, 6:42 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 2 / 5
                      2 / 5
                      • First post
                        18/48
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy