help urgently, problem with panda running on my laptop

Hi i am new and i am currently facing a problem and i need a solution ASAP. Because i am rushing a project tomorrow. the problem is this. whenever i run panda, this error will occur and i tried to create a new file with only import directstart and the error will be something like it cannot find showbase.
Anyways here is my codes. feel free to take a look. I am a student using panda for school projects so if theres anything wrong with my code, please feel free to correct me. Thanks. My workstation is on windows 7 x64.
I have checked with people on the irc, they told me to check my sys path in system variable and i have checked. i have even uninstalled 5 times and reinstalled. I am now installed with panda nightly. i have tried using 1.7.0, 1.6.2. and 1.7.1 nightly today’s build. Thanks people if anybody can help me. Pardon me for the messy post because i am currently in a rush to fix the panda problem.

### Game prototype

import direct.directbase.DirectStart
from pandac.PandaModules import *
### from direct.task import Task
import sys

class game(object):
	speed = 120
	stop = Vec3(0)
	rotateUp = Vec3(0,0,1)
	rotateDown = Vec3(0,0,-1)
	rotateLeft = Vec3(-0.5,0,0)
	rotateRight = Vec3(0.5,0,0)
	rotateP = stop
	rotateH = stop
	### rotateP = Vec3(0,1,0)
	### rotateH = Vec3(0,0,0)
	moveX = stop
	moveZ = stop
	moveUp = Vec3(0,1,0)
	moveDown = Vec3(0,-1,0)
	moveLeft = Vec3(-1,0,0)
	moveRight = Vec3(1,0,0)
	moveUD = stop ### Up/Down
	moveLR = stop ### Left/Right
	### Initialization codes here
	def __init__(self):

	def loadKeyboard(self):
		### This is to exit with the escape key
		base.accept("escape", sys.exit)

		### Class must include object if not self.__setattr__ fails
		base.accept("w", self.__setattr__,["rotateP", self.rotateUp])
		base.accept("a", self.__setattr__,["rotateH", self.rotateLeft])
		base.accept("s", self.__setattr__,["rotateP", self.rotateDown])
		base.accept("d", self.__setattr__,["rotateH", self.rotateRight])
		base.accept("w-up", self.__setattr__,["rotateP", self.stop])
		base.accept("a-up", self.__setattr__,["rotateH", self.stop])
		base.accept("s-up", self.__setattr__,["rotateP", self.stop])
		base.accept("d-up", self.__setattr__,["rotateH", self.stop])
		base.accept("arrow_up", self.__setattr__,["moveZ", self.moveUp])
		base.accept("arrow_down", self.__setattr__,["moveX", self.moveDown])
		base.accept("arrow_left", self.__setattr__,["moveZ", self.moveLeft])
		base.accept("arrow_right", self.__setattr__,["moveX", self.moveRight])
		base.accept("arrow_up-up", self.__setattr__,["moveZ", self.stop])
		base.accept("arrow_down-up", self.__setattr__,["moveX", self.stop])
		base.accept("arrow_left-up", self.__setattr__,["moveZ", self.stop])
		base.accept("arrow_right-up", self.__setattr__,["moveX", self.stop])
	def loadFloor(self):
		### Load the floor model
		### Note: here i use a .bam model because bam load faster
		floor = loader.loadModel('3D Level Design.bam')
		floorTile = [None for i in range(25)]
		### Make the floor tile like a checkerboard
		### But first set some variables first
		startX = -10
		startY = 35
		startZ = 11
		for i in range(25): ### here the model i scale it to 25
			if i % 5 == 0:
					### 5 per row according to model's scale which is 25
					startX = -10
					startY += 5
			if i % 2 == 1:
				### Tile i is white(Whatever color you want)
				floorTile[i] = loader.loadModel("floortile.bam")
				startX += 5
			elif i % 2 == 0:
				floorTile[i] = loader.loadModel("floortile 2.bam")
				startX += 5

	def loadNPC(self):
		npc = loader.loadModel('npc.bam')

	def loadGui(self):

	def loadCamera(self):
		### Set camera lens and the field of view
		### Set up the camera
		lens =
		lens.setFov(60)### 70 = NodePath("camera"),-1,20)
		### base.disableMouse()
	def loadCollision(self):
	def showLinePosition(self):
		### Not needed in game but print blocks of models for visual representation
		lineX = [None for i in range(30)]
		lineY = [None for i in range(30)]
		lineZ = [None for i in range(30)]
		startX = 0
		startY = 0
		startZ = 0
		distance = 30
		for i in range(30):
			if i % 2 == 1:
				startX = startX + distance
				startY = startY + distance
				startZ = startZ + distance
				lineX[i] = loader.loadModel("floortile.bam")
				lineY[i] = loader.loadModel("floortile.bam")
				lineZ[i] = loader.loadModel("floortile.bam")
	### Realtime Codes here
	def runGameLoop(self):
		### When DirectStart is called, i found out that
		### task is being called therefore run() can be called
		### run() is a task run by the global task manager
		### So taskMgr can be called with the base command
		base.taskMgr.add(self.runNPCMovement, "runNPCMovement")
		base.taskMgr.add(self.runTimer, "runTimer")
		base.taskMgr.add(self.runPickupItems, "runPickupItems")
		base.taskMgr.add(self.runChecks, "runChecks")
		base.taskMgr.add(self.runCamera, "runCamera")

	def runNPCMovement(self, task):
		### Let NPC walks
		return task.cont

	def runTimer(self, task):
		### Run in game timer because each level have its own time
		return task.cont
	def runPickupItems(self, task):
		### Check if mouse pick up anything
		return task.cont

	def runChecks(self, task):
		### Checks if everything is fine and if game is finish
		return task.cont

	def runCamera(self, task):
		### In the following setHpr, we provide 2 arguments
		### the first one is is to tell which item is it for
		### the second one is a Vec3 threfore hold 3 values
		###, self.rotateP * globalClock.getDt()* self.speed), self.rotateH * globalClock.getDt() * self.speed), self.rotateP * globalClock.getDt()* self.speed), self.rotateH * globalClock.getDt() * self.speed), self.moveX * globalClock.getDt() * self.speed), self.moveZ * globalClock.getDt() * self.speed)
		return task.cont



