Unable to place a football bet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #16
    These are the error codes available: https://api.developer.betfair.com/se...APINGException

    I wonder if your code for catching errors can reveal more detail?

    Comment

    • betdynamics
      Junior Member
      • Sep 2010
      • 534

      #17
      I don't know Python but, looking at your code, it appears that you are wrapping the selectionId in quotes.

      SelectionId is a numerical value, not a string value.

      Try removing the quotes that you use to wrap the selectionId value when you compose your request.

      Comment

      • jabe
        Senior Member
        • Dec 2014
        • 705

        #18
        It's a good idea, though I varied several in that way without it making any difference. I had the handicap as "0", 0, 0.0 and all were accepted in the end. Similar with the marketId, and the size and price of bets.

        I wondered whether LAPSE was invalid in play, but it turned out to be okay.

        Comment

        • stranoamedeo
          Junior Member
          • Mar 2016
          • 8

          #19
          Ok i found the error, there was a ACCESS_DENIED exception and i corrected it!

          Now the bet was made but i received this error :

          Traceback (most recent call last):
          File "soccerbet.py", line 224, in <module>
          placeFailingBet(soccerMarketID, soccerSID1)
          File "soccerbet.py", line 158, in placeFailingBet
          print 'Exception from API-NG' + str(place_order_load['error'])
          KeyError: 'error'


          Originally posted by jabe View Post
          These are the error codes available: https://api.developer.betfair.com/se...APINGException

          I wonder if your code for catching errors can reveal more detail?

          Comment

          • jabe
            Senior Member
            • Dec 2014
            • 705

            #20
            Glad to hear your bet was placed.

            The key error... is that a Python error? I don't know how Python deals with objects, but I assume

            place_order_load['error']

            is retrieving something from place_order_load and is unable to. Perhaps there is no 'error' to retrieve? Could place_order_load['error'] be nothing? Guessing though.
            Last edited by jabe; 04-03-2016, 05:00 PM.

            Comment

            • stranoamedeo
              Junior Member
              • Mar 2016
              • 8

              #21
              Thanks to your support,
              What do you think about thos error?
              Originally posted by jabe View Post
              Glad to hear it.

              Comment

              • jabe
                Senior Member
                • Dec 2014
                • 705

                #22
                Hi, sorry - I re-read your post and changed mine when I realised you still have an error and before I noticed you'd replied to it. I don't know if anything in the changed version might help.

                This might help: https://wiki.python.org/moin/KeyError
                Last edited by jabe; 04-03-2016, 06:05 PM.

                Comment

                Working...
                X