Error IB API

Discussion in 'Automated Trading' started by Leopard9, Sep 25, 2024.

  1. spy

    spy

    Don't worry, when it comes to these issues I'm quite used to it.

    Delicious! Sprinkle some bugs on top and it's even better ;-)
    [​IMG]
     
    Last edited: Sep 27, 2024
    #51     Sep 27, 2024
  2. spy

    spy

    What the meme really, really, fails to point out is "Default parameter values are always evaluated when, and only when, the “def” statement they belong to is executed"(1).

    So my prior suggestion was wrong too.

    And the article points out that the meme should be rewritten to resemble:
    Code:
    def myfunc(value=None):
        if value is None:
            value = []
            # modify value here
    
    If you want to elaborate on how you'd rather accomplish this in your language of choice, I'm all ears. There's certainly more than one way to do it.

    Q. Why is this so clumsy?
    A. The trick is to use Perl's strengths rather than its weaknesses.
    --- Larry Wall in <8225@jpl-devvax.JPL.NASA.GOV>
    s/Perl/your language/ig
     
    #52     Sep 27, 2024
  3. d08

    d08

    I started my programming with perl. I opened some script years later and was confused at the black magic I saw.
     
    #53     Sep 27, 2024
    spy likes this.
  4. d08

    d08

    Dude who immediately went for personal attacks is suddenly touchy when someone else does the same for him. I'm sure you don't remember the start of the thread where I talked strictly about python and you jumped in with calls of "fanboy" and other colorful language.
     
    #54     Sep 27, 2024
    -Orion, spy and rb7 like this.
  5. spy

    spy

    I didn't even mean for my comment to be an attack TBH... I just thought coursework would help, keep an open mind and never stop learning. Is that so wrong?

    Lol, took me 3 tries to figure out why the meme was wrong. It's a big world and you must persevere; you can't know everything. It takes work.
     
    #55     Sep 27, 2024
    d08 likes this.
  6. I am not touchy, simply don't waste any time with that.
     
    #56     Sep 27, 2024
  7. Leopard9

    Leopard9


    Picking up on this now and before I made any changes it is now working without any errors. Maybe this is an ever changing condition?
     
    #57     Sep 29, 2024
  8. :D:D:D
     
    #58     Sep 29, 2024
    spy likes this.
  9. Leopard9

    Leopard9

    Asked around:

    Here is what i was told:

    Option 1:

    upload_2024-9-30_12-33-59.png

    option 2:

    upload_2024-9-30_12-34-29.png

    Option 3 and 4:

    upload_2024-9-30_12-35-55.png


    Any thoughts on what would be the best route?

    thanks!
     
    #59     Sep 30, 2024
  10. 2rosy

    2rosy

    #60     Sep 30, 2024
    Baron and d08 like this.