TousstNicolas / JLC2KiCad_lib

JLC2KICAD_lib is a python script that generate a component library (schematic, footprint and 3D model ) for KiCad from the JLCPCB/easyEDA library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exception raised

occoder opened this issue · comments

After running JLC2KiCadLib C238131 --model_path_relative, got following exception

2022-04-09 22:02:46,085 - INFO - creating library for component C238131
2022-04-09 22:02:48,175 - INFO - creating footprint ...
Traceback (most recent call last):
  File "c:\program files\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\program files\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\www\AppData\Roaming\Python\Python38\Scripts\JLC2KiCadLib.exe\__main__.py", line 7, in <module>
  File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\JLC2KiCadLib.py", line 128, in main
    add_component(component, args)
  File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\JLC2KiCadLib.py", line 26, in add_component
    footprint_name, datasheet_link = create_footprint(
  File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\footprint\footprint.py", line 27, in create_footprint
    footprint_name, datasheet_link, assembly_process = get_footprint_info(component_id)
  File "C:\Users\www\AppData\Roaming\Python\Python38\site-packages\JLC2KiCadLib\footprint\footprint.py", line 136, in get_footprint_info
    response["data"]["componentPageInfo"]["list"][0]["componentModelEn"]
IndexError: list index out of range

Thank you for reporting this issue.
This is duplicate with #9.
I just uploaded a patch for this, you can update the package with pip install JLC2KiCadLib --upgrade.
If you still have related issues, please report them on issue #9.

I close this issue as it is duplicate.