'Not able to get type of value in robot framework

Not able to get type of value in robot framework. I got TypeError needs an argument. I tried multiple ways to sort this issue but no luck.

TC_005_Validate that Subscribing with Empty Mandatory fields should Failed
    [Documentation]  User need to check that the Invalid data is not allowed
    ${body}=  create dictionary  resource={"name":'',"display_id":'', "ont_id":'', "ont_name":''}  action=${ADD}
    ${response}=  HTTP_API  ${body}  ${type_subscriber}
    log to console   The status Code is: ${response.status_code}
    log to console  The Response Body is: ${response.json()}
    ${StatusCode}=  convert to string  ${response.status_code}
    should be equal  ${StatusCode}  500
    ${errrespose1}=  Fetch ErrCode  ${response}
    ${err1}=  convert to string  ${errrespose1}
    should be equal  ${err1}  -1
    ${messageResponse}=  Fetch message  ${response}
    ${message1}=  convert to string   ${messageResponse}
    log to console  The message is : ${message1}
    ${type1}=    Evaluate    type($message1)
    log to console    The type1:    ${type1}
    ${type2}=    Evaluate    type($Mandatorymsg)
    log to console    The type2:    ${type2}
    sleep  2s
    should be equal as strings   ${message1}   ${Mandatorymsg} 

OUTPUT:

[ WARN ] Keyword 'RequestsLibrary.Post Request' is deprecated. Please use `POST On Session` instead.
TC_005_Validate that Subscribing with Empty Mandatory fields shoul... C:\Users\Amit.Bhalla\AppData\Local\Programs\Python\Python310\lib\site-packages\urllib3\connectionpool.py:1043: InsecureRequestWarning: Unverified HTTPS request is being made to host '10.157.255.51'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
.The status Code is: 500
.The Response Body is: {'errCode': -1, 'message': 'Mandatory parameter name not provided for Subscriber '}
[ WARN ] Keyword 'RequestsLibrary.To Json' is deprecated. Please use ${resp.json()} instead. Have a look at the improved HTML output as pretty printing replacement.
TC_005_Validate that Subscribing with Empty Mandatory fields shoul... {'errCode': -1, 'message': 'Mandatory parameter name not provided for Subscriber '}
-1
-1
[ WARN ] Keyword 'RequestsLibrary.To Json' is deprecated. Please use ${resp.json()} instead. Have a look at the improved HTML output as pretty printing replacement.
TC_005_Validate that Subscribing with Empty Mandatory fields shoul... {'errCode': -1, 'message': 'Mandatory parameter name not provided for Subscriber '}
**..The message is : Mandatory parameter name not provided for Subscriber**
TC_005_Validate that Subscribing with Empty Mandatory fields shoul... | FAIL |
**TypeError: unbound method str.lower() needs an argument** 


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source