Every time I want to start a new game, a window appears entitled "Sorry - Kajongg", saying : "shuffle() takes at most 3 arguments (4 given)" Reproducible: Always Actual Results: The game doesn't start, and nothing happens after. Expected Results: The game should have started Here are the console info after I type "kajongg" and try to start a game: Peer will receive following PB traceback: Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/twisted/spread/banana.py", line 153, in gotItem self.callExpressionReceived(item) File "/usr/lib/python2.7/dist-packages/twisted/spread/banana.py", line 116, in callExpressionReceived self.expressionReceived(obj) File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 565, in expressionReceived method(*sexp[1:]) File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 877, in proto_message self._recvMessage(self.localObjectForID, requestID, objectID, message, answerRequired, netArgs, netKw) --- <exception caught here> --- File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 891, in _recvMessage netResult = object.remoteMessageReceived(self, message, netArgs, netKw) File "/usr/lib/python2.7/dist-packages/twisted/spread/pb.py", line 242, in perspectiveMessageReceived state = method(*args, **kw) File "/usr/share/kde4/apps/kajongg/server.py", line 1120, in perspective_startGame return self.server.startGame(self, tableid) File "/usr/share/kde4/apps/kajongg/server.py", line 948, in startGame return self._lookupTable(tableid).readyForGameStart(user) File "/usr/share/kde4/apps/kajongg/server.py", line 311, in readyForGameStart self.game = self.__prepareNewGame() File "/usr/share/kde4/apps/kajongg/server.py", line 260, in __prepareNewGame playOpen=self.playOpen, autoPlay=self.autoPlay, wantedGame=self.wantedGame, shouldSave=True) File "/usr/share/kde4/apps/kajongg/game.py", line 663, in __init__ wantedGame=wantedGame, shouldSave=shouldSave, client=client) File "/usr/share/kde4/apps/kajongg/game.py", line 168, in __init__ self.__shufflePlayers() File "/usr/share/kde4/apps/kajongg/game.py", line 348, in __shufflePlayers self.randomGenerator.shuffle(self.players) File "/usr/share/kde4/apps/kajongg/game.py", line 61, in shuffle Random.shuffle(self, listValue, func, intType) exceptions.TypeError: shuffle() takes at most 3 arguments (4 given) C: shuffle() takes at most 3 arguments (4 given)
Git commit 1ce8799b65064d94b883ba1b1369a74f98c40d76 by Wolfgang Rohdewald. Committed on 02/02/2014 at 19:49. Pushed by wrohdewald into branch 'KDE/4.12'. make Random shuffle work with both Python 2.7.5 and 2.7.6 2.7.6 changed the API for shuffle(), released in November 2013. This fix may change the minimal python version needed (currently 2.6.0). But since I do not have anything older than 2.7.5 installed, it is difficult to tell. I checked the history of python lib random.py and there _should_ be no problem. People installing KDE/4.12 should already have some recent python, so it should not matter. Anyway this is why I will not backport this fix to KDE/4.11. And since 4.12.2 is about being released, I put this fix into 4.12.3 FIXED-IN: 4.12.3 M +3 -2 src/game.py http://commits.kde.org/kajongg/1ce8799b65064d94b883ba1b1369a74f98c40d76
*** Bug 345409 has been marked as a duplicate of this bug. ***