Non-existing index or alias 'session1'

How to resolve this error?

Non-existing index or alias ‘session1’.

Hi Surya,

Based on the information you’ve given I’d say you’ve passed a session name to a keyword that expects an existing session, but you haven’t called the keyword that creates the session.

There’s not enough information here for anyone to help you, please

  • mention which library you are using,
  • show the test case that is giving you the error
  • make sure the error is the exact text of the error if it’s not

Dave.

1 Like

Thanks Dave
I have another doubt in the following snippet:

  FOR    ${item}    IN    @{response_json}
    ${Ids}=    Get From Dictionary    ${item}    Id
    ${Ids_str}=    Convert To String    ${Ids}
    ${Id_value_str}=    Convert To String    11111
    Run Keyword If    '${Ids_str}' == '${Id_value_str}'
    ...  Log    Get From Dictionary    ${item}    name 
END

Am getting the below error while executing this code
AttributeError: ‘dict’ object has no attribute ‘upper’

How to resolve this error.

Hello,

It seems you only call for Id or Name in the dictionary, however :

  • Is there any key or value ‘upper’ in your response_json (if error on second line) ?
  • And do you have somewhere else ${item} variable defined? I’m thinking of the value already set on first line, and searched in the dict

Also in step by step debugging, do you know on which line error occurs?

Regards

Charlie