Problem sending Scope

Problem sending Scope

@Leandro Augusto Machado

Hi,

I have an analysis sending scope for another analisys.

I tried Python SDK doc:

import tago

my_account = tago.Account('MY_ACCOUNT_TOKEN')

# Your scope can be an array with several objects
scope = [
    {
        'variable': 'alarm',
        'value': 'On'
    }
]

result = my_account.analysis.run('ANALYSIS_ID_HERE', scope)
print(result)

I´m getting this error on console:
{'status': False, 'result': {'request_error': 'Unexpected token v in JSON at position 0', 'request_body': 'variable=value', 'server_response': 'Malformed request syntax'}}

I tried to dump scope:

scope = json.dumps([

    {

      'variable': 'data_final_mensal_cafe',

      'value': str(filter_last_day)

}])

It´s ok on console when I print result:
{'status': True, 'result': 'Starting analysis'}

But I´m not getting anything when I try to log scope on another analysis (Node.js):
async function myAnalysis(context, scope) { context.log(JSON.stringify(scope));

Could you help me?