pcbnew Action Plugins not reloaded on "Refresh Plugin"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Released
|
Low
|
Ian McInerney |
Bug Description
Action Plugins are not refreshed after hitting "Refresh Plugin". Restarting pcbnew does not reload the plugins, only a complete KiCad restart reloads the plugins.
Removing __pycache__ or .pyc files from the plugin folder does not help when trying to refresh the plugins.
The plugin I'm trying to refresh is in ~/.kicad_plugins
When an exception is thrown in the script, the line number where the exception occurs is the cached version but the line content is the new content. This was very confusing at first ;)
Here's my version infos :
Application: kicad
Version: 6.0.0-unknown-
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-49-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,
Boost: 1.65.1
OpenCASCADE Community Edition: 6.9.1
Curl: 7.58.0
Compiler: GCC 7.4.0 with C++ ABI 1011
Build settings:
USE_
USE_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
KICAD_
BUILD_
KICAD_
KICAD_
KICAD_SPICE=ON
EDITED: added more info concerning the location of the plugin I'm trying to refresh
tags: | added: pcbnew python ui |
description: | updated |
Changed in kicad: | |
status: | New → Triaged |
importance: | Undecided → Low |
milestone: | none → 5.1.3 |
Changed in kicad: | |
status: | Fix Committed → Fix Released |
Steps to reproduce :
- Close all instances of KiCad 5.py` with the following content :
- In `~/.kicad_plugins`, create the file `test_bug182859
```
# test_bug1828595.py
import pcbnew
class SimplePlugin( pcbnew. ActionPlugin) :
self.descripti on = "Reproducing bug #1828595"
self.category = "Testing"
def defaults(self):
self.name = "Reproduce bug #1828595"
def Run(self):
print( self.name)
# The entry function of the plugin that is executed on user action
SimplePlugin( ).register( ) # Instantiate and register to Pcbnew
``` 5.py` by changing the value of self.name : 5.py`
- Run KiCad with the command line
- Start pcbnew
- In "Tools > External Plugins..." click "Reproduce bug #1828595"
- The string "Reproduce bug #1828595" appears in the command line
- Modify `test_bug182859
```
self.name = "AAAAAAAA"
```
- Save `test_bug182859
- In "Tools > External Plugins..." click "Refresh Plugins"
- In "Tools > External Plugins..." the name of the plugin is still "Reproduce bug #1828595", should be "AAAAAAAA"
- In "Tools > External Plugins..." click "Reproduce bug #1828595"
- The string "Reproduce bug #1828595" appears in the command line, should be "AAAAAAAA"