Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DistributedObjectUD.generateWithRequired*() broken #281

Closed
Schwarzbaer opened this issue Aug 17, 2014 · 1 comment
Closed

DistributedObjectUD.generateWithRequired*() broken #281

Schwarzbaer opened this issue Aug 17, 2014 · 1 comment

Comments

@Schwarzbaer
Copy link

I updated Astrons Panda3D fork. Since then my code (https://github.com/TheCheapestPixels/astron_examples/tree/master/01_simple_example) won't run anymore, crashing on simple_example.py line 45 when trying to generate DistributedMaprootUD.

When using self.maproot.generateWithRequiredAndId(self.maproot, 0), I now get informed that:
TypeError: generateWithRequiredAndId() takes at least 4 arguments (3 given)
(Then again, I don't know why it worked in the first place.)

When using self.maproot.generateWithRequiredAndId(self.maproot, 0, 0):
Traceback (most recent call last):
File "./simple_example_server.py", line 102, in
simple_server.run()
File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 2932, in run
self.taskMgr.run()
File "/usr/share/panda3d/direct/task/Task.py", line 502, in run
self.step()
File "/usr/share/panda3d/direct/task/Task.py", line 460, in step
self.mgr.poll()
File "/usr/share/panda3d/direct/distributed/ConnectionRepository.py", line 613, in readerPollUntilEmpty
while self.readerPollOnce():
File "/usr/share/panda3d/direct/distributed/ConnectionRepository.py", line 618, in readerPollOnce
if self.checkDatagram():
File "/home/baribal/src/astron_examples/01_simple_example/simple_example.py", line 45, in set_maproot
self.maproot.generateWithRequiredAndId(self.maproot, 0, 0)
File "/usr/share/panda3d/direct/distributed/DistributedObjectUD.py", line 321, in generateWithRequiredAndId
self.air.generateWithRequiredAndId(self, doId, parentId, zoneId, optionalFields)
File "/usr/share/panda3d/direct/distributed/AstronInternalRepository.py", line 429, in generateWithRequiredAndId
do.sendGenerateWithRequired(self, parentId, zoneId, optionalFields)
File "/usr/share/panda3d/direct/distributed/DistributedObjectUD.py", line 381, in sendGenerateWithRequired
optionalFields)
AttributeError: DistributedMaprootUD instance has no attribute 'trunc'
Of course, that'd not be the right thing to do, either, as I do want an autogenerated doId, but still.

When using self.maproot.generateWithRequiredAndId(self.maproot, 123456, 0) (the doId is now in the StateServers range):
Traceback (most recent call last):
File "./simple_example_server.py", line 102, in
simple_server.run()
File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 2932, in run
self.taskMgr.run()
File "/usr/share/panda3d/direct/task/Task.py", line 502, in run
self.step()
File "/usr/share/panda3d/direct/task/Task.py", line 460, in step
self.mgr.poll()
File "/usr/share/panda3d/direct/distributed/ConnectionRepository.py", line 613, in readerPollUntilEmpty
while self.readerPollOnce():
File "/usr/share/panda3d/direct/distributed/ConnectionRepository.py", line 618, in readerPollOnce
if self.checkDatagram():
File "/home/baribal/src/astron_examples/01_simple_example/simple_example.py", line 45, in set_maproot
self.maproot.generateWithRequiredAndId(self.maproot, 123456, 0)
File "/usr/share/panda3d/direct/distributed/DistributedObjectUD.py", line 321, in generateWithRequiredAndId
self.air.generateWithRequiredAndId(self, doId, parentId, zoneId, optionalFields)
File "/usr/share/panda3d/direct/distributed/AstronInternalRepository.py", line 428, in generateWithRequiredAndId
self.addDOToTables(do, location=(parentId, zoneId))
File "/usr/share/panda3d/direct/distributed/DoCollectionManager.py", line 402, in addDOToTables
self.storeObjectLocation(do, location[0], location[1])
File "/usr/share/panda3d/direct/showbase/PythonUtil.py", line 3543, in _exceptionLogged
return f(_args, *_kArgs)
File "/usr/share/panda3d/direct/distributed/DoCollectionManager.py", line 360, in storeObjectLocation
elif parentId not in (None, 0, self.getGameDoId()):
File "/usr/share/panda3d/direct/distributed/DoCollectionManager.py", line 27, in getGameDoId
return self.GameGlobalsId
AttributeError: 'AstronInternalRepository' object has no attribute 'GameGlobalsId'

Finally, the code that I actually do want to have and that IMO should work: self.maproot.generateWithRequired(self.maproot, 0)
Traceback (most recent call last):
File "./simple_example_server.py", line 102, in
simple_server.run()
File "/usr/share/panda3d/direct/showbase/ShowBase.py", line 2932, in run
self.taskMgr.run()
File "/usr/share/panda3d/direct/task/Task.py", line 502, in run
self.step()
File "/usr/share/panda3d/direct/task/Task.py", line 460, in step
self.mgr.poll()
File "/usr/share/panda3d/direct/distributed/ConnectionRepository.py", line 613, in readerPollUntilEmpty
while self.readerPollOnce():
File "/usr/share/panda3d/direct/distributed/ConnectionRepository.py", line 618, in readerPollOnce
if self.checkDatagram():
File "/home/baribal/src/astron_examples/01_simple_example/simple_example.py", line 46, in set_maproot
self.maproot.generateWithRequired(self.maproot, 0)
File "/usr/share/panda3d/direct/distributed/DistributedObjectUD.py", line 308, in generateWithRequired
self.air.generateWithRequired(self, parentId, zoneId, optionalFields)
File "/usr/share/panda3d/direct/distributed/AstronInternalRepository.py", line 418, in generateWithRequired
self.generateWithRequiredAndId(do, doId, parentId, zoneId, optionalFields)
File "/usr/share/panda3d/direct/distributed/AstronInternalRepository.py", line 429, in generateWithRequiredAndId
do.sendGenerateWithRequired(self, parentId, zoneId, optionalFields)
File "/usr/share/panda3d/direct/distributed/DistributedObjectUD.py", line 381, in sendGenerateWithRequired
optionalFields)
AttributeError: DistributedMaprootUD instance has no attribute 'trunc'

@kestred
Copy link
Member

kestred commented Aug 17, 2014

Moved issue to the Astron/panda3d repository Astron/panda3d#6.

@kestred kestred closed this as completed Aug 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants