Latest version of KiCost: Faster! Custom Pricing!

I was sourcing resistors from RS and there were significant price variation between brands at each value. The trouble was that for each value the cheapest was different. If you focus on one brand, your BOM cost will be inflated, so being lazy is punished

Hm… going for stackpole resistors at digikey in 0805 usually works for me… panasonic are in the low ball park mostly as well.

7 posts were split to a new topic: SMD resistor sizes and brands and their pricing

Hi, I want to try this out but when I try to install it (on Windows 10, via CMD (as admin and not as admin)) I get an error:

C:\WINDOWS\system32>easy_install kicost
Searching for kicost
Best match: kicost 0.1.21
Processing kicost-0.1.21-py3.5.egg
kicost 0.1.21 is already the active version in easy-install.pth
Installing kicost-script.py script to c:\users\nils\appdata\local\programs\python\python35\Scripts
Installing kicost.exe script to c:\users\nils\appdata\local\programs\python\python35\Scripts

Using c:\users\nils\appdata\local\programs\python\python35\lib\site-packages\kicost-0.1.21-py3.5.egg
Processing dependencies for kicost
Searching for lxml>=3.3.3
Reading https://pypi.python.org/simple/lxml/
Best match: lxml 3.6.0
Downloading https://pypi.python.org/packages/source/l/lxml/lxml-3.6.0.tar.gz#md5=5957cc384bd6e83934be35c057ec03b6
Processing lxml-3.6.0.tar.gz
Writing C:\Users\Nils\AppData\Local\Temp\easy_install-a64lozia\lxml-3.6.0\setup.cfg
Running lxml-3.6.0\setup.py -q bdist_egg --dist-dir C:\Users\Nils\AppData\Local\Temp\easy_install-a64lozia\lxml-3.6.0\egg-dist-tmp-gk9cgy9q
Building lxml version 3.6.0.
Building without Cython.
ERROR: b"‘xslt-config’ is not recognized as an internal or external command,\r\noperable program or batch file.\r\n"
** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
error: Setup script exited with error: Unable to find vcvarsall.bat

I’ve tried installing libxml2 with easy_install but it can’t find a package named libxml2. What am I doing wrong? I have Python 2.7 and Python 3.5 installed, maybe that creates an issue?

It looks like you’re having a (not uncommon) problem installing lxml on Windows. You may have to resort to installing a precompiled version of it. Go to http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml and download lxml-3.4.4-cp27-none-win32.whl (for 32-bit python 2.7) or lxml-3.4.4-cp35-none-win32.whl (for 32-bit python 3.5). Then install the .whl file with pip or easy_install.

2 Likes

Thank you, it has installed now

The self-resonant frequency of that capacitor seems to be around 5MHz, not 5GHz. If there are 1uF caps with an SRF of 5GHz (or even 1GHz), I sure would appreciate a pointer to them!

1 Like

is there any way to declare a component not mounted, and therefor ignored by Kicost?

KiBom has a special field ‘fit_field’
that can be ‘DNF’ to avoid taking care of the part
It would be nice if the same do not fit ‘fit_field’ could be take in care also in KiCost.
BTW @devbisme great plugin! Thx

2 Likes

Hi @devbisme
I have two questions related to KiCost:

  1. would it be possible to add Avnet as supplier?
    their shop should be compatible with KiCost method I think
    here an example of the searching

https://www.avnet.com/shop/SearchDisplay?searchTerm=MCP4822&countryId=emea&deflangId=-1&storeId=10151&catalogId=10001&langId=-1&sType=SimpleSearch&resultCatEntryType=2&searchSource=Q&searchType=100&avnSearchType=all

  1. I’m facing a strange issue when using KC and rs-components… I don’t have any result for rs-components with some Manf#, but when I do a manual search I found the code and availability…
    May I PM you an xml sample?

thx again for this useful tool
Maurice

I’ll take a look at adding Avnet. TBH, not high on my list of things I want to do.

You can send your XML file to devb@xess.com. The RS webscraper was written by someone else. I’ll take a look at it.

1 Like

sent a pm through the forum …
thx
Maurice

Problem with RS is fixed. KiCost version 0.1.35

2 Likes

Thanks @davidsrsb! Just tried your version 0.1.35 and it works great for me.

BTW, I had to do “pip install lxml” after creating “virtualenv” and before “kicost” can work for me.

I installed it using “python setup.py” inside the cloned source tree.

Hi @devbisme
it works fine now!
Thank you very much! :smiley:
Maurice

Im having trouble finding out how to make a component DNP/DNM etc in order words make kicost skip a certain component.
Is variant the proper way to do it?

@devbisme Im trying to use variant but cant figure out what im doing wrong.
all of my components have a field called “MPN” with the number in.
A few of the components has a field called “kicost.v1:manf#” instead of the field called “MPN” (should I have both?)
when r unning “kicost -i BOM_TEST.xml --overwrite” I still get the kicost.v1:manf# components inside the xlsx file.
if I try “kicost -i BOM_TEST.xml --overwrite --variant v1” I get the exact same result as without “–variant v1”.

what am I doing wrong? :stuck_out_tongue:

Send me your XML file exported from your design and I’ll take a look at it. If you can’t attach it in this forum, then send it to devb ath xess dot com.

1 Like

I’m not sure about now, but in the past the most used method for spammers to get email addresses was to scrape them from the web. I’d edit this out and use the private messaging available on the forum instead.

1 Like

@devbisme
Any clue why I’m getting “no quantity” on every single item? The .xlsx has all the quantity cells in zero.

project_bom.xml (144.3 KB)

I’m running kicad nighties, ubuntu, installed using easy_install