You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to accurately estimate the size in ram of objects from the python-docx lib.
I've tried sys.getsizeof() which doesn't work very well. In fact, the object I'm interested in : docx.text.run.Run is just a proxy. So this approach doesn't work.
I also tried pympler.asizeof but I have this rather complicated error to understand :
File"/usr/app/src/annotation/colorization/heuristics/content_awareness.py", line132, indeep_copyprint(f"adding {asizeof(obj)} bytes to memory. Object: {obj}")
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line2545, inasizeofs=_asizer.asizeof(*t)
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line1954, inasizeofreturnsum(self._sizer(o, 0, 0, None) foroinobjs)
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line1954, in<genexpr>returnsum(self._sizer(o, 0, 0, None) foroinobjs)
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line1888, in_sizers+=z(o, i, d, None)
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line1888, in_sizers+=z(o, i, d, None)
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line1888, in_sizers+=z(o, i, d, None)
[Previouslinerepeated13moretimes]
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line1887, in_sizerforoinv.refs(obj, False):
File"/usr/local/lib/python3.10/dist-packages/pympler/asizeof.py", line571, in_refsifhasattr(obj, a):
TypeError: descriptor'__dict__'for'_OxmlElementBase'objectsdoesn't apply to a 'CT_CoreProperties' object
I'm very curious to know if anyone has any ideas for solving this problem!
The text was updated successfully, but these errors were encountered:
Hi everyone !
I'd like to accurately estimate the size in ram of objects from the python-docx lib.
I've tried sys.getsizeof() which doesn't work very well. In fact, the object I'm interested in : docx.text.run.Run is just a proxy. So this approach doesn't work.
I also tried
pympler.asizeof
but I have this rather complicated error to understand :I'm very curious to know if anyone has any ideas for solving this problem!
The text was updated successfully, but these errors were encountered: