question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Local" distributor not working

See original GitHub issue

This is related to the following part of the documentaion: “Custom Part Data”:


The price breaks on some parts can’t be obtained automatically because:

  • they’re not offered by one of the distributors whose web pages KiCost can scrape/query, or
  • they’re custom parts.

For these parts, you can manually enter price information as follows:

#. Create a new field for the part named kicost:pricing in either the schematic or library. #. For the field value, enter a semicolon-separated list of quantities and prices which are separated by colons like so::

  1:$1.50; 10:$1.00; 25:$0.90; 100:$0.75

(You can put spaces and currency symbols in the field value. KiCost will strip everything except digits, decimal points, semicolons, and colons. Others currency are acepted by use of the standardize ISO 4217 alpha3 format, e.g. USD1.50, EUR1.00)

You can also enter a link to documentation for the part using a field named kicost:link. The value of this field will be a web address like::

www.reallyweirdparts.com/products/weird_product.html

After KiCost is run, the price information and clickable link to documentation for the part are shown in a section of the spreadsheet labeled Local. If you want to associate the pricing and/or documentation link to a particular source or distributor, just place an extra label within the field key to indicate the source like so:

kicost:My_Weird_Parts:pricing
kicost:My_Weird_Parts:link

Then the pricing and documentation link for that part will appear in a section of the spreadsheet labeled My_Weird_Parts.


Current code in master fails to do it. I think the original implementation was by @devbisme and then @mdeweerd tried to fix something related to variants and all started to fail.

I changed the code in this patch: 343297c0a3aa9a58b7ac914ef9a80ad9d5eb1519

I’m looking for comments about it. After applying this patch I found various interesting differences in the tests. You can see a big difference in fitting_test.xlsx.

The current result can be observed here: https://github.com/xesscorp/KiCost/suites/2616517652/artifacts/57324546 And the current master is here: https://github.com/xesscorp/KiCost/suites/2579090530/artifacts/56243325

You’ll see that in master JP1 is separated from JP2 and JP3. This is because the code fails to interpret kicost:pricing. You can also note that we don’t get the Local distributor as stated in the documentation.

Is the new version correct? I guess that the local namespace is there to avoid collision with other tools. As an example: if another tool makes a different use of the DNP field you can use kicost:DNP to avoid problems. Is this correct?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:29 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
set-softcommented, May 7, 2021

I liked this new | separator, I think it is more clear.

Yes this is very good visually. Good for multiparts where the fields becomes really long.

1reaction
hildogjrcommented, May 7, 2021
<field name="kicost:we:pricing">1:EUR0.07|0:0|1:EUR0.03;100:EUR0.01</field>
<field name="manf">Wurth Electronik|Bel Fuse|Wurth Electronik</field>
<field name="manf#">696101000002|5MF 6-R|695120004001</field>
<field name="mouser#">710-696101000002|530-5MF6-R|</field>

I liked this new | separator, I think it is more clear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Top 5 Reasons Behind No Spark from Distributor
First thing first, see if there is any broken or loose wire connecting sensors to the power control module. The Crankshaft position sensor...
Read more >
How to Tell If You Have a Faulty Distributor - CarsDirect
Check the Distributer Cap Often the distributor cap is suspect. · Check the Contact Points Inspect the condenser; the engine will not function...
Read more >
Distributor configuration is out-of-date - AW problem
With the Distributor running, when you do "Initialize Local Database" it will completely drop the tables in the AWDB and rebuild them from...
Read more >
The Distributor has not been installed correctly. Could not ...
A call to the procedure sp_adddistpublisher was missing. Configures a Publisher to use a specified distribution database. This stored procedure ...
Read more >
How to Diagnose a No-Spark or Loss of Power Condition on a ...
If you do not have access to a scan tool, your local parts store can scan ... the distributor rotor and found no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found