Skip to content
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

Runtime exception: Multiple parts found with ID N/A #616

Closed
d-buchmann opened this issue May 22, 2024 · 1 comment
Closed

Runtime exception: Multiple parts found with ID N/A #616

d-buchmann opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@d-buchmann
Copy link
Contributor

Describe the bug
When adding info provider parts, Mouser sometimes reports "N/A" as the MPN.
If you add the part, there is no problem, but if you add a second part with MPN=N/A, you get the above error.

To Reproduce
Steps to reproduce the behavior:

  1. Search for parts via Mouser info provider
  2. Find part with MPN "N/A" and add it
  3. Find another part and try to add it as well - the exception is raised.

Expected behavior

  • The part could be merged automatically to the existing ID (similar to the feature "update part from info provider"). Then the user can decide if the merge is meaningful, and if not, abort it.

  • Part-DB Version: 1.11.3

Additional info
I think it's a waste of time to find a feature of every possible (also future) API response that is always unique, so duplicates must be handled somehow.

@d-buchmann d-buchmann added the bug Something isn't working label May 22, 2024
@jbtronics
Copy link
Member

The problem is not the manufacturer part number.
This error occurs, when the Mouser Product ID (which should identify a product of mouser uniquely) is not unique anymore.

Without such a identifying key, it is not possible for Part-DB to know which part a user has selected.

Therefore, I am afraid that there is no real fix for it, for the underlying issue, as there is no other usable identifier.

To avoid the problem, the provider now checks, if the number looks valid and hide these which are too short. That way the problem should not occur anymore.

And the parts with such an invalid product ID are not sold by mouser anymore, so hiding them is probably not a big loss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants