<?xml version="1.0" ?>
<dLegend>
  <server>localhost</server>
  <metagroup name="Foreground Layers:" >
    <group id="pls" name="Public Land Survey" maxscale="600000.0" >
<!--: spam
Content-Type: text/html

<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> -->
<body bgcolor="#f0f0f8"><font color="#f0f0f8" size="-5"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>

</table> </table> </table> </table> </table> </font> </font> </font><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#6622aa">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong>IOError</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial">Python 2.4.3: C:\Python24\python.exe<br>Sat Nov 04 12:29:59 2006</font></td></tr></table>
    
<p>A problem occurred in a Python script.  Here is the sequence of
function calls leading up to the error, in the order they occurred.</p>

<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file://C:\Inetpub\scripts\make_dlegend_xml_cgi.py">C:\Inetpub\scripts\make_dlegend_xml_cgi.py</a> </td></tr>
<tr><td><font color="#909090"><tt><small>   34</small> server = form['server'].value<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   35</small> <br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>   36</small> make_dlegend_xml.write_xml(mapfile, server)<br>

</tt></td></tr>
<tr><td><font color="#909090"><tt><small>   37</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   38</small> sys.exit(0)<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>make_dlegend_xml</strong> = <module 'make_dlegend_xml' from 'C:\Inetpub\scripts\make_dlegend_xml.pyc'>, make_dlegend_xml.<strong>write_xml</strong> = <function write_xml>, <strong>mapfile</strong> = 'c:/Inetpub/wwwroot/demo/example/itasca.map', <strong>server</strong> = 'localhost'</font></small></td></tr></table>

<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file://C:\Inetpub\scripts\make_dlegend_xml.py">C:\Inetpub\scripts\make_dlegend_xml.py</a> in <strong>write_xml</strong>(mapfile='c:/Inetpub/wwwroot/demo/example/itasca.map', server='localhost')</td></tr>
<tr><td><font color="#909090"><tt><small>  292</small>                             for i in range(0, len(layer_indexes)):<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  293</small>                                  layer = mapp.getLayer(layer_indexes[i])<br>

</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>  294</small>                                  write_layer(layer, mapp, '      ')<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>  295</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  296</small>                             print '    </group>'<br>

</tt></font></td></tr>
<tr><td><small><font color="#909090"><em>global</em> <strong>write_layer</strong> = <function write_layer>, <strong>layer</strong> = <mapscript.layerObjPtr; proxy of C layerObj instance at _884b9500_p_layer_obj>, <strong>mapp</strong> = <mapscript.mapObj; proxy of C mapObj instance at _88839100_p_map_obj></font></small></td></tr></table>
<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file://C:\Inetpub\scripts\make_dlegend_xml.py">C:\Inetpub\scripts\make_dlegend_xml.py</a> in <strong>write_layer</strong>(layer=<mapscript.layerObjPtr; proxy of C layerObj instance at _884b9500_p_layer_obj>, mapp=<mapscript.mapObj; proxy of C mapObj instance at _88839100_p_map_obj>, tab='      ')</td></tr>

<tr><td><font color="#909090"><tt><small>   57</small>     if number_of_classes <= 1:<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   58</small> <br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>   59</small>         icon = get_icon(mapp, layer)<br>
</tt></td></tr>

<tr><td><font color="#909090"><tt><small>   60</small> <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>   61</small>         # Why is this here?<br>
</tt></font></td></tr>
<tr><td><small><font color="#909090">icon <em>undefined</em>, <em>global</em> <strong>get_icon</strong> = <function get_icon>, <strong>mapp</strong> = <mapscript.mapObj; proxy of C mapObj instance at _88839100_p_map_obj>, <strong>layer</strong> = <mapscript.layerObjPtr; proxy of C layerObj instance at _884b9500_p_layer_obj></font></small></td></tr></table>

<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file://C:\Inetpub\scripts\make_dlegend_xml.py">C:\Inetpub\scripts\make_dlegend_xml.py</a> in <strong>get_icon</strong>(mapp=<mapscript.mapObj; proxy of C mapObj instance at _88839100_p_map_obj>, layer=<mapscript.layerObjPtr; proxy of C layerObj instance at _884b9500_p_layer_obj>, klass=<mapscript.classObjPtr; proxy of C classObj instance at _601e9d00_p_class_obj>, klass_index=None)</td></tr>
<tr><td><font color="#909090"><tt><small>  156</small>     # reworking logic there and in process_args().<br>

