sloukit / pydew-valley-uzh

Mod of Pydew Valley for an experimental study in Psychology
Creative Commons Zero v1.0 Universal
32 stars 61 forks source link

Bug: error when running main.py #171

Open AsserHalim opened 2 months ago

AsserHalim commented 2 months ago

Describe the bug

Bug Description

The error (pygame.error: mixer not initialized) appears when running the main file.

Expected Behavior

It is expected to run the code without errors.

Version

0.1.0

Which aspect(s) of the project is this bug affecting?

area: dependencies, game-playtesting

Screenshots

Screenshot 2024-09-29 213535

Relevant log output

pygame-ce 2.5.0 (SDL 2.30.3, Python 3.12.4)
Traceback (most recent call last):
  File "C:\Users\Asser Halim\pydew-valley-uzh\main.py", line 246, in <module>
    game = Game()
           ^^^^^^
  File "C:\Users\Asser Halim\pydew-valley-uzh\main.py", line 76, in __init__
    self.load_assets()
  File "C:\Users\Asser Halim\pydew-valley-uzh\main.py", line 175, in load_assets
    self.sounds = support.sound_importer("audio", default_volume=0.25)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Asser Halim\pydew-valley-uzh\src\support.py", line 119, in sound_importer
    value = pygame.mixer.Sound(os.path.join(*snd_path, sound_name))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pygame.error: mixer not initialized

Process finished with exit code 1

Code of Conduct

DangerousVanilla commented 1 month ago

Are you receiving this error on an unmodified fetch of the main branch? mixer is normally initialized automatically by pygame.init() which is called first thing in the Game class initialization. I haven't been able to recreate this error on a fresh instance of the main branch.

AsserHalim commented 1 month ago

Are you receiving this error on an unmodified fetch of the main branch? mixer is normally initialized automatically by pygame.init() which is called first thing in the Game class initialization. I haven't been able to recreate this error on a fresh instance of the main branch.

I am getting it in the main from the main project repo on github.