Skip to content

fix python dependency version mismatch and errors during plugin activation #1

Open
MMolineux wants to merge 1 commit intobrian7704:mainfrom
MMolineux:main
Open

fix python dependency version mismatch and errors during plugin activation #1
MMolineux wants to merge 1 commit intobrian7704:mainfrom
MMolineux:main

Conversation

@MMolineux
Copy link

@MMolineux MMolineux commented Oct 28, 2025

Minor fixes to ensure OTS-Plugin-Template works out-of-the-box.

Below issues were encountered when installing on latest master of OpenTakServer 831605e

  1. Python compatability

The latest Python version is 3.14, which is also the maximum version explicitly supported by the meshtastic dependency.
The plugin’s declared Python requirement of >=3.10, <4.0 causes dependency resolution errors, as shown below

poetry lock
Updating dependencies
Resolving dependencies... (6.4s)

The current project's supported Python range (>=3.10,<4.0) is not compatible with some of the required packages Python requirement:
  - meshtastic requires Python <3.14,>=3.9, so it will not be installable for Python >=3.14,<4.0
  - meshtastic requires Python <3.14,>=3.9, so it will not be installable for Python >=3.14,<4.0

  1. Errors during plugin activation

Unexpected keyword

[2025-10-28 22:15:27] - OpenTAKServer[375499] - PluginManager - activate - 84 - ERROR - Failed to load plugin: PluginTemplate.activate() got an unexpected keyword argument 'enabled'
[2025-10-28 22:15:27] - OpenTAKServer[375499] - PluginManager - activate - 85 - ERROR - Traceback (most recent call last):
  File "/home/matt/dev/oss/OpenTakServer/opentakserver/plugins/PluginManager.py", line 77, in activate
    plugin.activate(
TypeError: PluginTemplate.activate() got an unexpected keyword argument 'enabled'

Typo in logger statements

[2025-10-28 22:28:04] - OpenTAKServer[408178] - PluginManager - activate - 84 - ERROR - Failed to load plugin: 'PluginTemplate' object has no attribute '_name'
[2025-10-28 22:28:04] - OpenTAKServer[408178] - PluginManager - activate - 85 - ERROR - Traceback (most recent call last):
  File "/home/matt/.cache/pypoetry/virtualenvs/opentakserver-xIExtH5M-py3.12/lib/python3.12/site-packages/ots_plugin_template/app.py", line 43, in activate
    logger.info(f"Successfully Loaded {self._name}")
                                       ^^^^^^^^^^
AttributeError: 'PluginTemplate' object has no attribute '_name'. Did you mean: 'name'?

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/matt/dev/oss/OpenTakServer/opentakserver/plugins/PluginManager.py", line 77, in activate
    plugin.activate(
  File "/home/matt/.cache/pypoetry/virtualenvs/opentakserver-xIExtH5M-py3.12/lib/python3.12/site-packages/ots_plugin_template/app.py", line 45, in activate
    logger.error(f"Failed to load {self._name}: {e}")
                                   ^^^^^^^^^^
AttributeError: 'PluginTemplate' object has no attribute '_name'. Did you mean: 'name'?

After these changes, the plugin can be built, uploaded via the UI and activated during server start up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant