Python 3 - ValueError: not enough values to unpack (expected 3, got 2)

前端 未结 5 2116
野的像风
野的像风 2021-01-04 14:04

I have a problem with my Python 3 program. I use Mac OS X. This code is running properly.

# -*- coding: utf-8 -*-
#! python3
# sendDuesReminders.py - Sends e         


        
5条回答
  •  余生分开走
    2021-01-04 15:08

    ValueErrors :In Python, a value is the information that is stored within a certain object. To encounter a ValueError in Python means that is a problem with the content of the object you tried to assign the value to.

    in your case name,lastname and email 3 parameters are there but unpaidmembers only contain 2 of them.

    name, lastname, email in unpaidMembers.items() so you should refer data or your code might be
    lastname, email in unpaidMembers.items() or name, email in unpaidMembers.items()

提交回复
热议问题