connecting client to local server

Problems, questions, anything else related to the MV3D client.

Moderator: SirGolan

connecting client to local server

Postby saintpaulCollege » Wed Feb 22, 2012 8:20 pm

I've installed the dev environment for 0.70 (think I fixed all the pathing issues) and I'm using Panda. I get a local server running (using full-1999 template)
However, when I try to connect with the client, I get a pair of exceptions - one unhandled because its of type string.
The following are the exception stacktraces. Any ideas of what I'm doing wrong?

2012-02-22 14:14:21-0800 [HTTPPageGetter,client] Starting factory <HTTPClientFac
tory: https://localhost:8080/service/>
2012-02-22 14:14:21-0800 [HTTPPageGetter,client] Stopping factory <HTTPClientFac
tory: https://localhost:8080/service/>
2012-02-22 14:14:26-0800 [HTTPPageGetter,client] Unhandled Error
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 5
45, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 1
095, in gotResult
_inlineCallbacks(r, g, deferred)
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 1
037, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 3
82, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
--- <exception caught here> ---
File "C:\Projects\MV3D\trunk\mv3d\client\state.py", line 96, in onLogi
n
self.client.svc = yield self.client.conductor.getService(service)
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 1
037, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 3
82, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "C:\Projects\MV3D\trunk\mv3d\net\client.py", line 821, in getServ
ice
pws = yield self.getTempPasswords(sl)
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 1
037, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 3
82, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
exceptions.TypeError: exceptions must be classes, or instances, not str

2012-02-22 14:14:26-0800 [HTTPPageGetter,client] Stopping factory <HTTPClientFac
tory: https://localhost:8080/service/>
saintpaulCollege
 
Posts: 5
Joined: Tue Jan 31, 2012 5:28 pm

Re: connecting client to local server

Postby SirGolan » Wed Feb 22, 2012 8:48 pm

Did you initialize your server? That error usually means there was a problem validating your username or password. Check the server log messages and you'll probably see something more clear. As a side note, I'm not sure why that shows up like that in the 0.70 release since that error message is garbled due to a bug in the Twisted library that was fixed between 0.60 and 0.70.

Thanks,
Mike
SirGolan
Site Admin
 
Posts: 214
Joined: Wed Mar 19, 2008 7:04 pm

Re: connecting client to local server

Postby saintpaulCollege » Wed Feb 22, 2012 10:20 pm

I cleared out the .mv3d folder to reinitialize the server again. Upon doing so, I get the same string of exceptions as before:
Do you have an idea of what my issue is?
thanks

2012-02-22 16:15:29-0800 [Broker,client] Stopping factory <twisted.spread.pb.PBC
lientFactory instance at 0x0DC9A3F0>
2012-02-22 16:15:31-0800 [-] Starting factory <twisted.spread.pb.PBClientFactory
instance at 0x0DDC8D00>
2012-02-22 16:15:31-0800 [-] Connected.
2012-02-22 16:16:09-0800 [Broker,client] Unhandled error in Deferred:
2012-02-22 16:16:09-0800 [Broker,client] Unhandled Error
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 584, i
n expressionReceived
method(*sexp[1:])
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 996, i
n proto_error
d.errback(self.unserialize(fail))
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 3
91, in errback
self._startRunCallbacks(fail)
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 4
58, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 5
45, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3948, in err
orHandler
ErrorWindow(self, exc, why)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3910, in __i
nit__
text = "%s\n\n%s" % (errorValue, error.getTraceback())
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 5
16, in getTraceback
self.printTraceback(file=io, elideFrameworkCode=elideFrameworkCode,
detail=detail)
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 474, i
n printTraceback
file.write(self.type + ": " + self.value)
exceptions.TypeError: unsupported operand type(s) for +: 'type' and 'str
'
saintpaulCollege
 
Posts: 5
Joined: Tue Jan 31, 2012 5:28 pm

Re: connecting client to local server

Postby SirGolan » Thu Feb 23, 2012 1:52 am

Was there an exception in the server log? Was that the server log? It sort of looked like the client to me. You can copy the server log to the clipboard in Overseer by selecting multiple lines and using Ctrl+C. Also the log is saved in the .mv3d folder under the server name you specified. Did that error come up when you used the initialize button or while you were trying to log in after using it?

The other thing that comes to mind is that the initialize process may not have been finished. There isn't currently a progress bar for it and it can take a minute or two. It prints a message about being complete to the log when it's done.

Hope that helps..

Thanks,

Mike
SirGolan
Site Admin
 
Posts: 214
Joined: Wed Mar 19, 2008 7:04 pm

Re: connecting client to local server

Postby saintpaulCollege » Thu Feb 23, 2012 6:44 pm

