[pypy-dev] AttributeError: 'Message' object has no attribute '__sizeof__'

Carlos Ferreira carlosmf.pt at gmail.com
Thu Jul 5 00:32:27 CEST 2012


Hello all!
I'm having a simple problem when using PyPy in windows 7.

My program which only uses 2 external packages (SimPy and networkx) and
which also works well under CPython 2.7.2, is throwing an AttributeError
Exception, when run in PyPy 1.9.

*Traceback (most recent call last):
  File "C:\Languages\pypy-1.9\lib-python\2.7\multiprocessing\process.py",
line 258, in _bootstrap
    self.run()
  File "C:\Languages\pypy-1.9\lib-python\2.7\multiprocessing\process.py",
line 114, in run
    self._target(*self._args, **self._kwargs)
  File "E:\Users\Claymore\Desktop\SimPy-Sims\Main.py", line 1197, in
ProcessMain
    main(SCENARIO_SIZE = size, maximumDepthSearch = depth, trial = trial)
  File "E:\Users\Claymore\Desktop\SimPy-Sims\Main.py", line 1139, in main
    simulate(until = 999999999)
  File "C:\Languages\pypy-1.9\site-packages\SimPy\Globals.py", line 61, in
simulate
    return sim.simulate(until = until)
  File "C:\Languages\pypy-1.9\site-packages\SimPy\Simulation.py", line 581,
in simulate
    step()
  File "C:\Languages\pypy-1.9\site-packages\SimPy\Simulation.py", line 525,
in step
    resultTuple = proc._nextpoint.next()
  File "E:\Users\Claymore\Desktop\SimPy-Sims\Main.py", line 700, in run

agentOwnerRef.networkInterfaces[fromNetworkInterface].TransmitMessage(message)
  File "E:\Users\Claymore\Desktop\SimPy-Sims\Main.py", line 184, in
TransmitMessage

GlobalShelve["GlobalNetwork"][str(self.agentName)]["NetworkInterfacesStats"][self.interfaceName]["MessagesTraceInput"].append({"arrivalTime":now(),
"messageID":message.messageID, "sizeInBytes":message.__sizeof__()})
AttributeError: 'Message' object has no attribute '__sizeof__'
*

Can anyone help me here ?

-- 

Carlos Miguel Ferreira
Researcher at Telecommunications Institute
Aveiro - Portugal
Work E-mail - cmf at av.it.pt
University of Aveiro E-mail -> cmf at ua.pt
MSN Contact -> carlosmf.pt at gmail.com
Skype & GTalk -> carlosmf.pt at gmail.com
LinkedIn -> http://www.linkedin.com/in/carlosmferreira
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120704/c4c2c7db/attachment.html>


More information about the pypy-dev mailing list