Solve the error reported by python to read the login interface in excel

1. Problem

After the requests are packaged, call the url, method, and data of the login interface in excel, and the interface reports 500

insert image description here

But directly input parameters, the interface can return 200 normally

insert image description here

2. Reason

Because the type of value read from excel is str

insert image description here

The type of data is actually a dictionary

insert image description here

3. Solve

The problem becomes how to convert the string type to a dictionary, here you need to use dict = eval(str)the function

insert image description here

Guess you like

Origin blog.csdn.net/z12347891/article/details/129626144