Closed craigarno closed 3 years ago
Related with #412
We are right with low people number to fix all the issues.
You still can use by the CLI commands: kicost -i FILE.xml
.
Also, try to install using pip kicost
instead easy_install kicost
, there is a old issue (I think not present anymore).
I understand not enough people/hours in day to fix things...
Tried pip kicost and easy_install kicost. Both say everything is fine, then KiCost doesn't work. KiCAD and the schematic in eeschema look great on both systems.
I tried kicost -i PicoTAP.xml and end up with a spreadsheet containing BOM information, but not part vendor/cost information from distributors.
craig@pluto:~/Project/PicoTAP% kicost -i PicoTAP.xml --overwrite -o PicoTAP.xlsx
No 'manf#' and 'rs#' field in any part: no information by 'RS Components'.
No 'manf#' and 'newark#' field in any part: no information by 'Newark'.
No 'manf#' and 'tme#' field in any part: no information by 'TME'.
No 'manf#' and 'arrow#' field in any part: no information by 'Arrow'.
No 'manf#' and 'farnell#' field in any part: no information by 'Farnell'.
No 'manf#' and 'digikey#' field in any part: no information by 'Digi-Key'.
No 'manf#' and 'mouser#' field in any part: no information by 'Mouser'.
No 'manf#' and 'lcsc#' field in any part: no information by 'LCSC'.
Progress: 0part [00:00, ?part/s]
craig@pluto:~/Project/PicoTAP%
I just tried kicost under Ubuntu 16.04 LTS. Similar if not the same problems: craig@pluto:~/Project/PicoTAP% kicost --info KiCost v.1.1.4.at Python 2.7.12.on Linux-4.4.0-186-generic-x86_64-with- Ubuntu-16.04-xenial(64bit).Graphical library: 3.0.2.0 gtk2 (classic).
craig@pluto:~/Project/PicoTAP% kicost
Traceback (most recent call last):
File "/usr/local/bin/kicost", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/kicost/__main__.py", line 253, in main
kicost_gui() # Use the user gui if no input is given.
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 1065, in kicost_gui
frame = formKiCost(None)
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 540, in __init__
self.set_properties()
File "/usr/local/lib/python2.7/dist-packages/kicost/kicost_gui.py", line 866, in set_properties
self.m_comboBox_currency.Insert(currencyList, 0)
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 12875, in Insert
return _core_.ItemContainer_Insert(*args, **kwargs)
TypeError: String or Unicode type required
KiCost seems an important enough feature that I wonder if you could convince the KiCAD development team to support KiCost, kind of like Thunderbird did with Lightning calendar? KiCost is just as, if not more important, than 3D viewing. KiCost ranks up there with DRC and Annotation in my book.
The first error appear that kicost is not recognizing your manucture code field.
Did you fill some "manf#" field at Eschema? For now KiCost don't automatic identify parts second #17 .
Kicost support some distributors and right now depends on KiSpace service or Octopart account.
I think it dependency doesn't fill on KiCad idea.
I think I am seeing the same error of macOS:
Traceback (most recent call last):
File "/usr/local/bin/kicost", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/kicost/__main__.py", line 253, in main
kicost_gui() # Use the user gui if no input is given.
File "/usr/local/lib/python3.7/site-packages/kicost/kicost_gui.py", line 1065, in kicost_gui
frame = formKiCost(None)
File "/usr/local/lib/python3.7/site-packages/kicost/kicost_gui.py", line 367, in __init__
fgSizer1.Add(self.m_gauge_process, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 5)
wx._core.wxAssertionError: C++ assertion "!(flags & (wxALIGN_BOTTOM | wxALIGN_CENTRE_VERTICAL)) || !(flags & (wxALIGN_RIGHT | wxALIGN_CENTRE_HORIZONTAL))" failed at /Users/robind/projects/bb2/dist-osx-py37/build/ext/wxWidgets/src/common/sizer.cpp(1453) in DoInsert(): wxEXPAND flag will be overridden by alignment flags
kicost --info:
KiCost v.1.1.4.at Python 3.7.7.on
Darwin-19.6.0-x86_64-i386-64bit(64bit).Graphical library: 4.1.0 osx-cocoa
(phoenix) wxWidgets 3.1.4.
I am however able to run it from the command line:
No information found for parts 'Q1,Q3,Q5' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'Si2333DDS'}}`
No information found for parts 'F1-F6' query `{'mpn': {'manufacturer': 'Bel Fuse', 'part': '0ZCK0035FF2G'}}`
No information found for parts 'R2-R8,R15,R21,R36' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW0402499KFK'}}`
No information found for parts 'R9-R12,R37,R38,R46' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW04021M00FK'}}`
No information found for parts 'R17' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW0402357KFK'}}`
No information found for parts 'R18' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW0402274KFK'}}`
No information found for parts 'Q2,Q4,Q6-Q8' query `{'mpn': {'manufacturer': 'Diodes Inc.', 'part': 'DMG2302UK-7'}}`
No information found for parts 'R16,R22' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW06030000Z0'}}`
No information found for parts 'D1-D3' query `{'mpn': {'manufacturer': 'Diodes Inc.', 'part': 'D4V5H1U2LP1610-7'}}`
No information found for parts 'R1' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW0402191KFK'}}`
No information found for parts 'U4-U8,U16' query `{'mpn': {'manufacturer': 'Texas Instruments', 'part': 'TPS22917DBVR'}}`
No information found for parts 'U1#2,U2#2,U3#2' query `{'mpn': {'manufacturer': 'Nexperia', 'part': '125'}}`
No information found for parts 'J3-J6' query `{'mpn': {'manufacturer': 'JST Connector', 'part': 'B2B-PH-K-S'}}`
No information found for parts 'J1,J2' query `{'mpn': {'manufacturer': 'Sullins Connector Solutions', 'part': 'PPPC141LFBN-RC'}}`
No information found for parts 'U9-U14' query `{'mpn': {'manufacturer': 'Diodes Inc.', 'part': 'DT2041-04SO-7'}}`
No information found for parts 'J7,J8' query `{'mpn': {'manufacturer': 'JST Connector', 'part': 'B3B-PH-K-S'}}`
No information found for parts 'R23,R24,R27' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW040210K0FK'}}`
No information found for parts 'J10' query `{'mpn': {'manufacturer': 'JST Connector', 'part': 'BM08B-SRSS-TB'}}`
No information found for parts 'U15' query `{'mpn': {'manufacturer': 'Texas Instruments', 'part': 'TPS62740DSSR'}}`
No information found for parts 'R31' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW040210M0FK'}}`
No information found for parts 'U19' query `{'mpn': {'manufacturer': 'Fujitsu', 'part': 'MB85RS1MTPNF-G'}}`
No information found for parts 'U20' query `{'mpn': {'manufacturer': 'Texas Instruments', 'part': 'TMP116AIDRVR'}}`
No information found for parts 'U21,U22' query `{'mpn': {'manufacturer': 'Texas Instruments', 'part': 'ADS1115IDGS'}}`
No information found for parts 'R49-R56' query `{'mpn': {'manufacturer': 'Vishay', 'part': 'CRCW0402100RFK'}}`
No information found for parts 'J12' query `{'mpn': {'manufacturer': 'METZ Connect', 'part': 'PR20B05VBDN'}}`
Progress: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 37/37 [00:11<00:00, 3.20part/s]
Are those queries returning "No information found" specific to a vendor or does it mean no info from any vendor?
Each part has a Digikey PN already so I will need to investigate why I am seeing the query problem.
Some problems can happens when the manufacture name on schematic is slightly different from real one (Vishay/vishay). --ignore_fields manf
on KiCost call could some it.
I just catch in your log:
No information found for parts 'U1#2,U2#2,U3#2' query `{'mpn': {'manufacturer': 'Nexperia', 'part': '125'}}`
Have a look on https://github.com/xesscorp/KiCost/issues/416
Yeah, that line is weird. There are actually two lines in the generated excel file:
U1#1,U2#1,U3#1 | 74AUP1G98 - p1/2 | | SOT-363_SC-70-6 | Nexperia | 74AUP1G98GW | 300 | $0.00 | $0.00 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --
U1#2,U2#2,U3#2 | 74AUP1G98 - p2/2 | | SOT-363_SC-70-6 | Nexperia | 125 | 300 | $0.00 | $0.00 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
I am not sure why. Those parts are single "gate" devices. So, one part per package. Looking at the line in the excel file seems to suggest that there are multiple parts per device package?
Duplicated of #412
@hildogjr Yeah, I see that now. You can escape the comma with a backslash. I was wondering if that comma was going to cause a problem somewhere ;-) Thank you.
The comma is intended to create parts will "multiple parts", useful for connectors and other assembled parts.
Unfortunately, that creates a problem when using the other BOM tools ... they do not seem to recognize the escape and so the back slash is included the part number.
Seems like a KiCAD issue.
Other BOM tools will also not recognize the multiple part system.
So, maybe, que KiCost need some improvements in this cases.
Ah, ok. So, the comma in the part name is a KiCost feature, not an issue with KiCAD itself. Maybe KiCost could use a dedicated field for this purpose instead of using the part number?
Questions:
I made this feature some (long) time ago, maybe there is a better way but I am too biased to put a opnion.
The user could specify the field with a command line parameter? Something like "--multipartfield" or something that makes sense. I'm not too familiar with the feature so do not have a good suggestion on exactly what to call it.
Is there a kicost.ini file? The KiBOM guys use an ini file for configuration of the tool for the project. So, for instance, you specify which field to use for the "do not fit" field in the ini file. They also use a field for linking to a part on the Digikey website. I've included a portion of the ini file below. The fit_field option in this example is "Config".
I think the feature would work the same way you do it now. I do not see any need to change the functionality. Just use a custom field specified by the user.
[BOM_OPTIONS]
; General BoM options here
; If 'ignore_dnf' option is set to 1, rows that are not to be fitted on the PCB will not be written to the BoM file
ignore_dnf = 1
; If '{opt}' option is set to 1, the schematic version number will be appended to the filename.
include_version_number = 1
; Field name used to determine if a particular part is to be fitted
fit_field = Config
; Make column to contain links to the Digi-Key web page for a component. (Note: Digi-Key links will only be generated for the HTML output format)
digikey_link = Digikey PN
; Specify output file name format, %O is the defined output name, %v is the version, %V is the variant name which will be ammended according to 'variant_file_name_format'.
output_file_name = %O_bom_%v%V
; Specify the variant file name format, this is a unique field as the variant is not always used/specified. When it is unused you will want to strip all of this.
variant_file_name_format = _(%V)
; Default number of boards to produce if none given on CLI with -n
number_boards = 1
; Default PCB variant if none given on CLI with -r
board_variant = "default"
; When set to 1, suppresses table/column headers and legends in the output file.
; May be useful for testing purposes.
hide_headers = 0
; When set to 1, PCB information (version, component count, etc) is not shown in the output file.
; Useful for saving space in the HTML output and for ensuring CSV output is machine-parseable.
hide_pcb_info = 0
This INI file was a good propose in the past. KiCost started to require a lot of parameters (in not straightforward use).
In that time, I made the GUI (with memory of the parameters). But it is now broken.
If one could ignore the "do not fit" components, that would be helpful as well. Or better yet, use a different field for "do not cost" and these components would be ignored and not included in the spreadsheet.
The first already exists --ignore_fileds NOPOP
. Just ignore the field with such information.
I misunderstood that --ignore_fields just ignored the field, not the entire part? What I want to do is ignore the part (leave it out of the spreadsheet entirely). Things like "fiducials" are "parts" on the PCB but are not real parts. Mounting holes is another example of "parts" that I would prefer are not in the BOM.
Yes, correct just the field. But ignoring the DNP/NOPOP (filed used for not populated information yours), the part will be listed in the spreadsheet.
Yes. NOPOP / DNP fields as 1.
KiCad Nightly ans next v6 will already provide this information (not as field). Until now, if NOPOP / DNP are defined, the part is excluded from spreadsheet. Butt will be include with used --ignore_fields
to ignore this info.
Saw the KiCost video, was really excited until I ran into problems I don't know how to solve in the Python environment. Help is requested.
After installing KiCost 1.1.4, KiCost won't start.
KiCost 1.1.4 won't start.
During install I see lots of
MS Windows 10: Fresh install of KiCAD 5.1.6-1, then open CMD Window as Admin:
How to reproduce:
Fresh install of KiCAD followed by fresh install of KiCost:
Issue / Problem report
kicost --version
at terminal.--debug
option on KiCost call; kicost -w -i %YOUR_FILE% --debug 8The last thing I could think to try is using pip to install:
This is a new design created using KiCAD 5.1.6-1 under Windows 10. Schematic done, aiming for PCB layout.
I'm stumped. Any help to get KiCost running will be appreciated. KiCost looks like a really amazing time saver.