# Adding Python Plugin to bench settings failed

**URL:** <https://forum.opentap.io/t/adding-python-plugin-to-bench-settings-failed/929>\
**Category:** Ecosystem\
**Created:** [November 15, 2022, 2:06pm UTC](https://forum.opentap.io/t/adding-python-plugin-to-bench-settings-failed/929 "2022-11-15T14:06:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![e.huijben](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@e.huijben](https://forum.opentap.io/u/e.huijben)\
**Post date:** [November 15, 2022, 2:06pm UTC](https://forum.opentap.io/t/adding-python-plugin-to-bench-settings-failed/929/1 "2022-11-15T14:06:21Z")

</div>

Hi,  
I have an issue with adding a custom plugin package based on Python code:  
When I just build my code with tap “python build --build-package” it works fine. I can successfully directly add my new created instrument with the + sign in the bench settings.  
However, when I install the generated TapPackage and add an instrument in the same way the instrument is not added. I get next message:

11:55:55.631 Wrapper bij Python.Runtime.PyObject.GetAttr(String name) bij Keysight.Plugins.Python.PythonModule.CreateInstance(String typename, IPythonWrapper wrapper) bij Keysight.Plugins.Python.PythonWrapperExtensions.\<\>c\_\_DisplayClass6\_0.b\_\_0() 11:55:55.631 Settings Error during the creation of ‘Python.DPM8600.Dpm8600Connection’

Does anyone has a hint about what might be wrong? It seems that also only the DLL file is put in the /package/python/DPM8600 folder. I was expecting also the .py files

I’am making use of Python 3.8 in combination with Opentap 9.19.0

Thanks in advance,

Evert Huijben

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [November 15, 2022, 5:44pm UTC](https://forum.opentap.io/t/adding-python-plugin-to-bench-settings-failed/929/2 "2022-11-15T17:44:16Z")

</div>

@e.huijben someone can probably help you get this working with the Python Plugin 2.x version, but I’d recommend upgrading to the 3.0.0-rc3 version as it eliminates the steps you are having issues with:  
[https://packages.opentap.io/index.html#/?name=%2Fpublic%2FPython&version=3.0.0-rc.3%2Bdebab897&os=Windows,Linux,MacOS&architecture=AnyCPU](https://packages.opentap.io/index.html#/?name=%2Fpublic%2FPython&version=3.0.0-rc.3%2Bdebab897&os=Windows,Linux,MacOS&architecture=AnyCPU)

You can find help, including a migration guide, here:

> **[Welcome to the OpenTAP Python Plugin | OpenTAP Python Integration](https://doc.opentap.io/OpenTap.Python/)**
>
> Python Integration for OpenTAP

---

<div class="post-metadata">

**Author:** ![e.huijben](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@e.huijben](https://forum.opentap.io/u/e.huijben)\
**Post date:** [November 16, 2022, 8:42am UTC](https://forum.opentap.io/t/adding-python-plugin-to-bench-settings-failed/929/3 "2022-11-16T08:42:03Z")

</div>

Hi,  
As I understand, the 3.0.0 version is not compatible with 2.4.0  
Since I have multiple plugin based on 2.40 I like to stick to this version for the moment.  
Also I’am using existing python plugins like PSLab which rely on 2.4.0  
But it seems that 3.0.0 has a lot of improvements, so I will plan upgrading the plugins in the future.  
If someone has any idea to fix this issue for the 2.4.0 python version, please let me know.  
Regards Evert

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [November 16, 2022, 2:37pm UTC](https://forum.opentap.io/t/adding-python-plugin-to-bench-settings-failed/929/4 "2022-11-16T14:37:32Z")

</div>

You are right, 2.x is not compatible with plugins created with 3.y, so you’d have to migrate all your plugins. It should be relatively straight forward.

Anyway, staying with 2.4, I don’t know what is going wrong here. There is no other log messages hinting at the issue? Sometimes those are hidden in the ‘debug’ messages.

Do you have other instrument plugins which works?

---

<div class="post-metadata">

**Author:** ![e.huijben](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@e.huijben](https://forum.opentap.io/u/e.huijben)\
**Post date:** [November 17, 2022, 3:28pm UTC](https://forum.opentap.io/t/adding-python-plugin-to-bench-settings-failed/929/5 "2022-11-17T15:28:27Z")

</div>

Hi,

The debug logging is not giving more logging then already mentioned.  
It seems that in the packages\python\DPM8600 directory, only the DLL is placed by the package manager, while a correcly installed package also is putting all .py files like connection.py and instrument.py into this directory.  
I will further invest what is going wrong. I don’t have any issues with other python instruments.

Evert
