Britefury / django-labeller

An image labelling tool for creating segmentation data sets, for Django and Flask.
MIT License
140 stars 40 forks source link

TypeError: Labels() got an unexpected keyword argument 'complete' #1

Closed jessecanada closed 4 years ago

jessecanada commented 4 years ago

When running populate.py, get an error

"TypeError: Labels() got an unexpected keyword argument 'complete'".

I think the problem is in line 37 of populate.py:

labels_model = lt_models.Labels(
                    labels_json_str = json.dumps(labels), 
                    complete = complete,
                    creation_date = datetime.date.today())

In image_labelling_tool.models, the Labels() class does not have a positional arg "complete". I suspect you are trying to refer to "completed_tasks".

When I changed the problematic line in populate.py to try and fix the issue:

labels_model = lt_models.Labels(
                    labels_json_str = json.dumps(labels), 
                    completed_tasks = complete,
                    creation_date = datetime.date.today())

I get another Django error

TypeError: Direct assignment to the forward side of a many-to-many set is prohibited.

I'm not familiar with Django so was not able to fix that problem and got stuck here.

Britefury commented 4 years ago

Hi, sorry about that. It should be fixed now; both on the GitHub repo and on the PyPI package.