xlsスプレッドシートのデータに基づいて辞書を作成しようとしています。以下は私のコードです。しかし、 "辞書に設定"(以下のコードの最後の行)を実行すると、次のエラーが表示されます。TypeError: 'unicode'オブジェクトはアイテムの割り当てをサポートしていません。私は何が欠けているかに関する任意のアイデア?辞書を作成しようとするとオブジェクトの割り当てエラーが発生する(Robot Framework)
*** Settings ***
Library ExcelLibrary
Library Collections
*** Variables ***
${PageSheetName} = Welcome Page
${WelcomeDict} = Create Dictionary
*** Test Cases ***
Excel Sandbox Test
Get Values from Spreadsheet
#Print out the Dictionary
*** Keywords ***
Get Values from Spreadsheet
# Open the file
Open Excel Current Directory ${Excel_File_Path}DataExtract.xls
# Get the number of rows
${iTotalRows} = Get Row Count ${PageSheetName}
# Loop through each row to get the data. Only need data from Columns A & B
: FOR ${iRowNum} IN RANGE 1 ${iTotalRows}+1
\ ${KeyVal} = Read Cell Data By Name ${PageSheetName} A${iRowNum}
\ ${Value} = Read Cell Data By Name ${PageSheetName} B${iRowNum}
\ Create the Welcome Page Dictionary ${KeyVal} ${Value}
Create the Welcome Page Dictionary
[Arguments] ${key} ${val}
Set To Dictionary ${WelcomeDict} ${key} ${val}