hildogjr / KiCost

Build cost spreadsheet for a KiCad project.
MIT License
517 stars 98 forks source link

Unexpected kicost behavior: Wrong mouser part for correct part number #566

Open gituser789 opened 4 months ago

gituser789 commented 4 months ago

Issue / Problem report

Kicost picks a wrong part number, giving a correct part number in it. I have attached the example xml-file (with only one component).

Inside the xml-file, the correct mouser part number 538-53398-0871 appears, but kicost picks 538-53398-0890 via mouser api. I can not detect any failure in the xml file, as the wrong part number does not exist there. The mouser# field is filled correctly (see attached file). I am using kicost since a while, never hat issues like that. What did i miss? Is the failure inside the mouser API?

  1. KiCost v1.1.19
  2. No failure on terminal
  3. GUI
  4. xml-file is attached to this issue

image

LCB-CBB-01.zip

set-soft commented 4 months ago

Hi @gituser789 !

Lamentably I can't reproduce it, I get: image

I see you don't have a price for it, do you have a Mouser key?

gituser789 commented 4 months ago

Hi @set-soft,

yes, mouser key is available, see here the screenshot from an unshortened list image

Seems like not showing prices when the device is non-stock.

Just checked the file I uploaded again (by downloading my own uploaded file): Still the same result, shows two different material numbers. image

python: 3.12 KiCost: v1.1.19 kicost-digikey-api-v3: 0.1.3

set-soft commented 4 months ago

yes, mouser key is available, see here the screenshot from an unshortened list

I mean the key to access Mouser API in the KiCost config.yaml file. Not the part number for Mouser. Using the Mouser API I get the correct P/N and the part is in stock. Also remember to delete the cache entry if you want to retry I query.

gituser789 commented 4 months ago

API key is from the beginning in ~./config/kicost/config.yaml (can be seen from the screenshot above, as prices for the other components are directly from Mouser API).

After deleting the cache, the BOM creates perfect, see screenshot: image

Thanks a lot for your help!

gituser789 commented 4 months ago

I have deleted the cache by clearing this folder: ~/.cache/kicost/Mouser Is it useful to add a button delete cache inside the GUI?