AresValley / Artemis

Radio Signals Recognition Manual
https://aresvalley.github.io/Artemis/
GNU General Public License v3.0
338 stars 36 forks source link

Crash when trying to play audio #28

Closed MightyPork closed 1 year ago

MightyPork commented 2 years ago

artemis3 installed from AUR on arch linux. Artemis crashes when I click play in the audio widget in the right sidebar.

pygame 2.1.0 (SDL 2.0.18, Python 3.10.1)
Hello from the pygame community. https://www.pygame.org/contribute.html
22/12/2021 11:28:11 AM::ERROR::updatescontroller::_check_updater_version::Unable to query the updater
Traceback (most recent call last):
  File "audio_player.py", line 146, in _play_audio
    self._set_max_progress_bar()
  File "audio_player.py", line 122, in _set_max_progress_bar
    self._audio_progress.setMaximum(
TypeError: setMaximum(self, int): argument 1 has unexpected type 'float'
/usr/bin/artemis3: line 4:  3456 Aborted                 (core dumped) /opt/artemis3/Artemis "$@"
MightyPork commented 2 years ago

easy fix, cast to int

    def _set_max_progress_bar(self):
        """Set the maximum value of the progress bar."""
        self._audio_progress.setMaximum(
            int(mixer.Sound(self._audio_file).get_length() * 1000)
        )
cmp0x5 commented 1 year ago

happens on Manjaro as well, same fix worked

AresValley commented 1 year ago

Fixed in #34