ExpressLRS / ExpressLRS/ExpressLRS-Configurator

Python version 3.8.4. not supporting tuple [str, bool] -- cannot flash nomad gemini module

Open Beginner friendly
#804 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
849
Forks
179
Avg merge
1h 34m
Merged PRs (30d)
1

Description

trying to flash nomad gemini to 4.1.0 via UART

Device Category: Radiomaster Dual Band
Device: RadioMaster Nomad 2.4/900 TX
915 Mhz FCC

## Expected Behavior

should have been flashed
## Current Behavior
Build error

here is the log
Traceback (most recent call last):
File "/Applications/ExpressLRS Configurator.app/Contents/dependencies/darwin_amd64/python-portable-darwin-3.8.4/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Applications/ExpressLRS Configurator.app/Contents/dependencies/darwin_amd64/python-portable-darwin-3.8.4/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/en/Library/Application Support/ExpressLRS Configurator/firmwares/cloud/ExpressLRS/a9d4a9cb5b5687c4c9d7e9e7fbdf44ad93651da6/firmware/flasher.pyz/__main__.py", line 3, in
if __name__ == '__main__':
File "/Users/en/Library/Application Support/ExpressLRS Configurator/firmwares/cloud/ExpressLRS/a9d4a9cb5b5687c4c9d7e9e7fbdf44ad93651da6/firmware/flasher.pyz/_bootstrap/__init__.py", line 253, in bootstrap
File "/Users/en/Library/Application Support/ExpressLRS Configurator/firmwares/cloud/ExpressLRS/a9d4a9cb5b5687c4c9d7e9e7fbdf44ad93651da6/firmware/flasher.pyz/_bootstrap/__init__.py", line 59, in import_string
File "/Applications/ExpressLRS Configurator.app/Contents/dependencies/darwin_amd64/python-portable-darwin-3.8.4/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/en/.shiv/flasher.pyz_d289b3fbd96b762ba364f47db17212d7491573c27465aab9fbfbdf393d24c3e0/site-packages/binary_configurator.py", line 15, in
import UnifiedConfiguration
File "/Users/en/.shiv/flasher.pyz_d289b3fbd96b762ba364f47db17212d7491573c27465aab9fbfbdf393d24c3e0/site-packages/UnifiedConfiguration.py", line 81, in
def getDefaultProductForTarget(target_name: str) -> tuple[str, bool]:
TypeError: 'type' object is not subscriptable
## Steps to Reproduce

1.

2.

3.

4.

## Possible Solution (Not obligatory)
The Problem
The error occurs at line 81 of UnifiedConfiguration.py:

python

def getDefaultProductForTarget(target_name: str) -> tuple[str, bool]:
The issue is that the code is using tuple[str, bool] as a type hint, but the Python version being used (Python 3.8.4) doesn't support this syntax. In Python 3.8 and earlier, you must use Tuple from the typing module instead.

How to Fix It
The code should be:

python

from typing import Tuple

def getDefaultProductForTarget(target_name: str) -> Tuple[str, bool]:
# function body

## Context

## Your Environment

- Operating System and version:
- TX hardware:
- RX hardware:

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at line 81 of UnifiedConfiguration.py and inspect how the bundled Python 3.8.4 runtime loads that annotation. Reproduce the failure by launching the flasher for the Nomad Gemini target, then verify that the flasher starts without the TypeError and can proceed with flashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
84/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.