Running Toontown source on Mac...

MBP:Toontown user$ bash scripts/internal_visual_startup.sh
_______________________________
Toontown is starting. Please be
patient, as the length of this
process is based on your computer.
________________________________
Warning: pandac.PandaModules is deprecated, import from panda3d.core instead
ToontownStart: Reading preferences.gz...
ToontownStart: Polling for game2 to finish...
ToontownStart: Game2 is finished.
ToontownStart: Starting the game.
ToontownStart: setting default font
TTLocalizer: Running in language: english
from toontown.toonbase.TTLocalizerEnglish import *
OTPLocalizer: Running in language: english
from otp.otpbase.OTPLocalizerEnglish import *
Known pipe types:
  CocoaGraphicsPipe
(all display modules loaded.)
:audio(error):   load_dso(libp3fmod_audio.so) failed, will use NullAudioManager
:audio(error):     dlopen(/Developer/Panda3D/lib/libp3fmod_audio.dylib, 10): Library not loaded: @executable_path/../Frameworks/Cg.framework/Cg
  Referenced from: /Developer/Panda3D/lib/libpanda.1.9.dylib
  Reason: unsafe use of @executable_path in /Developer/Panda3D/lib/libpanda.1.9.dylib with restricted binary
[(1280, 800), (1152, 720), (1024, 768), (1024, 640), (800, 600), (800, 500), (640, 480), (720, 480)]
:ToonBase(warning): base.loadSfx is deprecated, use base.loader.loadSfx instead.
:ToonBase(warning): base.loadSfx is deprecated, use base.loader.loadSfx instead.
ToontownStart: serverVersion:  toontown
Preloading avatars...
Done preloading avatars.
:nativenet(error): Buffered_DatagramConnection Constructor rbufsize = 4096000 wbufsize = 4096000 write_flush_point = 1400
DCFile::read of astron/otp.dc
DCFile::read of astron/toon.dc
:ToonBase(warning): run() is deprecated, use base.run() instead
{401000001: <toontown.distributed.ToontownDistrict.ToontownDistrict instance at 0x12e3667e8>}
{401000001: <toontown.distributed.ToontownDistrict.ToontownDistrict instance at 0x12e3667e8>}
Traceback (most recent call last):
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 609, in readerPollUntilEmpty
    while self.readerPollOnce():
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 616, in readerPollOnce
    self.handleDatagram(self.private__di)
  File "otp/distributed/OTPClientRepository.py", line 1871, in handleDatagram
    self.handleMessageType(msgType, di)
  File "otp/distributed/OTPClientRepository.py", line 1765, in handleMessageType
    self.handleGenerateWithRequiredOtherOwner(di)
  File "toontown/distributed/ToontownClientRepository.py", line 910, in handleGenerateWithRequiredOtherOwner
    self.handleAvatarResponseMsg(doId, di)
  File "toontown/distributed/ToontownClientRepository.py", line 347, in handleAvatarResponseMsg
    localAvatar = LocalToon.LocalToon(self)
  File "toontown/toon/LocalToon.py", line 81, in __init__
    DistributedToon.DistributedToon.__init__(self, cr)
  File "toontown/toon/DistributedToon.py", line 77, in __init__
    DistributedPlayer.DistributedPlayer.__init__(self, cr)
  File "otp/avatar/DistributedPlayer.py", line 32, in __init__
    DistributedAvatar.DistributedAvatar.__init__(self, cr)
  File "otp/avatar/DistributedAvatar.py", line 26, in __init__
    Avatar.__init__(self)
  File "otp/avatar/Avatar.py", line 32, in __init__
    self.name = ''
TypeError: C++ object is not yet constructed, or already destructed.
:task(error): Exception occurred in PythonTask readerPollTask-140733701619200
:ToonBase(warning): Handling Python exception.
Traceback (most recent call last):
  File "otp/otpbase/OTPBase.py", line 239, in run
    taskMgr.run()
  File "/Developer/Panda3D/direct/task/Task.py", line 517, in run
    self.step()
  File "/Developer/Panda3D/direct/task/Task.py", line 471, in step
    self.mgr.poll()
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 609, in readerPollUntilEmpty
    while self.readerPollOnce():
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 616, in readerPollOnce
    self.handleDatagram(self.private__di)
  File "otp/distributed/OTPClientRepository.py", line 1871, in handleDatagram
    self.handleMessageType(msgType, di)
  File "otp/distributed/OTPClientRepository.py", line 1765, in handleMessageType
    self.handleGenerateWithRequiredOtherOwner(di)
  File "toontown/distributed/ToontownClientRepository.py", line 910, in handleGenerateWithRequiredOtherOwner
    self.handleAvatarResponseMsg(doId, di)
  File "toontown/distributed/ToontownClientRepository.py", line 347, in handleAvatarResponseMsg
    localAvatar = LocalToon.LocalToon(self)
  File "toontown/toon/LocalToon.py", line 81, in __init__
    DistributedToon.DistributedToon.__init__(self, cr)
  File "toontown/toon/DistributedToon.py", line 77, in __init__
    DistributedPlayer.DistributedPlayer.__init__(self, cr)
  File "otp/avatar/DistributedPlayer.py", line 32, in __init__
    DistributedAvatar.DistributedAvatar.__init__(self, cr)
  File "otp/avatar/DistributedAvatar.py", line 26, in __init__
    Avatar.__init__(self)
  File "otp/avatar/Avatar.py", line 32, in __init__
    self.name = ''
TypeError: C++ object is not yet constructed, or already destructed.

Facing this error… what’s up?

