Skip to content

AppImage crash on startup: UnboundLocalError ffmpeg_path in otsconfig.py #294

Description

@burtvadr

Operating System

Linux

Account Type

Premium

Service

Other

Bug Description

Describe the bug
OnTheSpot crashes immediately on startup when launched via the AppImage.
The application exits with a Python traceback before the GUI loads.

To Reproduce

  1. Download OnTheSpot-x86_64.AppImage
  2. Make it executable
  3. Launch it from a terminal

Expected behavior
OnTheSpot should start normally, or show a clear error message if ffmpeg
is missing or cannot be detected.

Actual behavior
Immediate crash with an UnboundLocalError.

Traceback
(most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/tmp/.mount_OnTheSEidAdc/opt/python3.12/lib/python3.12/site-packages/onthespot/gui.py", line 9, in
from .qt.mainui import MainWindow
File "/tmp/.mount_OnTheSEidAdc/opt/python3.12/lib/python3.12/site-packages/onthespot/qt/mainui.py", line 11, in
from ..accounts import get_account_token, FillAccountPool
File "/tmp/.mount_OnTheSEidAdc/opt/python3.12/lib/python3.12/site-packages/onthespot/accounts.py", line 3, in
from .api.apple_music import apple_music_login_user, apple_music_get_token
File "/tmp/.mount_OnTheSEidAdc/opt/python3.12/lib/python3.12/site-packages/onthespot/api/apple_music.py", line 12, in
from ..otsconfig import config
File "/tmp/.mount_OnTheSEidAdc/opt/python3.12/lib/python3.12/site-packages/onthespot/otsconfig.py", line 399, in
config = Config()
File "/tmp/.mount_OnTheSEidAdc/opt/python3.12/lib/python3.12/site-packages/onthespot/otsconfig.py", line 266, in init
if not ffmpeg_path:
^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'ffmpeg_path' where it is not associated with a value


**Environment**
- OS: Fedora Linux
- AppImage: OnTheSpot-x86_64.AppImage
- Python: bundled Python 3.12 (AppImage)

**Additional context**
It appears `ffmpeg_path` is referenced before being assigned when ffmpeg
is not found, causing an UnboundLocalError instead of a handled failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LinuxbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions