Tried running first_script exactly as is in lesson 1 video, but got error message:

Could not submit job
HTTP Code: 400
Error Code: 2055
Given data does not match required structure or type. Field: "deque([u'properties',u"accounts',u'items',u'properties'u'tests,u'minItems'])", error message: "[] is too short"

Comments

  • Can you post the script here? It seems that there's a bug with your code: "deque([u'properties',u"accounts',u'items',u'properties'u'tests,u'minItems'])", "accounts' should be 'accounts'

  • from cloudquant.interfaces import Strategy

    class first_script(Strategy):

    # note that this doesn't start with "self" because it's a @staticmethod
    @classmethod
    def is_symbol_qualified(cls, symbol, md, service, account):
        return symbol in ['IBM', 'GS', 'MSFT', 'AMZN']
    
    # called at the beginning of each instance  
    def on_start(self, md, order, service, account):
        print('Current Symbols:\t' + self.symbol)
        print('Current Time:\t' + service.time_to_string(service.system_time) + '\n')
    
    def on_finish(self, md, order, service, account):
        print('on_finish\t Current Symbols:\t' + self.symbol)
        print('on_finish\t Current Time:\t' + service.time_to_string(service.system_time) + '\n')
    
  • ms778834ms778834 Posts: 28

    Try forking it from Public Scripts instead of copy-pasting it.

  • Hi Martin, can you please explain the difference? Thanks.

  • Without changing anything in the script, I just re-ran and now it worked. Not sure why. Maybe server was down?

  • ms778834ms778834 Posts: 28

    Aha. Well, from what you've experienced it now seems like a backend error -
    could be the server, such a thing can happen during and/or after update. I thought that maybe when you copied the script, your computer saved it as Unicode, while only ASCII characters are allowed in CloudQuant code (it cannot hash any other format)→ this had happened to me, probably as I accidentally copied a character which was not part of the particular source code (you know, selecting the code with mouse...).

  • ms778834ms778834 Posts: 28
    edited April 2017

    Plieberman, do you still remember what date range you chose for your 1st backtest and/or any backtest|s| which you could not submit?

Sign In or Register to comment.