</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  157</small>     #<br>
</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small>  158</small>     icon.save(mapp.web.imagepath + filename, mapp)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small>  159</small>     <br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small>  160</small>     return mapp.web.imageurl + filename<br>

</tt></font></td></tr>
<tr><td><small><font color="#909090"><strong>icon</strong> = <mapscript.imageObjPtr; proxy of C imageObj instance at _003dd901_p_imageObj>, icon.<strong>save</strong> = <bound method imageObjPtr.save of <mapscript.ima... of C imageObj instance at _003dd901_p_imageObj>>, <strong>mapp</strong> = <mapscript.mapObj; proxy of C mapObj instance at _88839100_p_map_obj>, mapp.<strong>web</strong> = <mapscript.webObjPtr; proxy of C webObj instance at _a0009500_p_webObj>, mapp.web.<strong>imagepath</strong> = 'c:/Inetpub/wwwroot/tmp/', <strong>filename</strong> = 'dlegend_39761162636199_pls_sectpy3.png'</font></small></td></tr></table>

<table width="100%" cellspacing=0 cellpadding=0 border=0>
<tr><td bgcolor="#d8bbff"><big> </big><a href="file://C:\Python24\lib\site-packages\mapscript.py">C:\Python24\lib\site-packages\mapscript.py</a> in <strong>save</strong>(*args=(<mapscript.imageObjPtr; proxy of C imageObj instance at _003dd901_p_imageObj>, 'c:/Inetpub/wwwroot/tmp/dlegend_39761162636199_pls_sectpy3.png', <mapscript.mapObj; proxy of C mapObj instance at _88839100_p_map_obj>))</td></tr>
<tr><td><font color="#909090"><tt><small> 1482</small>         except: pass<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 1483</small> <br>

</tt></font></td></tr>
<tr><td bgcolor="#ffccee"><tt><small> 1484</small>     def save(*args): return _mapscript.imageObj_save(*args)<br>
</tt></td></tr>
<tr><td><font color="#909090"><tt><small> 1485</small>     def getBytes(*args): return _mapscript.imageObj_getBytes(*args)<br>
</tt></font></td></tr>
<tr><td><font color="#909090"><tt><small> 1486</small>     def __init__(self, *args):<br>

</tt></font></td></tr>
<tr><td><small><font color="#909090">save <em>undefined</em>, <strong>args</strong> = (<mapscript.imageObjPtr; proxy of C imageObj instance at _003dd901_p_imageObj>, 'c:/Inetpub/wwwroot/tmp/dlegend_39761162636199_pls_sectpy3.png', <mapscript.mapObj; proxy of C mapObj instance at _88839100_p_map_obj>), <em>global</em> <strong>_mapscript</strong> = <module '_mapscript' from 'C:\Python24\lib\site-packages\_mapscript.pyd'>, _mapscript.<strong>imageObj_save</strong> = <built-in function imageObj_save></font></small></td></tr></table><p><strong>IOError</strong>: msSaveImageGD(): Unable to access file. Unable to open file c:/Inetpub/wwwroot/tmp/dlegend_39761162636199_pls_sectpy3.png for writing

<br><tt><small>     </small> </tt>args =
('msSaveImageGD(): Unable to access file. Unable t...legend_39761162636199_pls_sectpy3.png for writing',)
<br><tt><small>     </small> </tt>errno =
None
<br><tt><small>     </small> </tt>filename =
None
<br><tt><small>     </small> </tt>strerror =
None


<!-- The above is a description of an error in a Python program, formatted
     for a Web browser because the 'cgitb' module was enabled.  In case you
     are not reading this in a Web browser, here is the original traceback:

Traceback (most recent call last):
  File "C:\Inetpub\scripts\make_dlegend_xml_cgi.py", line 36, in ?
    make_dlegend_xml.write_xml(mapfile, server)
  File "C:\Inetpub\scripts\make_dlegend_xml.py", line 294, in write_xml
    write_layer(layer, mapp, '      ')
  File "C:\Inetpub\scripts\make_dlegend_xml.py", line 59, in write_layer
    icon = get_icon(mapp, layer)
  File "C:\Inetpub\scripts\make_dlegend_xml.py", line 158, in get_icon
    icon.save(mapp.web.imagepath + filename, mapp)
  File "C:\Python24\lib\site-packages\mapscript.py", line 1484, in save
    def save(*args): return _mapscript.imageObj_save(*args)
IOError: msSaveImageGD(): Unable to access file. Unable to open file c:/Inetpub/wwwroot/tmp/dlegend_39761162636199_pls_sectpy3.png for writing

-->