Python: Solving ValueError: Too many values to unpack

preview_player
Показать описание
This Python tutorial video covers the "ValueError: too many values to unpack."

This error is caused when there are more values in whatever is being unpacked than the amount of variables you have specified to be read into. The solution is to specify a matching number of variables to be read into as are being unpacked.
Рекомендации по теме
Комментарии
Автор

what if there are hundreds of values to unpack? we cannot give take hundred variables right?

shalinigarikapati
Автор

Finally... This has just been ripping my brain apart. I should have clicked it sooner. FYI, this video shows up as the 5th link for me when I search Google (including quotes) "ValueError: too many values to unpack".

JTutorials
Автор

Hi,


I am getting this error in OpenCV probablistic hough lines.


please help to resolve :-


---> for x1, y1, x2, y2 in lines[0]:
cv2.line(image, (x1, y1), (x2, y2), (0, 255, 0), 3)


ValueError: not enough values to unpack (expected 4, got 2)

AmitSharma-pozb
Автор

very useful for me, now i understand the meaning of this error

stevenwinsir
Автор

It was useful, since after an hour of struggle after watching this, I understood lots of concepts inside python programming.

Thank you very much.

rahul_bali
Автор

Hi. I was looking at your videos. I am right now working with matplotlib. I was trying to plot some graphs. When I tried to run it, following error I received " not enough free memory for image buffer". Could you please help me out.

rahulrungta
Автор

invalid literal for int() with base 10 ? I don't understand the meaning of this error

ayoubmassaadi
Автор

can you please tell me about
ValueError: setting an array element with a sequence.

harshithanaidu
Автор

Also show how to solve Index error. It shows Too many indices for array.

dhwajmangukia
Автор

how about this type of error( value error: need more than one value to unpack)

ikkyandmalik