that was a copy from the console after I told the overseer to initialize. Below I have pasted the log .mv3d/overseer

There was not attempt to run a client. I started overseer, choose a full-1999 template, and clicked initialize. This was what happened

2012-02-23 11:28:10-0800 [-] Logfile C:\Users\student\.mv3d\overseer.log opened.
2012-02-23 11:29:14-0800 [-] Starting factory <twisted.spread.pb.PBClientFactory instance at 0x0DACE3A0>
2012-02-23 11:29:14-0800 [-] Connected.
2012-02-23 12:38:00-0800 [Broker,client] Unhandled error in Deferred:
2012-02-23 12:38:00-0800 [Broker,client] Unhandled Error
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 584, in expressionReceived
method(*sexp[1:])
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 996, in proto_error
d.errback(self.unserialize(fail))
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 391, in errback
self._startRunCallbacks(fail)
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 458, in _startRunCallbacks
self._runCallbacks()
--- <exception caught here> ---
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 545, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3948, in errorHandler
ErrorWindow(self, exc, why)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3910, in __init__
text = "%s\n\n%s" % (errorValue, error.getTraceback())
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 516, in getTraceback
self.printTraceback(file=io, elideFrameworkCode=elideFrameworkCode, detail=detail)
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 474, in printTraceback
file.write(self.type + ": " + self.value)
exceptions.TypeError: unsupported operand type(s) for +: 'type' and 'str'
saintpaulCollege
 
Posts: 5
Joined: Tue Jan 31, 2012 5:28 pm

Re: connecting client to local server

Postby SirGolan » Fri Feb 24, 2012 2:45 am

The unfortunate thing here is that this is an exception in the exception handling code, so it's showing that and not the underlying problem. Oh hey, I just noticed this:

Code: Select all
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 474, in printTraceback


That looks like maybe you already had Twisted installed since the dev env installer puts it in C:\Projects\Twisted. It's possible there's some conflict there. I haven't seen that exact error message before, so it's hard to say. One thing that could help would be to change the error handling code so it isn't masking the problem. If and you open up C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py and change this: (starting at line: 3901)

Code: Select all
class ErrorWindow(object):
    """
    Brings up an error window.
    """
    def __init__(self, parser, error, reason):
        errorType = ".".join([error.type.__module__, error.type.__name__])
        if reason is None:
            reason = errorType
        errorValue = "%s: %s" % (errorType, str(error.value))
        text = "%s\n\n%s" % (errorValue, error.getTraceback())
        self.window = MessageDialog(parent=parser, text=text,
            title=reason, iconType=DialogIcon.error)
        self.window.show()
        parser.setClipboard(text)


To this:

Code: Select all
class ErrorWindow(object):
    """
    Brings up an error window.
    """
    def __init__(self, parser, error, reason):
        errorType = ".".join([error.type.__module__, error.type.__name__])
        if reason is None:
            reason = errorType
        errorValue = "%s: %s" % (errorType, str(error.value))
        print errorValue
        deferr(error)


That might shed some light on the situation. It's possibly some sort of configuration issue or a problem with the version of Twisted you have installed. I'm not totally sure. Also, I'm assuming this is in overseer.log. Is there a server-Full-1999.log as well?

Thanks,

Mike
SirGolan
Site Admin
 
Posts: 214
Joined: Wed Mar 19, 2008 7:04 pm

Re: connecting client to local server

Postby saintpaulCollege » Fri Feb 24, 2012 7:40 pm

I did that, I guess I've two things for you now:
1. First is the exception read out
2. The server-Full-1999.log

2012-02-24 11:34:09-0800 [-] Log opened.
2012-02-24 11:34:09-0800 [-] Logfile C:\Users\student\.mv3d\overseer.log opened.

2012-02-24 11:34:13-0800 [-] Starting factory <twisted.spread.pb.PBClientFactory
instance at 0x0DCAD670>
2012-02-24 11:34:13-0800 [-] Connected.
2012-02-24 11:34:40-0800 [Broker,client] twisted.spread.pb.RemoteError: exceptio
ns.NameError: global name 'ode' is not defined
2012-02-24 11:34:40-0800 [Broker,client] Log observer <bound method ChildServer.
emit of <mv3d.server.overseer.ChildServer object at 0x0D967210>> failed.
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 5
45, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3950, in err
orHandler
ErrorWindow(self, exc, why)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3911, in __i
nit__
deferr(error)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 213,
in err
msg(failure=_stuff, why=_why, isError=1, **kw)
--- <exception caught here> ---
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 284,
in msg
self.observers[i](actualEventDict)
File "C:\Projects\MV3D\trunk\mv3d\server\overseer.py", line 362, in em
it
observer(eventDict)
File "C:\Projects\MV3D\trunk\mv3d\tools\overseer\overseer.py", line 10
52, in _emit
self.logMessages.extend(LogMessage.fromEventDict(eventDict))
File "C:\Projects\MV3D\trunk\mv3d\util\log.py", line 47, in fromEventD
ict
fail = fail.getTraceback()
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 5
16, in getTraceback
self.printTraceback(file=io, elideFrameworkCode=elideFrameworkCode,
detail=detail)
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 474, i
n printTraceback
file.write(self.type + ": " + self.value)
exceptions.TypeError: unsupported operand type(s) for +: 'type' and 'str
'