C:\Users\Pigs Can Fly\Desktop\EYE\Game>run
C:\Users\Pigs Can Fly\Desktop\EYE\Game>python
DirectStart: Starting the game.
Traceback (most recent call last):
  File "", line 5, in <module>
    import direct.directbase.DirectStart
  File "C:\Panda3D-1.7.1\direct\directbase\", line 3, in <module>
    from direct.showbase import ShowBase
  File "C:\Panda3D-1.7.1\direct\showbase\", line 10, in <module>
    from pandac.PandaModules import *
  File "C:\Panda3D-1.7.1\pandac\", line 26, in <module>
    from libp3directModules import *
  File "C:\Panda3D-1.7.1\pandac\", line 15, in <module>
    from direct.directnotify.DirectNotifyGlobal import directNotify
  File "C:\Panda3D-1.7.1\direct\directnotify\", line 3, in
    import DirectNotify
  File "C:\Panda3D-1.7.1\direct\directnotify\", line 5, in <modul
    import Notifier
  File "C:\Panda3D-1.7.1\direct\directnotify\", line 6, in <module>
    from direct.showbase import PythonUtil
  File "C:\Panda3D-1.7.1\direct\showbase\", line 48, in <module>
    import new
  File "C:\Users\Pigs Can Fly\Desktop\EYE\Game\", line 3, in <module>
    from direct.task import Task
  File "C:\Panda3D-1.7.1\direct\task\", line 10, in <module>
    from direct.showbase import ExceptionVarDump
  File "C:\Panda3D-1.7.1\direct\showbase\", line 1, in <modul
    from pandac.PandaModules import getConfigShowbase
ImportError: cannot import name getConfigShowbase

C:\Users\Pigs Can Fly\Desktop\EYE\Game>

If Anyone have a clue as to what happen, you can feel free to email me as well @ or gimme a pm. Thanks.

Sorry to hear that you’re rushed. It’s too bad that you didn’t get a chance to make sure you had Panda properly installed before you committed to your tight timeframe.

Are you sure you’re running the correct version of python, the one that ships with Panda, and not some other version of python that you might have installed? Have you tried running ppython instead of python?


I am sure. i am running python from panda. Okay now i have a new discovery. Apparently my files can be run only on desktops and the sample files seem unaffected. I think it may be conflicting with something but i have no idea. i didn’t install any new program prior to getting this error. but for the time being , i will have to put my resources on my desktop to run.

Okay. finally. i think i got what happened. Apparently i made a very fatal mistake. Sorry i really have no idea this would have happen. But apparently my directory have a file called and then it run the i have no idea why. I removed the file and my main file was able to run. Now the question is. Why does python read my file. I have a file and everytime in the cmd i type python/ppython, a new.pyc was created. this shows the was imported somehow. is this a python thing? The contains the snippet i had copied earlier. So thanks for helping me.

Ah, “new” is also the name of a standard module in the Python library. There is a bit of code in Panda to import the standard “new” module at Panda startup. But if you create your own module called “new”, it ends up first on the path list, and it gets imported instead; and if that module is itself invoking Panda, it ends up with a cyclical reference, which causes the problem you reported.

So, it’s just one of those things. Namespace collisions are a classic problem in software development in general, and in Python in particular. You can’t be expected to know the names of all of the standard Python modules off the top of your head, so it’s not your fault. But you did do a good job of tracking down the source of the error, which is the most important skill a software developer can have. :slight_smile: