saleor-gql-loader
saleor-gql-loader copied to clipboard
Duplicated attribute values for product variant
I was running your example code, it worked all the way up until I tried to create variants. I got this error
Traceback (most recent call last):
File "<input>", line 9, in <module>
File "~/saleor/venv/lib/python3.7/site-packages/saleor_gql_loader/data_loader.py", line 677, in create_product_variant
handle_errors(errors)
File "~/saleor/venv/lib/python3.7/site-packages/saleor_gql_loader/utils.py", line 143, in handle_errors
raise Exception("\n".join(txt_list))
Exception: attributes : Duplicated attribute values for product variant.
Have you made sure your attribute values are unique ?
Have you made sure your attribute values are unique ?
Looks like I've fixed this, also not sure how to use GitHub yet, but I dropped in a function to handle multi-variant items.
Hi @ehutzle I'm experiencing this same issue now. How were you able to fix it? Thank you
Issue resolved. @grll there's a small typo in your example code. In the last step the first argument to create_product_variant is: product_id should actually be: product["id"]
Here's the link with the example code I'm referring to step 23:
https://github.com/grll/saleor-gql-loader/blob/master/saleor_gql_loader/example.ipynb