[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Directory Problem?



In fact, that same traceback hints at a bigger problem.

Traceback (most recent call last):
  File "C:\Code\06 Fall\Other\Seagame C\main.py", line 355, in ?
    Conch.j.LoadSound("18403_inferno_xplosm.wav","cannon")
  File "C:\Code\06 Fall\Shining Sea\Conch\conch.py", line 151, in LoadSound
    new_sound = pygame.mixer.Sound( os.path.join(SOUND_DIRECTORY,filename) )
error: Unknown WAVE data format: 0x4x

It looks like Conch (conch.py) is being loaded from a completely different directory than I want it to! My directory structure includes this:


C:\Code
    \06 Fall
      \Other
        \Seagame C
          \Conch (conch.py is in here)
        My program, the one I'm running
      \Shining Sea
        \Conch (another copy is in here)

So apparently, even though I'm running a program in "Seagame C", which says "import Conch", Python is loading a completely different copy of Conch from another directory! What gives?

Kris