2012-02-24 11:34:40-0800 [Broker,client] Log observer <bound method FileLogObser
ver.emit of <twisted.python.log.FileLogObserver instance at 0x0D8E78F0>> failed.

Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 5
45, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3950, in err
orHandler
ErrorWindow(self, exc, why)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3911, in __i
nit__
deferr(error)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 213,
in err
msg(failure=_stuff, why=_why, isError=1, **kw)
--- <exception caught here> ---
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 284,
in msg
self.observers[i](actualEventDict)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 472,
in emit
text = textFromEventDict(eventDict)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 402,
in textFromEventDict
+ '\n' + eventDict['failure'].getTraceback())
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 5
16, in getTraceback
self.printTraceback(file=io, elideFrameworkCode=elideFrameworkCode,
detail=detail)
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 474, i
n printTraceback
file.write(self.type + ": " + self.value)
exceptions.TypeError: unsupported operand type(s) for +: 'type' and 'str
'

2012-02-24 11:34:40-0800 [Broker,client] Log observer <bound method ChildServer.
emit of <mv3d.server.overseer.ChildServer object at 0x0D967210>> failed.
Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 4
58, in _startRunCallbacks
self._runCallbacks()
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 5
45, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3951, in err
orHandler
deferr(exc, why)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 213,
in err
msg(failure=_stuff, why=_why, isError=1, **kw)
--- <exception caught here> ---
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 284,
in msg
self.observers[i](actualEventDict)
File "C:\Projects\MV3D\trunk\mv3d\server\overseer.py", line 362, in em
it
observer(eventDict)
File "C:\Projects\MV3D\trunk\mv3d\tools\overseer\overseer.py", line 10
52, in _emit
self.logMessages.extend(LogMessage.fromEventDict(eventDict))
File "C:\Projects\MV3D\trunk\mv3d\util\log.py", line 47, in fromEventD
ict
fail = fail.getTraceback()
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 5
16, in getTraceback
self.printTraceback(file=io, elideFrameworkCode=elideFrameworkCode,
detail=detail)
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 474, i
n printTraceback
file.write(self.type + ": " + self.value)
exceptions.TypeError: unsupported operand type(s) for +: 'type' and 'str
'

2012-02-24 11:34:40-0800 [Broker,client] Log observer <bound method FileLogObser
ver.emit of <twisted.python.log.FileLogObserver instance at 0x0D8E78F0>> failed.

Traceback (most recent call last):
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 4
58, in _startRunCallbacks
self._runCallbacks()
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 5
45, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:\Projects\MV3D\trunk\mv3d\tools\guidewx.py", line 3951, in err
orHandler
deferr(exc, why)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 213,
in err
msg(failure=_stuff, why=_why, isError=1, **kw)
--- <exception caught here> ---
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 284,
in msg
self.observers[i](actualEventDict)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 472,
in emit
text = textFromEventDict(eventDict)
File "C:\Python26\lib\site-packages\twisted\python\log.py", line 402,
in textFromEventDict
+ '\n' + eventDict['failure'].getTraceback())
File "C:\Python26\lib\site-packages\twisted\python\failure.py", line 5
16, in getTraceback
self.printTraceback(file=io, elideFrameworkCode=elideFrameworkCode,
detail=detail)
File "C:\Python26\lib\site-packages\twisted\spread\pb.py", line 474, i
n printTraceback
file.write(self.type + ": " + self.value)
exceptions.TypeError: unsupported operand type(s) for +: 'type' and 'str



