kicad-jlcpcb-tools: Not Able to Download JLC Library Database (404)

Describe the bug I tried to update to the latest version of kicad-jlcpcb-tools, upon using it, there’s an error as shown in the image.

To Reproduce Steps to reproduce the behavior:

  1. Go to PCB Editor
  2. Click on the Plugin button
  3. Click on Update Library

Expected behavior Automatically downloading LCSC Part Library.

KiCad Version

Application: KiCad

Version: 6.0.9-8da3e8f707~117~ubuntu22.10.1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.85.0 OpenSSL/3.0.5 zlib/1.2.11 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.3 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.49.0 librtmp/2.3

Platform: Linux 5.19.0-23-generic x86_64, 64 bit, Little endian, wxGTK, ubuntu, x11

Build Info:
	Date: Nov 24 2022 00:22:25
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.6.3
	Curl: 7.85.0
	ngspice: 37
	Compiler: GCC 12.2.0 with C++ ABI 1017

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 61 (37 by maintainers)

Most upvoted comments

Update: 🥳

JLC send me their first API draft. It’s not very useful at the moment as it only allows me to fetch teh first 1000 parts from their database but I already replied to them with suggestions for improvements. It seems that we’re on the right track towards a real API integration into this project!

My plan is to implement the API into a seperate python module so that it can be used by other projects as well.

Give me and JLC some time to fully work this out 😊

Update: I was in touch with JLC again and the promised to come up with a solution (public API as far as I can tell) that will allow tools like this to use their parts library directly 🥳

Bt they couldn’t give me a deadline when they finish this. Anyway, nice that the move in this direction 😄

🥳 Partial success!

JLC added the CSV downlaod link to my account (I see it where it was when logged in). That means I can manually download the file and generate the parts.db from it.

I think its not possible to automate this at this point because of recaptcha etc. but I sent a request to them and asked for a way to allow me to download it automated once per day.

Maybe they agree and give me some kind of token based access to the resource. If thats the case I’l build a small web service that fetchs the CSV once per day and builds the parts.sb from it. That way we can leave the plugin in the current state and download the zipped parts.db instead of the CSV.

Unfortunately no. JLC contacted me in late January and said they will get in touch with me regarding their new API but never did that.

Honestly I also totally forgot about that. I’ll write them an email and see what they have for us

This is fixed by the awesome work of @markusdd and the help of @yaqwsx who provides the data source 🥳

I updated it to have KiCAD6 compatibility, I think those changes should probably be cherry picked out separately but having them all in one place seems easier for testing. One problem is that KiCAD 7.0.0 seemed very crash happy while downloading, I reduced the frequency of logging/widget updates and it seems better, there is also version 7.0.1 which may have helped.

OK I finally got around to setting up a job, see https://github.com/DanielO/kicad-jlcpcb-tools/blob/csv-creation/.github/workflows/update_csv.yaml

Note that my repo also has fixes for KiCAD 7 but I haven’t tried working on backwards compatibility yet…

There’s a pull request #245 that addresses this issue. Might be worth testing it out. I think we just have to download the branch (https://github.com/Bouni/kicad-jlcpcb-tools/archive/refs/heads/fallback.zip), unzip it and install the plugin

unzip kicad-jlcpcb-tools-fallback.zip 
cp -a kicad-jlcpcb-tools-fallback ~/.local/share/kicad/6.0/scripting/plugins/

Now uninstall the old plugin and you will see the same icon. Appears to work for me image

@Bouni LCSC (and JLC PCB, I guess) plan a huge internal rework of their systems on Dec 3rd. This might be related. I emailed them a few days ago but without any response. Unfortunately, I don’t keep a copy of the CSV table on my service.