Either move the self.name assignment to after the init call, or rename self.name to self._name.

@rdb Hmm new error:

Traceback (most recent call last):
  File "otp/otpbase/OTPBase.py", line 239, in run
    taskMgr.run()
  File "/Developer/Panda3D/direct/task/Task.py", line 517, in run
    self.step()
  File "/Developer/Panda3D/direct/task/Task.py", line 471, in step
    self.mgr.poll()
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 609, in readerPollUntilEmpty
    while self.readerPollOnce():
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 616, in readerPollOnce
    self.handleDatagram(self.private__di)
  File "otp/distributed/OTPClientRepository.py", line 1871, in handleDatagram
    self.handleMessageType(msgType, di)
  File "otp/distributed/OTPClientRepository.py", line 1765, in handleMessageType
    self.handleGenerateWithRequiredOtherOwner(di)
  File "toontown/distributed/ToontownClientRepository.py", line 910, in handleGenerateWithRequiredOtherOwner
    self.handleAvatarResponseMsg(doId, di)
  File "toontown/distributed/ToontownClientRepository.py", line 363, in handleAvatarResponseMsg
    localAvatar.initInterface()
  File "toontown/toon/LocalToon.py", line 338, in initInterface
    self.optionsPage.load()
  File "toontown/shtiker/OptionsPage.py", line 93, in load
    self.optionsTabPage = OptionsTabPage(self)
  File "toontown/shtiker/OptionsPage.py", line 155, in __init__
    self.parent = parent
AttributeError: attribute 'parent' of 'panda3d.core.NodePath' objects is not writable

@raffo2 Sorry, what?

Rename self.parent to self._parent. The issue is that the class in question inherits from NodePath, which now defines properties named “name”, “parent”, “children” etc. The subclass properties now conflict with these names.

@rdb Great. Adding underscores seemed to solve a lot of errors after that one (most of them pertaining to self.parent). I just started the computer science major in college but I’m doing Java not Python. What does the underscore do? Also, why is it that I can run the exact source on Windows but macOS requires these changes?

Also, new error:

Traceback (most recent call last):
  File "otp/otpbase/OTPBase.py", line 239, in run
    taskMgr.run()
  File "/Developer/Panda3D/direct/task/Task.py", line 517, in run
    self.step()
  File "/Developer/Panda3D/direct/task/Task.py", line 471, in step
    self.mgr.poll()
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 609, in readerPollUntilEmpty
    while self.readerPollOnce():
  File "/Developer/Panda3D/direct/distributed/ConnectionRepository.py", line 616, in readerPollOnce
    self.handleDatagram(self.private__di)
  File "otp/distributed/OTPClientRepository.py", line 1873, in handleDatagram
    self.handler(msgType, di)
  File "otp/distributed/OTPClientRepository.py", line 1484, in handlePlayGame
    self.handleUpdateField(di)
  File "otp/distributed/OTPClientRepository.py", line 2191, in handleUpdateField
    self.__doUpdate(doId, di, ovUpdated)
  File "otp/distributed/OTPClientRepository.py", line 2199, in __doUpdate
    do.dclass.receiveUpdate(do, di)
  File "toontown/building/DistributedDoor.py", line 196, in setState
    self.fsm.request(state, [globalClockDelta.localElapsedTime(timestamp)])
  File "/Developer/Panda3D/direct/fsm/ClassicFSM.py", line 281, in request
    exitArgList)
  File "/Developer/Panda3D/direct/fsm/ClassicFSM.py", line 228, in __transition
    self.__enter(aState, enterArgList)
  File "/Developer/Panda3D/direct/fsm/ClassicFSM.py", line 214, in __enter
    aState.enter(argList)
  File "/Developer/Panda3D/direct/fsm/State.py", line 202, in enter
    self.__enterFunc(*argList)
  File "toontown/coghq/DistributedCogHQDoor.py", line 52, in enterClosing
    self.doorTrack = Parallel(Sequence(LerpHprInterval(nodePath=rightDoor, duration=1.0, hpr=_VBase3(0, 0, 0), startHpr=_VBase3(h, 0, 0), other=otherNP, blendType='easeInOut'), Func(doorFrameHoleRight.hide), Func(self.hideIfHasFlat, rightDoor)), Sequence(Wait(0.5), SoundInterval(self.closeSfx, node=rightDoor)), name=trackName)
NameError: global name 'VBase3' is not defined

edit: I had to import VBase3 using

from panda3d.core import VBase3

edit 2: Another error (if you’re familiar with Toontown lingo, this happened when using an Opera Singer in the VP; this info may be unrelated to the actual error)

Traceback (most recent call last):
  File "otp/otpbase/OTPBase.py", line 239, in run
    taskMgr.run()
  File "/Developer/Panda3D/direct/task/Task.py", line 517, in run
    self.step()
  File "/Developer/Panda3D/direct/task/Task.py", line 471, in step
    self.mgr.poll()
  File "/Developer/Panda3D/direct/showbase/ShowBase.py", line 1912, in __igLoop
    self.graphicsEngine.renderFrame()
AssertionError: !_center.is_nan() && !cnan(_radius) at line 29 of built/include/boundingSphere.I

The underscore does nothing other than avoid a name collision with a Panda property of the same name. The reason it might occur on one installation and not the other is that the name collision does not occur on older Panda3D builds which did not have that property.

I don’t know about the other error. It might be that a particular model is invalid. I would suggest trying to narrow it down by disabling parts of your level or your code so that you find out which particular part of your scene is causing the issue. If you find the model that is causing the issue, try running it through “pview” to see if it still causes the error.