-
Notifications
You must be signed in to change notification settings - Fork 37
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
AttributeError: 'ManufacturerProductDetailsRequest' object has no attribute 'keywords' #8
Comments
@clementspeter to convert to dictionary you can use the following method: digikey.product_details(part).to_dict() With |
Dear Francois, Have you succeeded in getting the manufacturer_product_details function to work? |
@clementspeter No I haven't tried that function, I'm getting all data I need with the |
@eeintech thanks, do all 3 functions (search / product details and manufacturer_product_details) provide the same output? What would be the interest? I just tried the dict command and it works, thanks for the hint! |
To phrase it differently: when should which function ideally be used / provides the most accurate or complete results? |
This was a simple bug. I fixed it in my fork (https://github.com/Funkenjaeger/digikey-api) Regarding the difference between the three functions, I suggest referring to the DigiKey API definitions, which this library is just faithfully interfacing.
|
@Funkenjaeger |
@eeintech True, sometimes it does. The actual argument passed to the digikey API is named "digiKeyPartNumber", and the summary in the API description states "Works best with a Digi-Key part number. Some manufacturer part numbers conflict with unrelated parts and may not return the correct product." I've updated my above comment to reflect that technically, using MPN is possible, but at your own risk. |
Oh that's interesting. For Ki-nTree my colleagues and I have been solely relying on |
Fixes AttributeError: 'ManufacturerProductDetailsRequest' object has no attribute 'keywords'
Fixes AttributeError: 'ManufacturerProductDetailsRequest' object has no attribute 'keywords'
Hello, I do have the same king of error with the following part number: DMT3N4R2U224M3DTA0
The error is the following: TypeError: Object of type datetime is not JSON serializable |
@sebo83910 Assuming you did |
This is strange:
|
What do you get in your I have:
|
Also there are plenty of discussion about this error on Google, take a look! |
indeed, I solved it like this:
Thanks for your help. |
@clementspeter Any chance you can close this issue? |
Hi,
I need to have a look – am pretty occupied for the next 2 weeks with some other projects, but I schedule it in!
From: Francois ***@***.***
Sent: 21 July 2021 16:38
To: peeter123/digikey-api ***@***.***>
Cc: clementspeter ***@***.***>; Mention ***@***.***>
Subject: Re: [peeter123/digikey-api] AttributeError: 'ManufacturerProductDetailsRequest' object has no attribute 'keywords' (#8)
@clementspeter <https://github.com/clementspeter> Any chance you can close this issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#8 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ASDWEHEQMJY76IMRR6X763TTY3LTPANCNFSM4U2R67NA> .
|
@clementspeter No problem, it's a real issue unfortunately. Hoping some activity from @peeter123 to take a look at current PR before proposing a fix. |
Dear both,
First of all, thank you very much for this API solution.
I wanted to try out the manufacturer_product_details and used the commands below
search_request = ManufacturerProductDetailsRequest(manufacturer_product=part, record_count=10)
manufacturer_details = digikey.manufacturer_product_details(body=search_request)
"part" is set to a manufacturer reference => ERA-3AED681V
The error in the title is given - what am I doing wrong?
Secondly, I noticed the responses from keyword_search and product_details are not iterable.
What is your recommendation to treat the output result (getting all the returned information into a dictionary)?
Thank you very much for your time,
Best,
Peter
The text was updated successfully, but these errors were encountered: