[{"data":1,"prerenderedAt":2086},["ShallowReactive",2],{"doc-\u002Ferrors\u002Fvalueerror-too-many-values-to-unpack-fix":3},{"id":4,"title":5,"body":6,"description":2079,"extension":2080,"meta":2081,"navigation":129,"path":2082,"seo":2083,"stem":2084,"__hash__":2085},"content\u002Ferrors\u002Fvalueerror-too-many-values-to-unpack-fix.md","ValueError: too many values to unpack (Fix)",{"type":7,"value":8,"toc":2047},"minimark",[9,13,21,24,47,50,55,221,224,228,231,234,285,288,303,306,314,317,321,360,363,393,396,413,416,480,482,496,500,503,506,520,528,532,535,540,623,625,644,648,739,741,757,760,771,775,778,784,884,886,918,925,928,939,942,1007,1009,1031,1038,1042,1045,1123,1126,1129,1210,1212,1234,1238,1241,1312,1315,1322,1329,1332,1380,1387,1425,1429,1514,1518,1524,1602,1604,1623,1634,1638,1641,1644,1691,1694,1732,1735,1763,1767,1785,1787,1864,1866,1913,1916,1920,1923,1948,1952,1955,1976,1980,1984,1987,1994,1997,2001,2007,2011,2014,2018,2043],[10,11,5],"h1",{"id":12},"valueerror-too-many-values-to-unpack-fix",[14,15,16,20],"p",{},[17,18,19],"code",{},"ValueError: too many values to unpack"," happens when Python tries to assign more values than your variables can hold.",[14,22,23],{},"This usually appears when:",[25,26,27,31,38,41],"ul",{},[28,29,30],"li",{},"you unpack a list or tuple into too few variables",[28,32,33,34,37],{},"a ",[17,35,36],{},"for"," loop expects the wrong number of values",[28,39,40],{},"a function returns more values than expected",[28,42,43,46],{},[17,44,45],{},"split()"," gives you more parts than you planned for",[14,48,49],{},"The fix is usually simple: make the number of variables match the number of values, or use starred unpacking to collect extras.",[51,52,54],"h2",{"id":53},"quick-fix","Quick fix",[56,57,62],"pre",{"className":58,"code":59,"language":60,"meta":61,"style":61},"language-python shiki shiki-themes material-theme-lighter github-light github-dark","values = [1, 2, 3]\na, b, c = values  # number of variables matches number of items\n\npairs = [(\"a\", 1), (\"b\", 2)]\nfor key, value in pairs:\n    print(key, value)\n","python","",[17,63,64,99,124,131,176,199],{"__ignoreMap":61},[65,66,69,73,77,81,85,88,91,93,96],"span",{"class":67,"line":68},"line",1,[65,70,72],{"class":71},"su5hD","values ",[65,74,76],{"class":75},"smGrS","=",[65,78,80],{"class":79},"sP7_E"," [",[65,82,84],{"class":83},"srdBf","1",[65,86,87],{"class":79},",",[65,89,90],{"class":83}," 2",[65,92,87],{"class":79},[65,94,95],{"class":83}," 3",[65,97,98],{"class":79},"]\n",[65,100,102,105,107,110,112,115,117,120],{"class":67,"line":101},2,[65,103,104],{"class":71},"a",[65,106,87],{"class":79},[65,108,109],{"class":71}," b",[65,111,87],{"class":79},[65,113,114],{"class":71}," c ",[65,116,76],{"class":75},[65,118,119],{"class":71}," values  ",[65,121,123],{"class":122},"sutJx","# number of variables matches number of items\n",[65,125,127],{"class":67,"line":126},3,[65,128,130],{"emptyLinePlaceholder":129},true,"\n",[65,132,134,137,139,142,146,149,151,153,156,159,162,164,167,169,171,173],{"class":67,"line":133},4,[65,135,136],{"class":71},"pairs ",[65,138,76],{"class":75},[65,140,141],{"class":79}," [(",[65,143,145],{"class":144},"sjJ54","\"",[65,147,104],{"class":148},"s_sjI",[65,150,145],{"class":144},[65,152,87],{"class":79},[65,154,155],{"class":83}," 1",[65,157,158],{"class":79},"),",[65,160,161],{"class":79}," (",[65,163,145],{"class":144},[65,165,166],{"class":148},"b",[65,168,145],{"class":144},[65,170,87],{"class":79},[65,172,90],{"class":83},[65,174,175],{"class":79},")]\n",[65,177,179,182,185,187,190,193,196],{"class":67,"line":178},5,[65,180,36],{"class":181},"sVHd0",[65,183,184],{"class":71}," key",[65,186,87],{"class":79},[65,188,189],{"class":71}," value ",[65,191,192],{"class":181},"in",[65,194,195],{"class":71}," pairs",[65,197,198],{"class":79},":\n",[65,200,202,206,209,213,215,218],{"class":67,"line":201},6,[65,203,205],{"class":204},"sptTA","    print",[65,207,208],{"class":79},"(",[65,210,212],{"class":211},"slqww","key",[65,214,87],{"class":79},[65,216,217],{"class":211}," value",[65,219,220],{"class":79},")\n",[14,222,223],{},"Match the number of variables to the number of values. In loops, also check the shape of each item you are unpacking.",[51,225,227],{"id":226},"what-this-error-means","What this error means",[14,229,230],{},"Python lets you unpack values into separate variables.",[14,232,233],{},"For example:",[56,235,237],{"className":58,"code":236,"language":60,"meta":61,"style":61},"x, y = (10, 20)\nprint(x)\nprint(y)\n",[17,238,239,263,274],{"__ignoreMap":61},[65,240,241,244,246,249,251,253,256,258,261],{"class":67,"line":68},[65,242,243],{"class":71},"x",[65,245,87],{"class":79},[65,247,248],{"class":71}," y ",[65,250,76],{"class":75},[65,252,161],{"class":79},[65,254,255],{"class":83},"10",[65,257,87],{"class":79},[65,259,260],{"class":83}," 20",[65,262,220],{"class":79},[65,264,265,268,270,272],{"class":67,"line":101},[65,266,267],{"class":204},"print",[65,269,208],{"class":79},[65,271,243],{"class":211},[65,273,220],{"class":79},[65,275,276,278,280,283],{"class":67,"line":126},[65,277,267],{"class":204},[65,279,208],{"class":79},[65,281,282],{"class":211},"y",[65,284,220],{"class":79},[14,286,287],{},"Output:",[56,289,291],{"className":58,"code":290,"language":60,"meta":61,"style":61},"10\n20\n",[17,292,293,298],{"__ignoreMap":61},[65,294,295],{"class":67,"line":68},[65,296,297],{"class":83},"10\n",[65,299,300],{"class":67,"line":101},[65,301,302],{"class":83},"20\n",[14,304,305],{},"Here, the tuple has 2 items, and there are 2 variables.",[14,307,308,309,313],{},"The error happens when the value on the right side has ",[310,311,312],"strong",{},"more items"," than the variables on the left side.",[14,315,316],{},"A common example is trying to unpack 3 items into 2 variables.",[51,318,320],{"id":319},"a-simple-example-that-causes-the-error","A simple example that causes the error",[56,322,324],{"className":58,"code":323,"language":60,"meta":61,"style":61},"values = [1, 2, 3]\na, b = values\n",[17,325,326,346],{"__ignoreMap":61},[65,327,328,330,332,334,336,338,340,342,344],{"class":67,"line":68},[65,329,72],{"class":71},[65,331,76],{"class":75},[65,333,80],{"class":79},[65,335,84],{"class":83},[65,337,87],{"class":79},[65,339,90],{"class":83},[65,341,87],{"class":79},[65,343,95],{"class":83},[65,345,98],{"class":79},[65,347,348,350,352,355,357],{"class":67,"line":101},[65,349,104],{"class":71},[65,351,87],{"class":79},[65,353,354],{"class":71}," b ",[65,356,76],{"class":75},[65,358,359],{"class":71}," values\n",[14,361,362],{},"This raises:",[56,364,366],{"className":58,"code":365,"language":60,"meta":61,"style":61},"ValueError: too many values to unpack (expected 2)\n",[17,367,368],{"__ignoreMap":61},[65,369,370,374,377,380,383,385,388,391],{"class":67,"line":68},[65,371,373],{"class":372},"sZMiF","ValueError",[65,375,376],{"class":79},":",[65,378,379],{"class":71}," too many values to ",[65,381,382],{"class":211},"unpack ",[65,384,208],{"class":79},[65,386,387],{"class":211},"expected ",[65,389,390],{"class":83},"2",[65,392,220],{"class":79},[14,394,395],{},"Why?",[25,397,398,404,410],{},[28,399,400,403],{},[17,401,402],{},"values"," contains 3 items",[28,405,406,409],{},[17,407,408],{},"a, b"," only provides 2 variables",[28,411,412],{},"Python does not know what to do with the extra item",[14,414,415],{},"To fix it, either use 3 variables:",[56,417,419],{"className":58,"code":418,"language":60,"meta":61,"style":61},"values = [1, 2, 3]\na, b, c = values\n\nprint(a, b, c)\n",[17,420,421,441,457,461],{"__ignoreMap":61},[65,422,423,425,427,429,431,433,435,437,439],{"class":67,"line":68},[65,424,72],{"class":71},[65,426,76],{"class":75},[65,428,80],{"class":79},[65,430,84],{"class":83},[65,432,87],{"class":79},[65,434,90],{"class":83},[65,436,87],{"class":79},[65,438,95],{"class":83},[65,440,98],{"class":79},[65,442,443,445,447,449,451,453,455],{"class":67,"line":101},[65,444,104],{"class":71},[65,446,87],{"class":79},[65,448,109],{"class":71},[65,450,87],{"class":79},[65,452,114],{"class":71},[65,454,76],{"class":75},[65,456,359],{"class":71},[65,458,459],{"class":67,"line":126},[65,460,130],{"emptyLinePlaceholder":129},[65,462,463,465,467,469,471,473,475,478],{"class":67,"line":133},[65,464,267],{"class":204},[65,466,208],{"class":79},[65,468,104],{"class":211},[65,470,87],{"class":79},[65,472,109],{"class":211},[65,474,87],{"class":79},[65,476,477],{"class":211}," c",[65,479,220],{"class":79},[14,481,287],{},[56,483,485],{"className":58,"code":484,"language":60,"meta":61,"style":61},"1 2 3\n",[17,486,487],{"__ignoreMap":61},[65,488,489,491,493],{"class":67,"line":68},[65,490,84],{"class":83},[65,492,90],{"class":83},[65,494,495],{"class":83}," 3\n",[51,497,499],{"id":498},"why-it-happens","Why it happens",[14,501,502],{},"This error usually means your code expected a different shape of data.",[14,504,505],{},"Common causes include:",[25,507,508,511,514,517],{},[28,509,510],{},"The value on the right side has more items than expected.",[28,512,513],{},"A loop is unpacking each item incorrectly.",[28,515,516],{},"A function returns more values than your code expects.",[28,518,519],{},"A string split produces more parts than your variables can hold.",[14,521,522,523,527],{},"For example, if you are learning how functions return multiple values, see ",[104,524,526],{"href":525},"\u002Flearn\u002Fpython-functions-explained\u002F","Python functions explained",".",[51,529,531],{"id":530},"fix-1-use-the-correct-number-of-variables","Fix 1: Use the correct number of variables",[14,533,534],{},"If you know exactly how many values you will get, use the same number of variables.",[536,537,539],"h3",{"id":538},"example-with-a-tuple","Example with a tuple",[56,541,543],{"className":58,"code":542,"language":60,"meta":61,"style":61},"point = (5, 10, 15)\nx, y, z = point\n\nprint(x)\nprint(y)\nprint(z)\n",[17,544,545,569,588,592,602,612],{"__ignoreMap":61},[65,546,547,550,552,554,557,559,562,564,567],{"class":67,"line":68},[65,548,549],{"class":71},"point ",[65,551,76],{"class":75},[65,553,161],{"class":79},[65,555,556],{"class":83},"5",[65,558,87],{"class":79},[65,560,561],{"class":83}," 10",[65,563,87],{"class":79},[65,565,566],{"class":83}," 15",[65,568,220],{"class":79},[65,570,571,573,575,578,580,583,585],{"class":67,"line":101},[65,572,243],{"class":71},[65,574,87],{"class":79},[65,576,577],{"class":71}," y",[65,579,87],{"class":79},[65,581,582],{"class":71}," z ",[65,584,76],{"class":75},[65,586,587],{"class":71}," point\n",[65,589,590],{"class":67,"line":126},[65,591,130],{"emptyLinePlaceholder":129},[65,593,594,596,598,600],{"class":67,"line":133},[65,595,267],{"class":204},[65,597,208],{"class":79},[65,599,243],{"class":211},[65,601,220],{"class":79},[65,603,604,606,608,610],{"class":67,"line":178},[65,605,267],{"class":204},[65,607,208],{"class":79},[65,609,282],{"class":211},[65,611,220],{"class":79},[65,613,614,616,618,621],{"class":67,"line":201},[65,615,267],{"class":204},[65,617,208],{"class":79},[65,619,620],{"class":211},"z",[65,622,220],{"class":79},[14,624,287],{},[56,626,628],{"className":58,"code":627,"language":60,"meta":61,"style":61},"5\n10\n15\n",[17,629,630,635,639],{"__ignoreMap":61},[65,631,632],{"class":67,"line":68},[65,633,634],{"class":83},"5\n",[65,636,637],{"class":67,"line":101},[65,638,297],{"class":83},[65,640,641],{"class":67,"line":126},[65,642,643],{"class":83},"15\n",[536,645,647],{"id":646},"example-with-a-function-return-value","Example with a function return value",[56,649,651],{"className":58,"code":650,"language":60,"meta":61,"style":61},"def get_user():\n    return \"Sam\", 25, \"admin\"\n\nname, age, role = get_user()\nprint(name, age, role)\n",[17,652,653,666,694,698,720],{"__ignoreMap":61},[65,654,655,659,663],{"class":67,"line":68},[65,656,658],{"class":657},"sbsja","def",[65,660,662],{"class":661},"sGLFI"," get_user",[65,664,665],{"class":79},"():\n",[65,667,668,671,674,677,679,681,684,686,688,691],{"class":67,"line":101},[65,669,670],{"class":181},"    return",[65,672,673],{"class":144}," \"",[65,675,676],{"class":148},"Sam",[65,678,145],{"class":144},[65,680,87],{"class":79},[65,682,683],{"class":83}," 25",[65,685,87],{"class":79},[65,687,673],{"class":144},[65,689,690],{"class":148},"admin",[65,692,693],{"class":144},"\"\n",[65,695,696],{"class":67,"line":126},[65,697,130],{"emptyLinePlaceholder":129},[65,699,700,703,705,708,710,713,715,717],{"class":67,"line":133},[65,701,702],{"class":71},"name",[65,704,87],{"class":79},[65,706,707],{"class":71}," age",[65,709,87],{"class":79},[65,711,712],{"class":71}," role ",[65,714,76],{"class":75},[65,716,662],{"class":211},[65,718,719],{"class":79},"()\n",[65,721,722,724,726,728,730,732,734,737],{"class":67,"line":178},[65,723,267],{"class":204},[65,725,208],{"class":79},[65,727,702],{"class":211},[65,729,87],{"class":79},[65,731,707],{"class":211},[65,733,87],{"class":79},[65,735,736],{"class":211}," role",[65,738,220],{"class":79},[14,740,287],{},[56,742,744],{"className":58,"code":743,"language":60,"meta":61,"style":61},"Sam 25 admin\n",[17,745,746],{"__ignoreMap":61},[65,747,748,751,754],{"class":67,"line":68},[65,749,750],{"class":71},"Sam ",[65,752,753],{"class":83},"25",[65,755,756],{"class":71}," admin\n",[14,758,759],{},"This is the best fix when:",[25,761,762,765,768],{},[28,763,764],{},"the number of values is fixed",[28,766,767],{},"you know exactly what each value means",[28,769,770],{},"you want clear variable names",[51,772,774],{"id":773},"fix-2-use-starred-unpacking","Fix 2: Use starred unpacking",[14,776,777],{},"Sometimes you only care about the first or last values, and the number of extra items may change.",[14,779,780,781,527],{},"In that case, use starred unpacking with ",[17,782,783],{},"*",[56,785,787],{"className":58,"code":786,"language":60,"meta":61,"style":61},"data = [10, 20, 30, 40, 50]\n\nfirst, *middle, last = data\n\nprint(first)\nprint(middle)\nprint(last)\n",[17,788,789,821,825,848,852,862,872],{"__ignoreMap":61},[65,790,791,794,796,798,800,802,804,806,809,811,814,816,819],{"class":67,"line":68},[65,792,793],{"class":71},"data ",[65,795,76],{"class":75},[65,797,80],{"class":79},[65,799,255],{"class":83},[65,801,87],{"class":79},[65,803,260],{"class":83},[65,805,87],{"class":79},[65,807,808],{"class":83}," 30",[65,810,87],{"class":79},[65,812,813],{"class":83}," 40",[65,815,87],{"class":79},[65,817,818],{"class":83}," 50",[65,820,98],{"class":79},[65,822,823],{"class":67,"line":101},[65,824,130],{"emptyLinePlaceholder":129},[65,826,827,830,832,835,838,840,843,845],{"class":67,"line":126},[65,828,829],{"class":71},"first",[65,831,87],{"class":79},[65,833,834],{"class":75}," *",[65,836,837],{"class":71},"middle",[65,839,87],{"class":79},[65,841,842],{"class":71}," last ",[65,844,76],{"class":75},[65,846,847],{"class":71}," data\n",[65,849,850],{"class":67,"line":133},[65,851,130],{"emptyLinePlaceholder":129},[65,853,854,856,858,860],{"class":67,"line":178},[65,855,267],{"class":204},[65,857,208],{"class":79},[65,859,829],{"class":211},[65,861,220],{"class":79},[65,863,864,866,868,870],{"class":67,"line":201},[65,865,267],{"class":204},[65,867,208],{"class":79},[65,869,837],{"class":211},[65,871,220],{"class":79},[65,873,875,877,879,882],{"class":67,"line":874},7,[65,876,267],{"class":204},[65,878,208],{"class":79},[65,880,881],{"class":211},"last",[65,883,220],{"class":79},[14,885,287],{},[56,887,889],{"className":58,"code":888,"language":60,"meta":61,"style":61},"10\n[20, 30, 40]\n50\n",[17,890,891,895,913],{"__ignoreMap":61},[65,892,893],{"class":67,"line":68},[65,894,297],{"class":83},[65,896,897,900,903,905,907,909,911],{"class":67,"line":101},[65,898,899],{"class":79},"[",[65,901,902],{"class":83},"20",[65,904,87],{"class":79},[65,906,808],{"class":83},[65,908,87],{"class":79},[65,910,813],{"class":83},[65,912,98],{"class":79},[65,914,915],{"class":67,"line":126},[65,916,917],{"class":83},"50\n",[14,919,920,921,924],{},"The ",[17,922,923],{},"*middle"," part collects all extra values into a list.",[14,926,927],{},"This is helpful when:",[25,929,930,933,936],{},[28,931,932],{},"the number of extra items is not fixed",[28,934,935],{},"you want to ignore or collect the remaining values",[28,937,938],{},"you only need part of the sequence",[14,940,941],{},"Another simple example:",[56,943,945],{"className":58,"code":944,"language":60,"meta":61,"style":61},"values = [1, 2, 3]\na, *rest = values\n\nprint(a)\nprint(rest)\n",[17,946,947,967,982,986,996],{"__ignoreMap":61},[65,948,949,951,953,955,957,959,961,963,965],{"class":67,"line":68},[65,950,72],{"class":71},[65,952,76],{"class":75},[65,954,80],{"class":79},[65,956,84],{"class":83},[65,958,87],{"class":79},[65,960,90],{"class":83},[65,962,87],{"class":79},[65,964,95],{"class":83},[65,966,98],{"class":79},[65,968,969,971,973,975,978,980],{"class":67,"line":101},[65,970,104],{"class":71},[65,972,87],{"class":79},[65,974,834],{"class":75},[65,976,977],{"class":71},"rest ",[65,979,76],{"class":75},[65,981,359],{"class":71},[65,983,984],{"class":67,"line":126},[65,985,130],{"emptyLinePlaceholder":129},[65,987,988,990,992,994],{"class":67,"line":133},[65,989,267],{"class":204},[65,991,208],{"class":79},[65,993,104],{"class":211},[65,995,220],{"class":79},[65,997,998,1000,1002,1005],{"class":67,"line":178},[65,999,267],{"class":204},[65,1001,208],{"class":79},[65,1003,1004],{"class":211},"rest",[65,1006,220],{"class":79},[14,1008,287],{},[56,1010,1012],{"className":58,"code":1011,"language":60,"meta":61,"style":61},"1\n[2, 3]\n",[17,1013,1014,1019],{"__ignoreMap":61},[65,1015,1016],{"class":67,"line":68},[65,1017,1018],{"class":83},"1\n",[65,1020,1021,1023,1025,1027,1029],{"class":67,"line":101},[65,1022,899],{"class":79},[65,1024,390],{"class":83},[65,1026,87],{"class":79},[65,1028,95],{"class":83},[65,1030,98],{"class":79},[14,1032,1033,1034,527],{},"If you want to understand unpacking more generally, it can help to review ",[104,1035,1037],{"href":1036},"\u002Flearn\u002Funderstanding-python-statements-and-expressions\u002F","Python statements and expressions",[51,1039,1041],{"id":1040},"fix-3-check-loops-that-unpack-items","Fix 3: Check loops that unpack items",[14,1043,1044],{},"A very common cause is a loop like this:",[56,1046,1048],{"className":58,"code":1047,"language":60,"meta":61,"style":61},"data = [(1, 2, 3), (4, 5, 6)]\n\nfor a, b in data:\n    print(a, b)\n",[17,1049,1050,1087,1091,1109],{"__ignoreMap":61},[65,1051,1052,1054,1056,1058,1060,1062,1064,1066,1068,1070,1072,1075,1077,1080,1082,1085],{"class":67,"line":68},[65,1053,793],{"class":71},[65,1055,76],{"class":75},[65,1057,141],{"class":79},[65,1059,84],{"class":83},[65,1061,87],{"class":79},[65,1063,90],{"class":83},[65,1065,87],{"class":79},[65,1067,95],{"class":83},[65,1069,158],{"class":79},[65,1071,161],{"class":79},[65,1073,1074],{"class":83},"4",[65,1076,87],{"class":79},[65,1078,1079],{"class":83}," 5",[65,1081,87],{"class":79},[65,1083,1084],{"class":83}," 6",[65,1086,175],{"class":79},[65,1088,1089],{"class":67,"line":101},[65,1090,130],{"emptyLinePlaceholder":129},[65,1092,1093,1095,1098,1100,1102,1104,1107],{"class":67,"line":126},[65,1094,36],{"class":181},[65,1096,1097],{"class":71}," a",[65,1099,87],{"class":79},[65,1101,354],{"class":71},[65,1103,192],{"class":181},[65,1105,1106],{"class":71}," data",[65,1108,198],{"class":79},[65,1110,1111,1113,1115,1117,1119,1121],{"class":67,"line":133},[65,1112,205],{"class":204},[65,1114,208],{"class":79},[65,1116,104],{"class":211},[65,1118,87],{"class":79},[65,1120,109],{"class":211},[65,1122,220],{"class":79},[14,1124,1125],{},"This fails because each item has 3 values, but the loop expects 2.",[14,1127,1128],{},"You can fix it by matching the shape of each item:",[56,1130,1132],{"className":58,"code":1131,"language":60,"meta":61,"style":61},"data = [(1, 2, 3), (4, 5, 6)]\n\nfor a, b, c in data:\n    print(a, b, c)\n",[17,1133,1134,1168,1172,1192],{"__ignoreMap":61},[65,1135,1136,1138,1140,1142,1144,1146,1148,1150,1152,1154,1156,1158,1160,1162,1164,1166],{"class":67,"line":68},[65,1137,793],{"class":71},[65,1139,76],{"class":75},[65,1141,141],{"class":79},[65,1143,84],{"class":83},[65,1145,87],{"class":79},[65,1147,90],{"class":83},[65,1149,87],{"class":79},[65,1151,95],{"class":83},[65,1153,158],{"class":79},[65,1155,161],{"class":79},[65,1157,1074],{"class":83},[65,1159,87],{"class":79},[65,1161,1079],{"class":83},[65,1163,87],{"class":79},[65,1165,1084],{"class":83},[65,1167,175],{"class":79},[65,1169,1170],{"class":67,"line":101},[65,1171,130],{"emptyLinePlaceholder":129},[65,1173,1174,1176,1178,1180,1182,1184,1186,1188,1190],{"class":67,"line":126},[65,1175,36],{"class":181},[65,1177,1097],{"class":71},[65,1179,87],{"class":79},[65,1181,109],{"class":71},[65,1183,87],{"class":79},[65,1185,114],{"class":71},[65,1187,192],{"class":181},[65,1189,1106],{"class":71},[65,1191,198],{"class":79},[65,1193,1194,1196,1198,1200,1202,1204,1206,1208],{"class":67,"line":133},[65,1195,205],{"class":204},[65,1197,208],{"class":79},[65,1199,104],{"class":211},[65,1201,87],{"class":79},[65,1203,109],{"class":211},[65,1205,87],{"class":79},[65,1207,477],{"class":211},[65,1209,220],{"class":79},[14,1211,287],{},[56,1213,1215],{"className":58,"code":1214,"language":60,"meta":61,"style":61},"1 2 3\n4 5 6\n",[17,1216,1217,1225],{"__ignoreMap":61},[65,1218,1219,1221,1223],{"class":67,"line":68},[65,1220,84],{"class":83},[65,1222,90],{"class":83},[65,1224,495],{"class":83},[65,1226,1227,1229,1231],{"class":67,"line":101},[65,1228,1074],{"class":83},[65,1230,1079],{"class":83},[65,1232,1233],{"class":83}," 6\n",[536,1235,1237],{"id":1236},"watch-out-for-mixed-data","Watch out for mixed data",[14,1239,1240],{},"If items have different lengths, unpacking can fail partway through the loop.",[56,1242,1244],{"className":58,"code":1243,"language":60,"meta":61,"style":61},"data = [(1, 2), (3, 4, 5)]\n\nfor a, b in data:\n    print(a, b)\n",[17,1245,1246,1278,1282,1298],{"__ignoreMap":61},[65,1247,1248,1250,1252,1254,1256,1258,1260,1262,1264,1267,1269,1272,1274,1276],{"class":67,"line":68},[65,1249,793],{"class":71},[65,1251,76],{"class":75},[65,1253,141],{"class":79},[65,1255,84],{"class":83},[65,1257,87],{"class":79},[65,1259,90],{"class":83},[65,1261,158],{"class":79},[65,1263,161],{"class":79},[65,1265,1266],{"class":83},"3",[65,1268,87],{"class":79},[65,1270,1271],{"class":83}," 4",[65,1273,87],{"class":79},[65,1275,1079],{"class":83},[65,1277,175],{"class":79},[65,1279,1280],{"class":67,"line":101},[65,1281,130],{"emptyLinePlaceholder":129},[65,1283,1284,1286,1288,1290,1292,1294,1296],{"class":67,"line":126},[65,1285,36],{"class":181},[65,1287,1097],{"class":71},[65,1289,87],{"class":79},[65,1291,354],{"class":71},[65,1293,192],{"class":181},[65,1295,1106],{"class":71},[65,1297,198],{"class":79},[65,1299,1300,1302,1304,1306,1308,1310],{"class":67,"line":133},[65,1301,205],{"class":204},[65,1303,208],{"class":79},[65,1305,104],{"class":211},[65,1307,87],{"class":79},[65,1309,109],{"class":211},[65,1311,220],{"class":79},[14,1313,1314],{},"The first item works, but the second item has 3 values, so Python raises the error there.",[14,1316,1317,1318,527],{},"This also happens often when looping through dictionaries incorrectly. If you need help with that, see ",[104,1319,1321],{"href":1320},"\u002Fhow-to\u002Fhow-to-loop-through-a-dictionary-in-python\u002F","how to loop through a dictionary in Python",[51,1323,1325,1326,1328],{"id":1324},"fix-4-check-split-results","Fix 4: Check ",[17,1327,45],{}," results",[14,1330,1331],{},"String splitting is another common source of this error.",[56,1333,1335],{"className":58,"code":1334,"language":60,"meta":61,"style":61},"text = \"apple,banana,cherry\"\nfirst, second = text.split(\",\")\n",[17,1336,1337,1351],{"__ignoreMap":61},[65,1338,1339,1342,1344,1346,1349],{"class":67,"line":68},[65,1340,1341],{"class":71},"text ",[65,1343,76],{"class":75},[65,1345,673],{"class":144},[65,1347,1348],{"class":148},"apple,banana,cherry",[65,1350,693],{"class":144},[65,1352,1353,1355,1357,1360,1362,1365,1367,1370,1372,1374,1376,1378],{"class":67,"line":101},[65,1354,829],{"class":71},[65,1356,87],{"class":79},[65,1358,1359],{"class":71}," second ",[65,1361,76],{"class":75},[65,1363,1364],{"class":71}," text",[65,1366,527],{"class":79},[65,1368,1369],{"class":211},"split",[65,1371,208],{"class":79},[65,1373,145],{"class":144},[65,1375,87],{"class":148},[65,1377,145],{"class":144},[65,1379,220],{"class":79},[14,1381,1382,1383,1386],{},"This raises the error because ",[17,1384,1385],{},"split(\",\")"," returns 3 parts:",[56,1388,1390],{"className":58,"code":1389,"language":60,"meta":61,"style":61},"['apple', 'banana', 'cherry']\n",[17,1391,1392],{"__ignoreMap":61},[65,1393,1394,1396,1399,1402,1404,1406,1409,1412,1414,1416,1418,1421,1423],{"class":67,"line":68},[65,1395,899],{"class":79},[65,1397,1398],{"class":144},"'",[65,1400,1401],{"class":148},"apple",[65,1403,1398],{"class":144},[65,1405,87],{"class":79},[65,1407,1408],{"class":144}," '",[65,1410,1411],{"class":148},"banana",[65,1413,1398],{"class":144},[65,1415,87],{"class":79},[65,1417,1408],{"class":144},[65,1419,1420],{"class":148},"cherry",[65,1422,1398],{"class":144},[65,1424,98],{"class":79},[536,1426,1428],{"id":1427},"fix-by-using-enough-variables","Fix by using enough variables",[56,1430,1432],{"className":58,"code":1431,"language":60,"meta":61,"style":61},"text = \"apple,banana,cherry\"\nfirst, second, third = text.split(\",\")\n\nprint(first)\nprint(second)\nprint(third)\n",[17,1433,1434,1446,1478,1482,1492,1503],{"__ignoreMap":61},[65,1435,1436,1438,1440,1442,1444],{"class":67,"line":68},[65,1437,1341],{"class":71},[65,1439,76],{"class":75},[65,1441,673],{"class":144},[65,1443,1348],{"class":148},[65,1445,693],{"class":144},[65,1447,1448,1450,1452,1455,1457,1460,1462,1464,1466,1468,1470,1472,1474,1476],{"class":67,"line":101},[65,1449,829],{"class":71},[65,1451,87],{"class":79},[65,1453,1454],{"class":71}," second",[65,1456,87],{"class":79},[65,1458,1459],{"class":71}," third ",[65,1461,76],{"class":75},[65,1463,1364],{"class":71},[65,1465,527],{"class":79},[65,1467,1369],{"class":211},[65,1469,208],{"class":79},[65,1471,145],{"class":144},[65,1473,87],{"class":148},[65,1475,145],{"class":144},[65,1477,220],{"class":79},[65,1479,1480],{"class":67,"line":126},[65,1481,130],{"emptyLinePlaceholder":129},[65,1483,1484,1486,1488,1490],{"class":67,"line":133},[65,1485,267],{"class":204},[65,1487,208],{"class":79},[65,1489,829],{"class":211},[65,1491,220],{"class":79},[65,1493,1494,1496,1498,1501],{"class":67,"line":178},[65,1495,267],{"class":204},[65,1497,208],{"class":79},[65,1499,1500],{"class":211},"second",[65,1502,220],{"class":79},[65,1504,1505,1507,1509,1512],{"class":67,"line":201},[65,1506,267],{"class":204},[65,1508,208],{"class":79},[65,1510,1511],{"class":211},"third",[65,1513,220],{"class":79},[536,1515,1517],{"id":1516},"fix-by-limiting-the-split","Fix by limiting the split",[14,1519,1520,1521,376],{},"If you only want 2 parts, use ",[17,1522,1523],{},"maxsplit",[56,1525,1527],{"className":58,"code":1526,"language":60,"meta":61,"style":61},"text = \"apple,banana,cherry\"\nfirst, rest = text.split(\",\", maxsplit=1)\n\nprint(first)\nprint(rest)\n",[17,1528,1529,1541,1578,1582,1592],{"__ignoreMap":61},[65,1530,1531,1533,1535,1537,1539],{"class":67,"line":68},[65,1532,1341],{"class":71},[65,1534,76],{"class":75},[65,1536,673],{"class":144},[65,1538,1348],{"class":148},[65,1540,693],{"class":144},[65,1542,1543,1545,1547,1550,1552,1554,1556,1558,1560,1562,1564,1566,1568,1572,1574,1576],{"class":67,"line":101},[65,1544,829],{"class":71},[65,1546,87],{"class":79},[65,1548,1549],{"class":71}," rest ",[65,1551,76],{"class":75},[65,1553,1364],{"class":71},[65,1555,527],{"class":79},[65,1557,1369],{"class":211},[65,1559,208],{"class":79},[65,1561,145],{"class":144},[65,1563,87],{"class":148},[65,1565,145],{"class":144},[65,1567,87],{"class":79},[65,1569,1571],{"class":1570},"s99_P"," maxsplit",[65,1573,76],{"class":75},[65,1575,84],{"class":83},[65,1577,220],{"class":79},[65,1579,1580],{"class":67,"line":126},[65,1581,130],{"emptyLinePlaceholder":129},[65,1583,1584,1586,1588,1590],{"class":67,"line":133},[65,1585,267],{"class":204},[65,1587,208],{"class":79},[65,1589,829],{"class":211},[65,1591,220],{"class":79},[65,1593,1594,1596,1598,1600],{"class":67,"line":178},[65,1595,267],{"class":204},[65,1597,208],{"class":79},[65,1599,1004],{"class":211},[65,1601,220],{"class":79},[14,1603,287],{},[56,1605,1607],{"className":58,"code":1606,"language":60,"meta":61,"style":61},"apple\nbanana,cherry\n",[17,1608,1609,1614],{"__ignoreMap":61},[65,1610,1611],{"class":67,"line":68},[65,1612,1613],{"class":71},"apple\n",[65,1615,1616,1618,1620],{"class":67,"line":101},[65,1617,1411],{"class":71},[65,1619,87],{"class":79},[65,1621,1622],{"class":71},"cherry\n",[14,1624,1625,1626,527],{},"If you want more detail on how this method works, see the ",[104,1627,1629,1630,1633],{"href":1628},"\u002Freference\u002Fpython-string-split-method\u002F","Python ",[17,1631,1632],{},"string.split()"," method",[51,1635,1637],{"id":1636},"debugging-steps","Debugging steps",[14,1639,1640],{},"When you see this error, the fastest way to fix it is to inspect the value before unpacking.",[14,1642,1643],{},"Useful checks:",[56,1645,1647],{"className":58,"code":1646,"language":60,"meta":61,"style":61},"print(value)\nprint(type(value))\nprint(len(value))\n",[17,1648,1649,1660,1676],{"__ignoreMap":61},[65,1650,1651,1653,1655,1658],{"class":67,"line":68},[65,1652,267],{"class":204},[65,1654,208],{"class":79},[65,1656,1657],{"class":211},"value",[65,1659,220],{"class":79},[65,1661,1662,1664,1666,1669,1671,1673],{"class":67,"line":101},[65,1663,267],{"class":204},[65,1665,208],{"class":79},[65,1667,1668],{"class":372},"type",[65,1670,208],{"class":79},[65,1672,1657],{"class":211},[65,1674,1675],{"class":79},"))\n",[65,1677,1678,1680,1682,1685,1687,1689],{"class":67,"line":126},[65,1679,267],{"class":204},[65,1681,208],{"class":79},[65,1683,1684],{"class":204},"len",[65,1686,208],{"class":79},[65,1688,1657],{"class":211},[65,1690,1675],{"class":79},[14,1692,1693],{},"If the problem happens in a loop:",[56,1695,1697],{"className":58,"code":1696,"language":60,"meta":61,"style":61},"for item in data:\n    print(item, len(item))\n",[17,1698,1699,1712],{"__ignoreMap":61},[65,1700,1701,1703,1706,1708,1710],{"class":67,"line":68},[65,1702,36],{"class":181},[65,1704,1705],{"class":71}," item ",[65,1707,192],{"class":181},[65,1709,1106],{"class":71},[65,1711,198],{"class":79},[65,1713,1714,1716,1718,1721,1723,1726,1728,1730],{"class":67,"line":101},[65,1715,205],{"class":204},[65,1717,208],{"class":79},[65,1719,1720],{"class":211},"item",[65,1722,87],{"class":79},[65,1724,1725],{"class":204}," len",[65,1727,208],{"class":79},[65,1729,1720],{"class":211},[65,1731,1675],{"class":79},[14,1733,1734],{},"If the problem involves string splitting:",[56,1736,1738],{"className":58,"code":1737,"language":60,"meta":61,"style":61},"print(text.split(','))\n",[17,1739,1740],{"__ignoreMap":61},[65,1741,1742,1744,1746,1749,1751,1753,1755,1757,1759,1761],{"class":67,"line":68},[65,1743,267],{"class":204},[65,1745,208],{"class":79},[65,1747,1748],{"class":211},"text",[65,1750,527],{"class":79},[65,1752,1369],{"class":211},[65,1754,208],{"class":79},[65,1756,1398],{"class":144},[65,1758,87],{"class":148},[65,1760,1398],{"class":144},[65,1762,1675],{"class":79},[536,1764,1766],{"id":1765},"what-to-look-for","What to look for",[25,1768,1769,1772,1779,1782],{},[28,1770,1771],{},"Print the value before unpacking it.",[28,1773,1774,1775,1778],{},"Use ",[17,1776,1777],{},"len()"," when the value is a list, tuple, or other sequence.",[28,1780,1781],{},"Check what each loop item looks like.",[28,1783,1784],{},"Read the full traceback and find the exact line where unpacking happens.",[14,1786,233],{},[56,1788,1790],{"className":58,"code":1789,"language":60,"meta":61,"style":61},"data = [(\"a\", 1), (\"b\", 2, 3)]\n\nfor item in data:\n    print(item, len(item))\n",[17,1791,1792,1830,1834,1846],{"__ignoreMap":61},[65,1793,1794,1796,1798,1800,1802,1804,1806,1808,1810,1812,1814,1816,1818,1820,1822,1824,1826,1828],{"class":67,"line":68},[65,1795,793],{"class":71},[65,1797,76],{"class":75},[65,1799,141],{"class":79},[65,1801,145],{"class":144},[65,1803,104],{"class":148},[65,1805,145],{"class":144},[65,1807,87],{"class":79},[65,1809,155],{"class":83},[65,1811,158],{"class":79},[65,1813,161],{"class":79},[65,1815,145],{"class":144},[65,1817,166],{"class":148},[65,1819,145],{"class":144},[65,1821,87],{"class":79},[65,1823,90],{"class":83},[65,1825,87],{"class":79},[65,1827,95],{"class":83},[65,1829,175],{"class":79},[65,1831,1832],{"class":67,"line":101},[65,1833,130],{"emptyLinePlaceholder":129},[65,1835,1836,1838,1840,1842,1844],{"class":67,"line":126},[65,1837,36],{"class":181},[65,1839,1705],{"class":71},[65,1841,192],{"class":181},[65,1843,1106],{"class":71},[65,1845,198],{"class":79},[65,1847,1848,1850,1852,1854,1856,1858,1860,1862],{"class":67,"line":133},[65,1849,205],{"class":204},[65,1851,208],{"class":79},[65,1853,1720],{"class":211},[65,1855,87],{"class":79},[65,1857,1725],{"class":204},[65,1859,208],{"class":79},[65,1861,1720],{"class":211},[65,1863,1675],{"class":79},[14,1865,287],{},[56,1867,1869],{"className":58,"code":1868,"language":60,"meta":61,"style":61},"('a', 1) 2\n('b', 2, 3) 3\n",[17,1870,1871,1891],{"__ignoreMap":61},[65,1872,1873,1875,1877,1879,1881,1883,1885,1888],{"class":67,"line":68},[65,1874,208],{"class":79},[65,1876,1398],{"class":144},[65,1878,104],{"class":148},[65,1880,1398],{"class":144},[65,1882,87],{"class":79},[65,1884,155],{"class":83},[65,1886,1887],{"class":79},")",[65,1889,1890],{"class":83}," 2\n",[65,1892,1893,1895,1897,1899,1901,1903,1905,1907,1909,1911],{"class":67,"line":101},[65,1894,208],{"class":79},[65,1896,1398],{"class":144},[65,1898,166],{"class":148},[65,1900,1398],{"class":144},[65,1902,87],{"class":79},[65,1904,90],{"class":83},[65,1906,87],{"class":79},[65,1908,95],{"class":83},[65,1910,1887],{"class":79},[65,1912,495],{"class":83},[14,1914,1915],{},"Now the problem is clear: not every item has the same number of values.",[51,1917,1919],{"id":1918},"related-errors-and-similar-cases","Related errors and similar cases",[14,1921,1922],{},"Do not confuse this error with these similar ones:",[25,1924,1925,1937],{},[28,1926,1927,1933,1936],{},[104,1928,1930],{"href":1929},"\u002Ferrors\u002Fvalueerror-not-enough-values-to-unpack-fix",[17,1931,1932],{},"ValueError: not enough values to unpack",[1934,1935],"br",{},"\nThis is the opposite problem. You have fewer values than variables.",[28,1938,1939,1945,1947],{},[104,1940,1942],{"href":1941},"\u002Ferrors\u002Ftypeerror-cannot-unpack-non-iterable-object-fix",[17,1943,1944],{},"TypeError: cannot unpack non-iterable object",[1934,1946],{},"\nThis happens when the value cannot be unpacked at all.",[51,1949,1951],{"id":1950},"common-causes","Common causes",[14,1953,1954],{},"Here are the most common situations that trigger this error:",[25,1956,1957,1960,1967,1970,1973],{},[28,1958,1959],{},"Unpacking a tuple or list into too few variables",[28,1961,1962,1963,1966],{},"Using ",[17,1964,1965],{},"for a, b in ..."," when items contain 3 or more values",[28,1968,1969],{},"Splitting a string into more parts than expected",[28,1971,1972],{},"Expecting a function to return 2 values when it returns 3",[28,1974,1975],{},"Unpacking dictionary iteration incorrectly",[51,1977,1979],{"id":1978},"faq","FAQ",[536,1981,1983],{"id":1982},"what-does-unpack-mean-in-python","What does \"unpack\" mean in Python?",[14,1985,1986],{},"It means assigning items from a sequence like a list or tuple into separate variables.",[536,1988,1990,1991,1993],{"id":1989},"why-do-i-get-this-error-in-a-for-loop","Why do I get this error in a ",[17,1992,36],{}," loop?",[14,1995,1996],{},"Each item in the loop likely has more values than the variables in the loop header.",[536,1998,2000],{"id":1999},"how-do-i-ignore-extra-values","How do I ignore extra values?",[14,2002,2003,2004,527],{},"Use starred unpacking such as ",[17,2005,2006],{},"first, *rest = values",[536,2008,2010],{"id":2009},"is-this-the-same-as-not-enough-values-to-unpack","Is this the same as \"not enough values to unpack\"?",[14,2012,2013],{},"No. That error means you have fewer values than variables. This one means you have more values than variables.",[51,2015,2017],{"id":2016},"see-also","See also",[25,2019,2020,2024,2028,2034,2039],{},[28,2021,2022],{},[104,2023,1932],{"href":1929},[28,2025,2026],{},[104,2027,526],{"href":525},[28,2029,2030],{},[104,2031,1629,2032,1633],{"href":1628},[17,2033,1632],{},[28,2035,2036],{},[104,2037,2038],{"href":1320},"How to loop through a dictionary in Python",[28,2040,2041],{},[104,2042,1944],{"href":1941},[2044,2045,2046],"style",{},"html pre.shiki code .su5hD, html code.shiki .su5hD{--shiki-light:#90A4AE;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .smGrS, html code.shiki .smGrS{--shiki-light:#39ADB5;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sP7_E, html code.shiki .sP7_E{--shiki-light:#39ADB5;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .srdBf, html code.shiki .srdBf{--shiki-light:#F76D47;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sutJx, html code.shiki .sutJx{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#6A737D;--shiki-default-font-style:inherit;--shiki-dark:#6A737D;--shiki-dark-font-style:inherit}html pre.shiki code .sjJ54, html code.shiki .sjJ54{--shiki-light:#39ADB5;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .s_sjI, html code.shiki .s_sjI{--shiki-light:#91B859;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sVHd0, html code.shiki .sVHd0{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit}html pre.shiki code .sptTA, html code.shiki .sptTA{--shiki-light:#6182B8;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .slqww, html code.shiki .slqww{--shiki-light:#6182B8;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sZMiF, html code.shiki .sZMiF{--shiki-light:#E2931D;--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sbsja, html code.shiki .sbsja{--shiki-light:#9C3EDA;--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sGLFI, html code.shiki .sGLFI{--shiki-light:#6182B8;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s99_P, html code.shiki .s99_P{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit}",{"title":61,"searchDepth":101,"depth":101,"links":2048},[2049,2050,2051,2052,2053,2057,2058,2061,2066,2069,2070,2071,2078],{"id":53,"depth":101,"text":54},{"id":226,"depth":101,"text":227},{"id":319,"depth":101,"text":320},{"id":498,"depth":101,"text":499},{"id":530,"depth":101,"text":531,"children":2054},[2055,2056],{"id":538,"depth":126,"text":539},{"id":646,"depth":126,"text":647},{"id":773,"depth":101,"text":774},{"id":1040,"depth":101,"text":1041,"children":2059},[2060],{"id":1236,"depth":126,"text":1237},{"id":1324,"depth":101,"text":2062,"children":2063},"Fix 4: Check split() results",[2064,2065],{"id":1427,"depth":126,"text":1428},{"id":1516,"depth":126,"text":1517},{"id":1636,"depth":101,"text":1637,"children":2067},[2068],{"id":1765,"depth":126,"text":1766},{"id":1918,"depth":101,"text":1919},{"id":1950,"depth":101,"text":1951},{"id":1978,"depth":101,"text":1979,"children":2072},[2073,2074,2076,2077],{"id":1982,"depth":126,"text":1983},{"id":1989,"depth":126,"text":2075},"Why do I get this error in a for loop?",{"id":1999,"depth":126,"text":2000},{"id":2009,"depth":126,"text":2010},{"id":2016,"depth":101,"text":2017},"Master valueerror too many values to unpack fix in our comprehensive Python beginner guide.","md",{},"\u002Ferrors\u002Fvalueerror-too-many-values-to-unpack-fix",{"title":5,"description":2079},"errors\u002Fvalueerror-too-many-values-to-unpack-fix","DgHjjz7ywpagYYKfycxQz0ZbCoCOFftDYOOMTMaIt9Q",1777585506848]