PaddleCV-SIG / PaddleLabel

飞桨智能标注,让标注快人一步
https://paddlecv-sig.github.io/PaddleLabel/
Apache License 2.0
238 stars 39 forks source link

TypeError: argument of type 'method' is not iterable #7

Closed geoyee closed 2 years ago

geoyee commented 2 years ago

@linhandev 韩哥在pplabel\api\model\base.py中,创建project的时候46行报错,如下

@classmethod
    def _get(cls, **kwargs):
        many = kwargs.get("many", False)
        if "many" in kwargs.keys():
            del kwargs["many"]
        for key in kwargs.keys():
            if key not in cls._cols:  # FIXME: TypeError: argument of type 'method' is not iterable
                raise AttributeError(f"Model {cls.__tablename__} don't have attribute {key}")

我不清楚这个cls是什么,不知道是不是上面的那个[c.key for c in cls.__table__.columns]里面的问题,麻烦韩哥看看,我这先给注释了可以创建项目

linhandev commented 2 years ago

升级一下sqlalchemy试试