From aa963519e9a7c29d693b17e4b15c81e6790dbd6c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 21:55:30 +0000 Subject: [PATCH] Fix str(e) in error responses, remove location modal, document GTK dependency Co-authored-by: mitchross <6330506+mitchross@users.noreply.github.com> --- Dockerfile | 8 ++ routes/weather_sat.py | 9 ++- templates/index.html | 166 ------------------------------------------ 3 files changed, 14 insertions(+), 169 deletions(-) diff --git a/Dockerfile b/Dockerfile index 41b0f7e..afd8894 100644 --- a/Dockerfile +++ b/Dockerfile @@ -70,6 +70,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ libncurses-dev \ libsndfile1-dev \ + # GTK is required for slowrx (SSTV decoder GUI dependency). + # Note: slowrx is kept for backwards compatibility, but the pure Python + # SSTV decoder in utils/sstv/ is now the primary implementation. + # GTK can be removed if slowrx is deprecated in future releases. libgtk-3-dev \ libasound2-dev \ libsoapysdr-dev \ @@ -195,6 +199,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && ldconfig \ && rm -rf /tmp/dsd-fme \ # Cleanup build tools to reduce image size + # Note: libgtk-3-dev is removed here but runtime GTK libs (from first stage) + # remain for slowrx. This adds ~10MB to the image but is required for slowrx + # to function. Consider removing slowrx build entirely if moving fully to + # the pure Python SSTV decoder. && apt-get remove -y \ build-essential \ git \ diff --git a/routes/weather_sat.py b/routes/weather_sat.py index 0caa5ad..f7ae788 100644 --- a/routes/weather_sat.py +++ b/routes/weather_sat.py @@ -120,9 +120,10 @@ def start_capture(): device_index = validate_device_index(data.get('device', 0)) gain = validate_gain(data.get('gain', 40.0)) except ValueError as e: + logger.warning('Invalid parameter in start_capture: %s', e) return jsonify({ 'status': 'error', - 'message': str(e) + 'message': 'Invalid parameter value' }), 400 bias_t = bool(data.get('bias_t', False)) @@ -464,7 +465,8 @@ def get_passes(): lat = validate_latitude(raw_lat) lon = validate_longitude(raw_lon) except ValueError as e: - return jsonify({'status': 'error', 'message': str(e)}), 400 + logger.warning('Invalid coordinates in get_passes: %s', e) + return jsonify({'status': 'error', 'message': 'Invalid coordinates'}), 400 hours = max(1, min(request.args.get('hours', 24, type=int), 72)) min_elevation = max(0, min(request.args.get('min_elevation', 15, type=float), 90)) @@ -555,9 +557,10 @@ def enable_schedule(): device = validate_device_index(data.get('device', 0)) gain_val = validate_gain(data.get('gain', 40.0)) except ValueError as e: + logger.warning('Invalid parameter in enable_schedule: %s', e) return jsonify({ 'status': 'error', - 'message': str(e) + 'message': 'Invalid parameter value' }), 400 scheduler = get_weather_sat_scheduler() diff --git a/templates/index.html b/templates/index.html index 8c6361d..dfeccee 100644 --- a/templates/index.html +++ b/templates/index.html @@ -15270,172 +15270,6 @@ {% include 'partials/settings-modal.html' %} - -
- -