[Zope] help with pygantt
Sylvain Thénault
Sylvain.Thenault at logilab.fr
Thu Jan 22 04:32:15 EST 2004
On Thursday 22 January à 14:47, Aruna Prabhakaran wrote:
> hi all,
Hi
> I am working on an application wherein I need to generate gantt charts
> using pygantt tool . When I run the script from the python shell prompt,
> it is working fine, but raises an error when i try to do it in Zope
> (using Zope 2.7 and python 2.3.2)
I'm not sure this is really zope related, so I'm ccing
management-projects at logilab.org , and I think you should move the
discussion there.
> I get the following traceback :
> ------------------------------------
> Traceback (most recent call last):
> File "/usr/local/bin/pygantt", line 4, in ?
> run(sys.argv[1:])
> File "/usr/local/lib/python2.3/site-packages/logilab/pygantt/main.py",
> line 110, in run
> output.write(r.render(proj))
> File
> "/usr/local/lib/python2.3/site-packages/logilab/pygantt/renderers/renderer.py", line 339, in render
> AbstractGanttRenderer.render(self, project)
> File
> "/usr/local/lib/python2.3/site-packages/logilab/pygantt/renderers/renderer.py", line 61, in render
> self.open_table(project)
> File
> "/usr/local/lib/python2.3/site-packages/logilab/pygantt/renderers/renderer.py", line 390, in open_table
> self._h.init_drawing(width, height)
> File
> "/usr/local/lib/python2.3/site-packages/logilab/pygantt/renderers/PILHandler.py", line 71, in init_drawing
> self._default_font = load_font()
> File
> "/usr/local/lib/python2.3/site-packages/logilab/pygantt/renderers/PILHandler.py", line 60, in load_font
> return ImageFont.load(os.path.join(FONT_DIR, font_name))
> File "/usr/local/lib/python2.3/site-packages/PIL/ImageFont.py", line
> 166, in load
> f._load_pilfont(filename)
> File "/usr/local/lib/python2.3/site-packages/PIL/ImageFont.py", line
> 76, in _load_pilfont
> raise IOError("cannot find glyph data file")
> IOError: cannot find glyph data file
Are you sure you're using the same pygantt installation with the command
line and with Zope (usually true if you're using the same python
version) ? If so, you cshould heck the value of the "fonts_dir" variable
in the pygantt __init__.py file, and then verify that the indicated
directory contains 4 .pbm and 4 .pil files.
--
Sylvain Thénault LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
More information about the Zope
mailing list