Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

Nevermind, I was able to open IDLE and solve an issue with `import pygame` but it's saying that when `from pygame import mixer` it's showing invalid location.


Error Message

ImportError: cannot import name 'mixer' from 'pygame' (unknown location)

There is no mixer.py file in the pygame folder, I checked. What should I do? My friend who knows python admirably well doesn't know either.

(5 edits)

The mixer controls the audio  and comes with Pygame, so it is not a script I created. What operation system are you using? I found another user with the same issue on Stackoverflow, who apparently uses some Linux OS.

Did you change anything in the code? According to this Reddit thread, Pygame has to be initialised before it can use mixer. It is initialised in MAIN.py

To test whether the mixer is correctly installed, try opening IDLE console and type the following:

(from pygame import mixer (ENTER) mixer.init() (ENTER) and you should see this:

>>> from pygame import mixer
pygame 2.0.1 (SDL 2.0.14, Python 3.7.4)
Hello from the pygame community. <a href="https://www.pygame.org/contribute.html
>>>">https://www.pygame.org/contribute.html
>>></a> mixer.init()
>>>

If this causes an error, you may have had an error in the Pygame installation. I hope it can be used :-)

(+1)

I am using Windows 10 on a school computer that blocks everything, so I had it installed on a flash drive. I'm probably going to wait until about June/July to pick this up again, as that is the time I'm hoping to have enough money to buy a really nice laptop. When I do, I'll work on this again. Progress on the Wiki will also be slow, not stopped, as I have to use Tor to open itch.io and fandom.com. I really love DUGA but it's the hardware that I have at the moment drawing away from it.

Have you considered buying a Raspberry Pi? It may not be powerful enough to run DUGA with high frame rate, but it is capable of running Pygame and is $35 (without accessories). 

If you cannot afford it, I can contribute with an amount. I'd love to see what you can do with DUGA.

(1 edit)

No, but I know I'm gonna get that laptop. I'm a minor so I don't have to care about "Taxes" or "Providing for a Family" or whatever you old people do. I don't need financial support. I'm just gonna wait it out, and screw around with changing textures and sounds to the point beyond recognition.

Also, as I was screwing around, I decided to see what would happen if I swapped the file names of customSegments and standardSegments. I love the names of these rooms just sitting there for snoops like me.

Some of my favorites:

Wood Dead End OF DEATH

Wood Dead End OF PLANTS

Some Stone End

I'm Running out of Creative Names

It is simply a masterclass in naming segments.

wait holy crap the pi 4 is more powerful than my school computer

Yep, powerful little machine.