【发布时间】:2014-01-30 09:01:25
【问题描述】:
这是我实际得到的错误/回溯:
Traceback (most recent call last):
File "/home/apache/tactic/src/tactic/ui/panel/custom_layout_wdg.py", line 619, in process_mako
html = template.render(server=my.server, search=Search, sobject=sobject, sobjects=my.sobject_dicts, data=my.data, plugin=plugin, kwargs=my.kwargs)
File "/home/apache/tactic/src/mako/template.py", line 189, in render
return runtime._render(self, self.callable_, args, data)
File "/home/apache/tactic/src/mako/runtime.py", line 403, in _render
_render_context(template, callable_, context, *args, **_kwargs_for_callable(callable_, data))
File "/home/apache/tactic/src/mako/runtime.py", line 434, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/home/apache/tactic/src/mako/runtime.py", line 457, in _exec_template
callable_(context, *args, **kwargs)
File "memory:0x7f2ea8589810", line 19, in render_body
${gl.get_gantt('vfx')}
File "/home/apache/gantt_logic.py", line 34, in get_gantt
prepend.add_style("width: %spx" %(total_width/days * (start_date - process[1]["start"]).days))
ZeroDivisionError: integer division or modulo by zero
我不是在问如何修复 ZeroDivisionError 错误。这是微不足道的。
我很想知道如何读取 Python 内存中的文件?在这种情况下memory:0x7f2ea8589810。
【问题讨论】:
-
用例是什么?我的意思是你想在这里实现什么?
-
好奇心。此外,它可能对社区有益。
-
它不是内存中的文件,它是内存地址(无论有什么)。见stackoverflow.com/questions/8250625/…
标签: python