I’m trying to get a server repository to work, however I keep crashing because taskMgr isn’t defined. I looked in the source, and it is?
self.serverRepository = ServerRepository(tcpPort=6667, udpPort=6667)
File "C:\Panda3D-1.8.1\direct\distributed\ServerRepository.py", line 97, in __
init__
taskMgr.setupTaskChain('flushTask')
NameError: global name 'taskMgr' is not defined
There is no need to do either 1 or 2 above. They have nothing to do with it. There is no requirement for anything to import Task or inherit from DirectObject, especially not to use the task manager.
The error indicates that ShowBase has not been instantiated yet. Either import ShowBase and instantiate it, or import DirectStart, which does that for you.