Skip to content

Commit 2e26c7f

Browse files
author
Adam
committed
fix: Replace Unicode symbols with ASCII for Windows CI compatibility (v1.0.2)
Fixes Unicode encoding errors in GitHub Actions Windows runners that use cp1252 encoding which cannot handle Unicode checkmarks and crosses. Changes: - Replaced all ✓ with [OK] in install_ffmpeg.py and build.py - Replaced all ✗ with [ERROR] in install_ffmpeg.py and build.py - Replaced ⚠ with [WARNING] in build.py - Added PYTHONIOENCODING=utf-8 to workflow FFmpeg install step - Bumped version to 1.0.2 - Updated CHANGELOG.md with fix details This ensures the build scripts work correctly on Windows GitHub Actions runners without encoding errors. Fixes the UnicodeEncodeError that was blocking automated releases.
1 parent c610d6e commit 2e26c7f

7 files changed

Lines changed: 32 additions & 22 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
- name: Install FFmpeg
4545
run: |
4646
python install_ffmpeg.py --auto
47+
env:
48+
PYTHONIOENCODING: 'utf-8'
4749
continue-on-error: false
4850

4951
- name: Build executable with PyInstaller

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to TranscribAIr will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.2] - 2025-11-13
9+
10+
### Fixed
11+
- CI/CD workflow: Fixed Unicode encoding errors in Windows GitHub Actions (cp1252 codec)
12+
- Replaced all Unicode checkmarks (✓) and crosses (✗) with ASCII equivalents ([OK], [ERROR])
13+
- Added UTF-8 encoding environment variable to workflow steps
14+
- Build and installation scripts now work correctly on Windows CI runners
15+
816
## [1.0.1] - 2025-11-13
917

1018
### Fixed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# TranscribAIr
22

3-
[![Version](https://img.shields.io/badge/version-1.0.1-blue.svg)](https://github.com/otherworld-dev/TranscribAIr/releases)
3+
[![Version](https://img.shields.io/badge/version-1.0.2-blue.svg)](https://github.com/otherworld-dev/TranscribAIr/releases)
44
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
55
[![Python](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)
66

@@ -36,7 +36,7 @@ A desktop application for audio transcription powered by OpenAI's Whisper model.
3636

3737
**Download the pre-built installer from [GitHub Releases](https://github.com/otherworld-dev/TranscribAIr/releases)**
3838

39-
1. Download `TranscribAIr-1.0.1-Setup.exe`
39+
1. Download `TranscribAIr-1.0.2-Setup.exe`
4040
2. Run the installer
4141
3. Follow the installation wizard
4242
4. Launch TranscribAIr from Start Menu or Desktop shortcut

__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
TranscribAIr version information.
33
"""
44

5-
__version__ = "1.0.1"
5+
__version__ = "1.0.2"
66
__version_info__ = tuple(int(i) for i in __version__.split("."))
77

88
# Application metadata

build.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ def check_requirements():
1515
"""Check if required tools are installed."""
1616
try:
1717
import PyInstaller
18-
print(" PyInstaller found")
18+
print("[OK] PyInstaller found")
1919
except ImportError:
20-
print(" PyInstaller not found")
20+
print("[ERROR] PyInstaller not found")
2121
print(" Install with: pip install pyinstaller")
2222
return False
2323

@@ -46,10 +46,10 @@ def install_ffmpeg():
4646
if installer.install():
4747
return installer.get_ffmpeg_path()
4848
else:
49-
print("\n FFmpeg installation failed!")
49+
print("\n[ERROR] FFmpeg installation failed!")
5050
return None
5151
else:
52-
print("\n Build requires FFmpeg to be installed.")
52+
print("\n[ERROR] Build requires FFmpeg to be installed.")
5353
return None
5454

5555

@@ -100,22 +100,22 @@ def build_executable(ffmpeg_path: str):
100100
exe_size = get_size_mb(exe_path)
101101

102102
print("\n" + "=" * 50)
103-
print(" Build successful!")
103+
print("[OK] Build successful!")
104104
print("=" * 50)
105105
print(f"\nExecutable: {exe_path}")
106106
print(f"Size: {exe_size:.2f} MB")
107107
print("\nOptimizations applied:")
108-
print(" Excluded unused packages")
109-
print(" UPX compression enabled")
110-
print(" Debug symbols stripped")
111-
print(" FFmpeg bundled ({} executables)".format(
108+
print(" [OK] Excluded unused packages")
109+
print(" [OK] UPX compression enabled")
110+
print(" [OK] Debug symbols stripped")
111+
print(" [OK] FFmpeg bundled ({} executables)".format(
112112
len([f for f in (Path(ffmpeg_path).parent if Path(ffmpeg_path).is_file() else Path(ffmpeg_path)).glob('*.exe')])
113113
))
114114
print("\nNote: FFmpeg is bundled in the executable.")
115115
print(" First run will download the selected Whisper model.")
116116
print(" Models are cached in: %USERPROFILE%\\.transcribair\\models")
117117
else:
118-
print("\n Build failed!")
118+
print("\n[ERROR] Build failed!")
119119
return False
120120

121121
return True
@@ -135,7 +135,7 @@ def update_spec_with_ffmpeg(ffmpeg_path: str):
135135
ffmpeg_files.append((str(exe_path), 'ffmpeg'))
136136

137137
if not ffmpeg_files:
138-
print("⚠ Warning: No FFmpeg executables found to bundle")
138+
print("[WARNING] No FFmpeg executables found to bundle")
139139
return
140140

141141
# Read current spec
@@ -153,7 +153,7 @@ def update_spec_with_ffmpeg(ffmpeg_path: str):
153153
with open(spec_file, 'w') as f:
154154
f.write(spec_content)
155155

156-
print(f" Bundling {len(ffmpeg_files)} FFmpeg executables")
156+
print(f"[OK] Bundling {len(ffmpeg_files)} FFmpeg executables")
157157

158158

159159
def main():

install_ffmpeg.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ def is_installed(self) -> bool:
3131
"""Check if FFmpeg is already available."""
3232
# Check in PATH
3333
if shutil.which("ffmpeg"):
34-
print(" FFmpeg already installed in system PATH")
34+
print("[OK] FFmpeg already installed in system PATH")
3535
return True
3636

3737
# Check in our install directory
3838
ffmpeg_exe = self.install_dir / ("ffmpeg.exe" if self.system == "Windows" else "ffmpeg")
3939
if ffmpeg_exe.exists():
40-
print(f" FFmpeg found in {self.install_dir}")
40+
print(f"[OK] FFmpeg found in {self.install_dir}")
4141
self._add_to_path()
4242
return True
4343

@@ -52,7 +52,7 @@ def install(self):
5252
print("-" * 50)
5353

5454
if self.system not in self.FFMPEG_URLS:
55-
print(f" Automatic installation not supported for {self.system}")
55+
print(f"[ERROR] Automatic installation not supported for {self.system}")
5656
print(" Please install FFmpeg manually:")
5757
print(" https://ffmpeg.org/download.html")
5858
return False
@@ -74,15 +74,15 @@ def install(self):
7474

7575
# Verify
7676
if self._verify_installation():
77-
print("\n FFmpeg installed successfully!")
77+
print("\n[OK] FFmpeg installed successfully!")
7878
self._add_to_path()
7979
return True
8080
else:
81-
print("\n FFmpeg installation verification failed")
81+
print("\n[ERROR] FFmpeg installation verification failed")
8282
return False
8383

8484
except Exception as e:
85-
print(f"\n Installation failed: {str(e)}")
85+
print(f"\n[ERROR] Installation failed: {str(e)}")
8686
return False
8787

8888
def _download_with_progress(self, url: str, output_path: Path):

installer.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
; The installer will be created in the Output directory
1010

1111
#define MyAppName "TranscribAIr"
12-
#define MyAppVersion "1.0.1"
12+
#define MyAppVersion "1.0.2"
1313
#define MyAppPublisher "Swansea University"
1414
#define MyAppURL "https://github.com/otherworld-dev/TranscribAIr"
1515
#define MyAppExeName "Transcribair.exe"

0 commit comments

Comments
 (0)