Skip to content

Chapter 09 #48

@osmminog

Description

@osmminog

The product recommendation system gives an error. "zincrby() got multiple values for argument 'amount'"
def products_bought(self, products): product_ids = [p.id for p in products] for product_id in product_ids: for with_id in product_ids: # get the other products bought with each product if product_id != with_id: # increment score for product purchased together r.zincrby(self.get_product_key(product_id), with_id, amount=1)

Python 3.7.9, Django 3, Redis server v=3.0.6

Tell me what could be the problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions