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: 127.0.0.1:7199
Event Logger IP: 127.0.0.1:7197
===============================
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\panda3dCoreModules.py", line 1554, in doTask
    task.callback(*task.callbackArgs)
  File "C:\Panda3D-1.9.0\direct\distributed\ConnectionRepository.py", line 563, in httpConnectCallback
    successCallback(*successArgs)
  File "C:\Panda3D-1.9.0\direct\distributed\AstronInternalRepository.py", line 396, in __connected
    self.handleConnected()
  File "toontown\uberdog\ToontownUberRepository.py", line 13, in handleConnected
    ToontownInternalRepository.handleConnected(self)
  File "toontown\distributed\ToontownInternalRepository.py", 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\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "C:\Panda3D-1.9.0\python\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Users\chris_000\Desktop\ToontownBETA\beta\toontown\uberdog\ServiceStart.py", 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 ServiceStart.py 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:
    loadPrcFile(prc)

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'
__builtin__.game = game

from otp.ai.AIBaseGlobal 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', '127.0.0.1')
port = 7199
if ':' in host:
    host, port = host.split(':', 1)
    port = int(port)
simbase.air.connect(host, port)

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

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.