-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400: Invalid GetItemCommunicationsRequest.ClassUnitType: value is not a valid enum #190
Comments
Pinging @vrslev for visibility. |
Hey there! Can you send full traceback? |
Error on request: |
* Fix typing issue * Fix access to Ingka Item endpoint in non-russia locations Fixes #190
Fixed the issue in v2.1.1 🫶 |
Thanks for the quick response on the matter. Incidentally I just tested the changes: For an item that does not exist, it returns an empty response with code 200. (I am assuming this is expected) Sorry for the bad news :/. |
Oh, I see. Can you send the item code? |
sure. I tried these ones: "00366301","29902933","60366303" |
Same ones you mentioned earlier—got it. I’ll see what I can do when I’ll get back from work. |
cheers mate
…On Wed, 25 Oct 2023 at 13:00, Lev ***@***.***> wrote:
Same ones you mentioned earlier—got it. I’ll see what I can do when I’ll
get back from work.
—
Reply to this email directly, view it on GitHub
<#190 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL7RQB44C5VKL43EXJXKBIDYBDWOJAVCNFSM6AAAAAA6FSUEDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZGAYTKNZRG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Weird. This code: import asyncio
from pprint import pprint
import ikea_api
constants = ikea_api.Constants(country="it", language="it")
item_codes = ["00366301", "29902933", "60366303"]
items = asyncio.run(ikea_api.get_items(constants=constants, item_codes=item_codes))
pprint(items) outputs: [ParsedItem(is_combination=False, item_code='00366301', name='BEKANT, Piano tavolo, impiallacciato rovere mord bianco, 160x80 cm', image_url='https://www.ikea.com/it/it/images/products/bekant-piano-tavolo-impiallacciato-rovere-mord-bianco__0734707_pe739602_s5.jpg', weight=14.95, child_items=[], price=110, url=HttpUrl('https://www.ikea.com/it/it/p/bekant-piano-tavolo-impiallacciato-rovere-mord-bianco-00366301/', ), category_name='BEKANT piani tavolo per ufficio', category_url=HttpUrl('https://www.ikea.com/it/it/cat/bekant-piani-tavolo-per-ufficio-18966/', )),
ParsedItem(is_combination=True, item_code='29902933', name='BRIMNES, Struttura letto con cassetti, bianco/Luröy, 140x200 cm', image_url='https://www.ikea.com/it/it/images/products/brimnes-struttura-letto-con-cassetti-bianco-luroey__1151024_pe884762_s5.jpg', weight=0.0, child_items=[ChildItem(name=None, item_code='50228717', weight=0.0, qty=1), ChildItem(name=None, item_code='90124534', weight=0.0, qty=1), ChildItem(name=None, item_code='50160208', weight=0.0, qty=2)], price=249, url=HttpUrl('https://www.ikea.com/it/it/p/brimnes-struttura-letto-con-cassetti-bianco-luroey-s29902933/', ), category_name='Letti matrimoniali, king size e una piazza e mezza', category_url=HttpUrl('https://www.ikea.com/it/it/cat/letti-matrimoniali-16284/', )),
ParsedItem(is_combination=False, item_code='60366303', name='BEKANT, Piano tavolo, impiallacc frassino/mordente nero, 160x80 cm', image_url='https://www.ikea.com/it/it/images/products/bekant-piano-tavolo-impiallacc-frassino-mordente-nero__0734703_pe739598_s5.jpg', weight=14.95, child_items=[], price=110, url=HttpUrl('https://www.ikea.com/it/it/p/bekant-piano-tavolo-impiallacc-frassino-mordente-nero-60366303/', ), category_name='BEKANT piani tavolo per ufficio', category_url=HttpUrl('https://www.ikea.com/it/it/cat/bekant-piani-tavolo-per-ufficio-18966/', ))] To me it seems like an expected response: data correctly received, parsed, validated and retrieved. |
You're right. seems to be a problem in my project.
…On Wed, 25 Oct 2023 at 18:53, Lev ***@***.***> wrote:
Weird.
This code:
import asynciofrom pprint import pprint
import ikea_api
constants = ikea_api.Constants(country="it", language="it")item_codes = ["00366301", "29902933", "60366303"]items = asyncio.run(ikea_api.get_items(constants=constants, item_codes=item_codes))pprint(items)
outputs:
[ParsedItem(is_combination=False, item_code='00366301', name='BEKANT, Piano tavolo, impiallacciato rovere mord bianco, 160x80 cm', image_url='https://www.ikea.com/it/it/images/products/bekant-piano-tavolo-impiallacciato-rovere-mord-bianco__0734707_pe739602_s5.jpg', weight=14.95, child_items=[], price=110, url=HttpUrl('https://www.ikea.com/it/it/p/bekant-piano-tavolo-impiallacciato-rovere-mord-bianco-00366301/', ), category_name='BEKANT piani tavolo per ufficio', category_url=HttpUrl('https://www.ikea.com/it/it/cat/bekant-piani-tavolo-per-ufficio-18966/', )),
ParsedItem(is_combination=True, item_code='29902933', name='BRIMNES, Struttura letto con cassetti, bianco/Luröy, 140x200 cm', image_url='https://www.ikea.com/it/it/images/products/brimnes-struttura-letto-con-cassetti-bianco-luroey__1151024_pe884762_s5.jpg', weight=0.0, child_items=[ChildItem(name=None, item_code='50228717', weight=0.0, qty=1), ChildItem(name=None, item_code='90124534', weight=0.0, qty=1), ChildItem(name=None, item_code='50160208', weight=0.0, qty=2)], price=249, url=HttpUrl('https://www.ikea.com/it/it/p/brimnes-struttura-letto-con-cassetti-bianco-luroey-s29902933/', ), category_name='Letti matrimoniali, king size e una piazza e mezza', category_url=HttpUrl('https://www.ikea.com/it/it/cat/letti-matrimoniali-16284/', )),
ParsedItem(is_combination=False, item_code='60366303', name='BEKANT, Piano tavolo, impiallacc frassino/mordente nero, 160x80 cm', image_url='https://www.ikea.com/it/it/images/products/bekant-piano-tavolo-impiallacc-frassino-mordente-nero__0734703_pe739598_s5.jpg', weight=14.95, child_items=[], price=110, url=HttpUrl('https://www.ikea.com/it/it/p/bekant-piano-tavolo-impiallacc-frassino-mordente-nero-60366303/', ), category_name='BEKANT piani tavolo per ufficio', category_url=HttpUrl('https://www.ikea.com/it/it/cat/bekant-piani-tavolo-per-ufficio-18966/', ))]
To me it seems like an expected response: data correctly received, parsed,
validated and retrieved.
—
Reply to this email directly, view it on GitHub
<#190 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL7RQBYSHRSDE75UTAWZBI3YBE7YXAVCNFSM6AAAAAA6FSUEDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZZGY4DEMZTGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hey,
I intend to use this library as a backend and write a fancy frontend on it. I made an api layer using flask to call the library but I encountered some issues.
Calling the getitem API results in the following repsonse:
ikea_api.exceptions.NotSuccessError: (400, '{"error":{"code":400,"message":"invalid GetItemCommunicationsRequest.ClassUnitType: value is not a valid enum"}}')
Code snippet:
constants = ikea_api.Constants(country="it", language="it", base_url="https://www.ikea.com") itemCode = ["00366301","29902933","60366303"] items = await ikea_api.get_items(constants,itemCode)
My question is do I ignore the 400?
I am hoping someone managed to get around this.
The text was updated successfully, but these errors were encountered: