ValueError: need more than 1 value to unpack python

后端 未结 4 1342
抹茶落季
抹茶落季 2020-12-06 18:01

I have got an existing menu that gives you options L or D. L should load the contents of a file and D should display it.<

4条回答
  •  时光取名叫无心
    2020-12-06 18:29

    This means that there is a line in packages.txt that, when you strip whitespace and split on commas, doesn't give exactly three pieces. In fact, it seems that it gives only 1 piece ("need more than 1 value to unpack"), which suggests that there's a line with no commas at all.

    Perhaps there are blank or comment lines in packages.txt?

    You may need your code to be smarter about parsing the contents of the file.

提交回复
热议问题