This is the server-Full-1999 log
2012-02-24 11:34:12-0800 [-] Logfile C:\Users\student\.mv3d\server-Full-1999.log opened.
2012-02-24 11:34:13-0800 [-] Log opened.
2012-02-24 11:34:13-0800 [-] twistd 11.1.0 (C:\Python26\python.exe 2.6.6) starting up.
2012-02-24 11:34:13-0800 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2012-02-24 11:34:13-0800 [-] PBServerFactory starting on 1999
2012-02-24 11:34:13-0800 [-] Starting factory <twisted.spread.pb.PBServerFactory instance at 0x089B2300>
2012-02-24 11:34:13-0800 [Broker,0,192.168.22.172] Connection initiated
2012-02-24 11:34:13-0800 [Broker,0,192.168.22.172] NevowSite (TLS) starting on 8080
2012-02-24 11:34:13-0800 [Broker,0,192.168.22.172] Starting factory <nevow.appserver.NevowSite instance at 0x089F4490>
2012-02-24 11:34:19-0800 [Broker,0,192.168.22.172] Started world generation.
2012-02-24 11:34:20-0800 [Broker,0,192.168.22.172] Creating directories...
2012-02-24 11:34:26-0800 [Broker,0,192.168.22.172] Created directories in 6.46 seconds.
2012-02-24 11:34:26-0800 [Broker,0,192.168.22.172] Adding asset group...
2012-02-24 11:34:34-0800 [Broker,0,192.168.22.172] Building assets.
2012-02-24 11:34:35-0800 [Broker,0,192.168.22.172] Finished building assets.
2012-02-24 11:34:35-0800 [Broker,0,192.168.22.172] Created assets in 0.50 seconds.
2012-02-24 11:34:35-0800 [Broker,0,192.168.22.172] Creating realm...
2012-02-24 11:34:35-0800 [Broker,0,192.168.22.172] <class 'mv3d.server.model.realm.odeRealm'> () {}
2012-02-24 11:34:35-0800 [Broker,0,192.168.22.172] Peer will receive following PB traceback:
2012-02-24 11:34:36-0800 [Broker,0,192.168.22.172] Unhandled Error
Traceback (most recent call last):
File "mv3d\server\worldgen.py", line 384, in produce
ClassGenerator("mv3d.server.model.realm.odeRealm"))
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 1181, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 1039, in _inlineCallbacks
result = g.send(result)
File "mv3d\server\realm.py", line 309, in newMasterRealm
realm = yield defer.maybeDeferred(cgen.construct)
--- <exception caught here> ---
File "C:\Python26\lib\site-packages\twisted\internet\defer.py", line 134, in maybeDeferred
result = f(*args, **kw)
File "mv3d\util\classgen.py", line 209, in construct
c = self.constructor(* a, **kw)
File "mv3d\server\model\realm.py", line 507, in __init__
self.setupWorld()
File "mv3d\server\model\realm.py", line 710, in setupWorld
self.world = ODEPhysics()
File "mv3d\phys\opende.py", line 936, in __init__
self.world = ode.World()
exceptions.NameError: global name 'ode' is not defined

saintpaulCollege
 
Posts: 5
Joined: Tue Jan 31, 2012 5:28 pm

Re: connecting client to local server

Postby SirGolan » Sat Feb 25, 2012 3:53 pm

Code: Select all
exceptions.NameError: global name 'ode' is not defined


Aha! That looks to be the problem. It seems like pyode isn't installed or it isn't in your path. Can you try this on a command line?

Code: Select all
c:\> python
>>> import ode


I'm guessing it will fail with an ImportError. Make sure you have pyode installed and that it's in your Python path. The dev env installer should have installed it to the correct location. I was having some troubles with ode.dll conflicting with Panda3D's ode installation. If that's the case, find ode.dll and copy it to your Panda bin directory. This is what the dev env installer tries to do:

Code: Select all
CopyFiles "C:\Panda3D-1.7.2\python\ode.dll" "C:\Panda3D-1.7.2\bin"


But that relies on Panda 1.7.2 being installed (which is the version the dev installer installs) and it being in the default location. If that isn't the case with your system, you'll have to make a similar copy of ode.dll. I should file a bug for it to try and figure out where Panda is installed if you aren't having the dev installer do it for you.

Hope that helps!

Mike
SirGolan
Site Admin
 
Posts: 214
Joined: Wed Mar 19, 2008 7:04 pm

Re: connecting client to local server

Postby saintpaulCollege » Mon Feb 27, 2012 11:39 pm

I am able to import ode without an issue
I guess I'm not sure what you mean by "I'll have to make a similar copy of ode.dll"
I actually find 4 separate copies of ode.dll - in python26, panda3d-x.x.x/bin, panda3d-x.x.x/python, and in combinator_paths_bincache
Though each one is a different file (different sizes and such)
saintpaulCollege
 
Posts: 5
Joined: Tue Jan 31, 2012 5:28 pm

Re: connecting client to local server

Postby SirGolan » Tue Feb 28, 2012 6:22 pm

I think the one in panda3d-x.x.x/python should be the correct one. Try saving backups of the others and then copying that one on top of them.
SirGolan
Site Admin
 
Posts: 214
Joined: Wed Mar 19, 2008 7:04 pm


Return to Client Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron