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.

`generate_pcb()` causes `AttributeError: 'NoneType' object has no attribute 'SetParent'`

See original GitHub issue

Describe the bug Calling generate_pcb() results in:

/builddir/build/BUILD/kicad-6.0.6/pcbnew/action_plugin.cpp(163): assert "PgmOrNull()" failed in register_action().
Traceback (most recent call last):
  File "/home/shanemattner/Desktop/esp32/skidl_esp32_example/skidl_esp32_example.py", line 105, in <module>
    generate_pcb()
  File "/home/shanemattner/.local/lib/python3.10/site-packages/skidl/circuit.py", line 562, in generate_pcb
    gen_func(file_)  # Generate the PCB file from the netlist.
  File "/home/shanemattner/.local/lib/python3.10/site-packages/skidl/tools/kicad/kicad.py", line 1004, in gen_pcb
    kinet2pcb.kinet2pcb(self, file_)
  File "/home/shanemattner/.local/lib/python3.10/site-packages/kinet2pcb/kinet2pcb.py", line 161, in kinet2pcb
    fp.SetParent(brd)
AttributeError: 'NoneType' object has no attribute 'SetParent'

To Reproduce Steps to reproduce the behavior:

  1. Download skidl_esp32_example.txt
  2. Rename it .py
  3. Run file

Expected behavior kicad_pcb file should be generated

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • Fedora 36
  • Python 3.10.5
  • SKiDL version 1.1.0
  • KiCAD 6

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
devbismecommented, Aug 2, 2022

To make things like using the DigiKey footprints easier, I added an fp_libs option to generate_pcb() so you can pass a list of footprint directories. For example, I put my DigiKey footprints in the directory ~/tmp/digikey-footprints.pretty so I modified the generate_pcb() call to:

generate_pcb(fp_libs=["~/tmp/digikey-footprints.pretty"])

You’ll need to install the development branch of skidl and the master branch of kinet2pcb to use this feature.

0reactions
QGBcommented, Nov 4, 2022

kinet2pcb module is missing. Can’t generate a KiCad PCB withou

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attribute Error:'NoneType' object has no attribute 'parent'
The above code works fine but not the one below.It gives an attribute error as stated above. Can anyone tell me the reason?...
Read more >
AttributeError: 'NoneType' object has no attribute 'setParent'
AttributeError : 'NoneType' object has no attribute 'setParent' Steps to reproduce the behavior: Go to My Channel --> TORRENTS --> Click on ...
Read more >
Why do I get AttributeError: 'NoneType' object has no attribute ...
1 Answer. You are getting AttributeError: 'NoneType' object has no attribute 'something' because NoneType means that instead of an instance of whatever Class ......
Read more >
AttributeError: 'NoneType' object has no attribute 'parents'
Thread.run(self) AttributeError: 'NoneType' object has no attribute 'parents' Additional info: addons: com_redhat_kdump cmdline: ...
Read more >
'NoneType' object has no attribute '_inc_path' - Google Groups
Basically I am getting this error. AttributeError at /admin/pages/new/wagtail_articles/articleindex/3/ 'NoneType' object has no attribute '_inc_path'
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