473,326 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

pygame.mixer.load not working

import pygame

pygame.mixer.music.load(example1.mp3)
pygame.mixer.music.play(loops=1, start=0.0)
Traceback (most recent call last):
File "C:\Python25\myPrograms\pygameProgs\musicexp.p y", line 3, in
<module>
pygame.mixer.music.load(example1.mp3)
NameError: name 'example1' is not defined

example1 is in the same directory as the script
Jun 27 '08 #1
1 2319
globalrev schrieb:
import pygame

pygame.mixer.music.load(example1.mp3)
pygame.mixer.music.play(loops=1, start=0.0)
Traceback (most recent call last):
File "C:\Python25\myPrograms\pygameProgs\musicexp.p y", line 3, in
<module>
pygame.mixer.music.load(example1.mp3)
NameError: name 'example1' is not defined

example1 is in the same directory as the script
http://docs.python.org/tut/node5.htm...00000000000000

Diez
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AnsNum | last post by:
hello, when I start this program, the movie doesn't play smoothly, anybody has an idea ? (I use windowsXP) import pygame from pygame.display import flip from pygame.locals import * ...
1
by: JDR | last post by:
Would anyone happen to know of a way to strip out the joystick module of Pygame? I've written a console based application that doesn't need X, mixer, fonts, etc. and I can't get my application to...
12
by: Marian Aldenhövel | last post by:
Hi, I am trying to make pygame play music on windows. This simple program: import pygame,time pygame.init() print "Mixer settings", pygame.mixer.get_init() print "Mixer channels",...
1
by: maxime | last post by:
Hi, I try to develop a game in python and pygame. In my game I play a music (.mid with pygame.mixer.music) but sometime I need to accelerate it but I don't see how to do that with pygame. Is it...
10
by: exodus | last post by:
As a fun little task to gain more knowledge of python, i decided to try to mimick the ipod UI with it. here's what i've got so far #!/usr/bin/env python # -*- coding: utf-8 -*- # generated by...
2
by: Woot4Moo | last post by:
Hey guys I am running Windows XP and am having an issue with a game that my team has created. Whenever an audio file is played it creates a very distorted, crackly sound. Any ideas what could be...
1
by: zswartz | last post by:
Hi All, I've been stuck here for some time now and can't figure this out. If ANYONE can assist me, that would be AMAZING!! I have Windows XP, with Python 25 and Pygame for python 25. I am also...
3
by: globalrev | last post by:
im doing this : http://www.learningpython.com/2006/03/12/creating-a-game-in-python-using-pygame-part-one/ and when closing the program the window stays up and doesnt respond. i tried adding...
11
by: globalrev | last post by:
http://www.pygame.org/docs/ref/mixer.html import pygame #pygame.mixer.init(frequency=22050, size=-16, channels=2, buffer=3072) //it complained abiout words= so i guess its only the nbrs...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.