Major Coding Error

Hello, I am working on a Toontown Server and i have found a little bug in my coding. The uberdog repository is having a little trouble connecting to Astron. Here is the Error I am getting.

Base Channel (DEFAULT: 1000000):
Starting Toontown Uberdog Server...
ppython: "C:\Panda3D-1.9.0\python\ppython.exe"
Base Channel: 1000000
Max Channels: 999999
State Server ID: 4002
Message Director IP:
Event Logger IP:
TTLocalizer: Running in language: english
from toontown.toonbase.TTLocalizerEnglish import *
OTPLocalizer: Running in language: english
from otp.otpbase.OTPLocalizerEnglish import *
DCFile::read of config/otp.dc
DCFile::read of config/toon.dc
Traceback (most recent call last):
  File "C:\Panda3D-1.9.0\pandac\", line 1554, in doTask
  File "C:\Panda3D-1.9.0\direct\distributed\", line 563, in httpConnectCallback
  File "C:\Panda3D-1.9.0\direct\distributed\", line 396, in __connected
  File "toontown\uberdog\", line 13, in handleConnected
  File "toontown\distributed\", line 26, in handleConnected
    self.netMessenger.register(0, 'shardStatus')
AttributeError: 'ToontownUberRepository' object has no attribute 'netMessenger'
:task(error): Exception occurred in PythonTask connect-to-server
Traceback (most recent call last):
  File "C:\Panda3D-1.9.0\python\lib\", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Panda3D-1.9.0\python\lib\", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\chris_000\Desktop\ToontownBETA\beta\toontown\uberdog\", line 50, in <module>
    simbase.air.writeServerEvent('uberdog-exception', avId=simbase.air.getAvatarIdFromSender(), accId=simbase.air.getAccountIdFromSender(), info=info)
TypeError: writeServerEvent() got an unexpected keyword argument 'avId'
Press any key to continue . . .

Also… here is the file

from pandac.PandaModules import *
from direct.showbase import PythonUtil
import __builtin__

import argparse

parser = argparse.ArgumentParser()
parser.add_argument('--base-channel', help='The base channel that the server may use.')
parser.add_argument('--max-channels', help='The number of channels the server may use.')
parser.add_argument('--stateserver', help="The control channel of this UD's designated State Server.")
parser.add_argument('--astron-ip', help="The IP address of the Astron Message Director to connect to.")
parser.add_argument('--eventlogger-ip', help="The IP address of the Astron Event Logger to log to.")
parser.add_argument('config', nargs='*', default=['config/dev.prc'], help="PRC file(s) to load.")
args = parser.parse_args()

for prc in args.config:

localconfig = ''
if args.base_channel: localconfig += 'air-base-channel %s\n' % args.base_channel
if args.max_channels: localconfig += 'air-channel-allocation %s\n' % args.max_channels
if args.stateserver: localconfig += 'air-stateserver %s\n' % args.stateserver
if args.astron_ip: localconfig += 'air-connect %s\n' % args.astron_ip
if args.eventlogger_ip: localconfig += 'eventlog-host %s\n' % args.eventlogger_ip
loadPrcFileData('Command-line', localconfig)

class game:
    name = 'uberDog'
    process = 'server' = game

from import *

from toontown.uberdog.ToontownUberRepository import ToontownUberRepository
simbase.air = ToontownUberRepository(config.GetInt('air-base-channel', 402000000),
                                     config.GetInt('air-stateserver', 10000))
host = config.GetString('air-connect', '')
port = 7199
if ':' in host:
    host, port = host.split(':', 1)
    port = int(port)
simbase.air.connect(host, port)

except SystemExit:
except Exception:
    info = PythonUtil.describeException()
    simbase.air.writeServerEvent('uberdog-exception', avId=simbase.air.getAvatarIdFromSender(), accId=simbase.air.getAccountIdFromSender(), info=info)

Thank you ~poppopccc

This looks like you’re using the ToontownUberRepository class incorrectly, giving writeServerEvent a keyword argument it doesn’t accept.

In any case, this doesn’t seem to be an issue that is in any way related to Panda3D.