<p>My data is in WGS84 Major Auxiliary Sphere (as outputted by ArcGIS).. EPSG:3857</p>

<ul><li>Using <a href="http://rinnerweb.arts.ryerson.ca/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map&amp;REQUEST=GetMap&amp;WIDTH=500&amp;HEIGHT=500&amp;LAYERS=HII_railroads&amp;VERSION=1.1.1&amp;SRS=EPSG:3857&amp;bbox=-10995797.347,5031174.730,-7855157.347,7815054.730&amp;MAPUNIT=DecimalDegree&amp;FORMAT=image/png&amp;ClientId=&amp;CLIENTMODE=TiledWmsRasterSource" rel="nofollow">this</a> GetMap request, I have verified that my data is in fact
queryable</li></ul>

<p>So I changed a few settings in my tilecache.cfg as so based on the GetMap query:</p>

<pre><code>[HII_railroads]
type=WMS
url=<a href="http://141.117.104.183/cgi-bin/mapserv.exe">http://141.117.104.183/cgi-bin/mapserv.exe</a>
mapfile=C:/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map
extension=png
layers=HII_railroads
srs=EPSG:3857
size=256,256
bbox=-10995797.347,5031174.730,-7855157.347,7815054.730
resolutions=10226.494362992187,5113.247181496094,2556.623590748047,1278.3117953740234,639.1558976870117,319.57794884350585,159.78897442175293,79.89448721087646,39.94724360543823,19.973621802719116,9.986810901359558,4.993405450679779,2.4967027253398895,1.2483513626699447,0.6241756813349724,0.3120878406674862,0.1560439203337431,0.07802196016687155,0.03901098008343577,0.019505490041717886
</code></pre>

<p>Still <a href="http://rinnerweb.arts.ryerson.ca/moot2_dev/" rel="nofollow">no luck</a>, darn.</p>You can see that layer hii_6 doesnt produce any images and I am given this error when I explore the <a href="http://rinnerweb.arts.ryerson.ca/cgi-bin/tilecache.cgi?LAYERS=HII_railroads&amp;FORMAT=image%2Fpng&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG%3A3857&amp;BBOX=-10995797.347,6283519.00125,-9743453.07575,7535863.2725&amp;WIDTH=256&amp;HEIGHT=256">url</a> to these tiles:<br>

<br><pre><code></code>An error occurred: can&#39;t find resolution index for 4891.969810. Available resolutions are: 
[10226.494362992187, 5113.247181496094, 2556.623590748047, 1278.3117953740234, 639.1558976870117, 319.57794884350585, 159.78897442175293, 79.89448721087646, 39.94724360543823, 19.973621802719116, 9.986810901359558, 4.993405450679779, 2.4967027253398895, 1.2483513626699447, 0.6241756813349724, 0.3120878406674862, 0.1560439203337431, 0.07802196016687155, 0.03901098008343577, 0.019505490041717886]
<code></code></pre>
<font face="verdana,sans-serif"><br clear="all"></font><div><font color="#333333" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Michael Markieta - (416) 833 5581</font></div><div><font color="#cccccc" face="&#39;trebuchet ms&#39;, sans-serif" size="1">------------------------------------------------------</font></div>

<div><font color="#666666" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Research Assistant - Department of Geography &amp;</font></div><div><font color="#666666" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Bachelor of Arts Candidate - Geographic Analysis</font></div>

<div><font color="#999999" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Ryerson University</font></div><div><font color="#999999" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Toronto, ON, Canada</font></div><div>

<font color="#cccccc" face="&#39;trebuchet ms&#39;, sans-serif" size="1">------------------------------------------------------</font></div><div><font color="#333333" face="&#39;trebuchet ms&#39;, sans-serif" size="1"><a href="http://www.spatialanalysis.ca" target="_blank">www.spatialanalysis.ca</a></font></div>

<br>
<br><br><div class="gmail_quote">On Mon, Jan 30, 2012 at 11:06 AM, Michael Markieta <span dir="ltr">&lt;<a href="mailto:markieta.m@gmail.com">markieta.m@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><font face="verdana, sans-serif">Which formatting is considered correct? Would this be the source of the parsing error?</font></div><div><font face="verdana, sans-serif"><br></font></div><div><div class="im"><pre><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(34,34,34);background-color:rgb(238,238,238)">[HII_railroads]
  type=WMS
  url=<a href="http://141.117.104.183/cgi-bin/mapserv.exe" target="_blank">http://141.117.104.183/cgi-bin/mapserv.exe</a>
  mapfile=C:/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map
  extension=png
  layers=HII_railroads</code></pre></div><pre><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(34,34,34);background-color:rgb(238,238,238)">or</code></pre>

<div class="im">
<pre><code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(34,34,34);background-color:rgb(238,238,238)"><pre>

<code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;color:rgb(34,34,34);background-color:rgb(238,238,238)">[HII_railroads]
type=WMS
url=<a href="http://141.117.104.183/cgi-bin/mapserv.exe" target="_blank">http://141.117.104.183/cgi-bin/mapserv.exe</a>
mapfile=C:/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map
extension=png
layers=HII_railroads</code></pre>
</code></pre></div></div><font face="verdana,sans-serif"><div><font face="verdana,sans-serif">*Note the indentation.</font></div><div><br></div><br clear="all"></font><div class="im HOEnZb"><div><font color="#333333" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Michael Markieta - <a href="tel:%28416%29%20833%205581" value="+14168335581" target="_blank">(416) 833 5581</a></font></div>


<div><font color="#cccccc" face="&#39;trebuchet ms&#39;, sans-serif" size="1">------------------------------------------------------</font></div><div><font color="#666666" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Research Assistant - Department of Geography &amp;</font></div>


<div><font color="#666666" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Bachelor of Arts Candidate - Geographic Analysis</font></div><div><font color="#999999" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Ryerson University</font></div>


<div><font color="#999999" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Toronto, ON, Canada</font></div><div><font color="#cccccc" face="&#39;trebuchet ms&#39;, sans-serif" size="1">------------------------------------------------------</font></div>


<div><font color="#333333" face="&#39;trebuchet ms&#39;, sans-serif" size="1"><a href="http://www.spatialanalysis.ca" target="_blank">www.spatialanalysis.ca</a></font></div><br>
<br><br></div><div class="HOEnZb"><div class="h5"><div class="gmail_quote">On Mon, Jan 30, 2012 at 2:11 AM, Rahkonen Jukka <span dir="ltr">&lt;<a href="mailto:Jukka.Rahkonen@mmmtike.fi" target="_blank">Jukka.Rahkonen@mmmtike.fi</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>





<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">Hi,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">Perhaps it has something to do with newline characters?</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">[line 82]: &#39;  type=WMS\n&#39;</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial">-Jukka Rahkonen-</font></span></div>
<br>
<blockquote style="BORDER-LEFT:#0000ff 2px solid;PADDING-LEFT:5px;MARGIN-LEFT:5px;MARGIN-RIGHT:0px">
<div dir="ltr" align="left" lang="fi">
<hr>
</div><div><div>
<div dir="ltr" align="left" lang="fi"><font face="Tahoma">Michael Markieta<span><font color="#0000ff" face="Arial">  wrote:</font></span></font><br>
<span><font color="#0000ff" face="Arial"> </font></span></div>
<div dir="ltr" align="left" lang="fi"><span> </span>Hi all,</div>
<div>
<p>Original question was posted here: <a href="http://gis.stackexchange.com/questions/19459/tilecache-and-mapserver-not-producing-images-and-raising-parsing-error" target="_blank">
http://gis.stackexchange.com/questions/19459/tilecache-and-mapserver-not-producing-images-and-raising-parsing-error</a><br>
</p>
<p>Just a forewarning, I will try to be as extensive with my question as possible. Due to a number of reasons why this might not be working, I have posted all sorts of portions of my debugging below.</p>
<p>Web map located <a href="http://rinnerweb.arts.ryerson.ca/moot2_dev" rel="nofollow" target="_blank">
here</a></p>
<p>Tile cache is being setup as a test run for the &quot;hii_5&quot; layer in OpenLayers. MapServer is the backend.</p>
<p>I am trying to get TileCache to cache images of my MapServer WMS. However, no images are produced. The TileCache is &quot;trying&quot; to load the tiles (as you can see on the live page), however, no images are returned.</p>



<p>When I follow the <a href="http://rinnerweb.arts.ryerson.ca/cgi-bin/tilecache.cgi?LAYERS=HII_railroads&amp;FORMAT=image/png&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;STYLES=&amp;SRS=EPSG:3857&amp;BBOX=-10592586.767623,5113378.756775,-9340242.496373,6365723.028025&amp;WIDTH=256&amp;HEIGHT=256" rel="nofollow" target="_blank">
path</a> of one of the image tiles, I see this error:</p>
<pre><code>An error occurred: File contains parsing errors: C:\ms4w\Apache\cgi-bin\tilecache.cfg
    [line 82]: &#39;  type=WMS\n&#39;
    [line 83]: &#39;  url=<a href="http://141.117.104.183/cgi-bin/mapserv.exe%5Cn" target="_blank">http://141.117.104.183/cgi-bin/mapserv.exe\n</a>&#39;
    [line 84]: &#39;  mapfile=C:/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map\n&#39;
    [line 85]: &#39;  extension=png\n&#39;
    [line 86]: &#39;  layers=HII_railroads\n&#39;
  File &quot;C:\ms4w\Apache\cgi-bin\TileCache\Service.py&quot;, line 85, in _load
    config.read(files)
  File &quot;C:\Python27\lib\ConfigParser.py&quot;, line 297, in read
    self._read(fp, filename)
  File &quot;C:\Python27\lib\ConfigParser.py&quot;, line 538, in _read
    raise e
</code></pre>
<ul>
<li>I&#39;ve run a <a href="http://rinnerweb.arts.ryerson.ca/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/moot2_dev/hii_railroads.map&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetCapabilities" rel="nofollow" target="_blank">
GetCapabilities</a> request and there are no warnings </li><li>but <a href="http://rinnerweb.arts.ryerson.ca/cgi-bin/mapserv.exe?map=/ms4w/apache/htdocs/moot2_dev/hii_railroads.map&amp;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;LAYERS=HII_railroads&amp;STYLES=&amp;SRS=EPSG:3857&amp;BBOX=-173.537,35.8775,-11.9603,83.8009&amp;WIDTH=400&amp;HEIGHT=300&amp;FORMAT=image/png" rel="nofollow" target="_blank">
GetMap</a> request returns a blank page </li><li>and the <a href="http://rinnerweb.arts.ryerson.ca/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map&amp;" rel="nofollow" target="_blank">
template</a> return blank</li></ul>
<p>Here are the relevant mapfile, tilecache.cfg, and openlayers source:</p>
<p>Not sure how much help I will get here, but the questions out there for anyone to take a stab at it!</p>
<hr>
<p><b>hii_railroads.map</b></p>
<pre><code>MAP                                                     #-&gt; BEGIN MAP
    OUTPUTFORMAT                                        #-&gt; BEGIN OUTPUT FORMATTING DEFINITION
        NAME &quot;png&quot;                                      # Name of format
        DRIVER AGG/PNG                                  # Image driver
        MIMETYPE &quot;image/png&quot;                            # Type of image
        IMAGEMODE RGBA                                  # Image mode
        EXTENSION &quot;png&quot;                                 # Image filetype
        TRANSPARENT ON                                  # Transparency
    END                                                 #-&gt; END OUTPUT FORMATTING DEFINITION

    WEB                                                 #-&gt; BEGIN WEB DEFINITION

        METADATA
            &quot;wms_title&quot;           &quot;HII_railroads&quot;
            &quot;wms_onlineresource&quot;  &quot;<a href="http://rinnerweb.arts.ryerson.ca/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map&amp;" target="_blank">http://rinnerweb.arts.ryerson.ca/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map&amp;</a>&quot;
            &quot;wms_srs&quot;             &quot;EPSG:3857&quot;
            &quot;ows_enable_request&quot;  &quot;*&quot;
        END

        TEMPLATE &quot;template.html&quot;
        IMAGEPATH &quot;/ms4w/tmp/ms_tmp/&quot;
        IMAGEURL &quot;/ms_tmp/&quot;
    END                                                 #-&gt; END WEB DEFINITION

LAYER                                                   #-&gt; BEGIN LAYER DEFINITION: Railroads &lt;-#

    METADATA
        &quot;wms_title&quot; &quot;HII_railroads&quot;
    END

    NAME    HII_railroads                               # Layer identifier
    DATA    &quot;data/wgs84/railroads_360.tif&quot;              # Name of the data (in this case, string identifying a raster)
    STATUS  ON     
</code></pre>
<hr>
<p><b>tilecache.cfg</b></p>
<pre><code>[HII_railroads]
  type=WMS
  url=<a href="http://141.117.104.183/cgi-bin/mapserv.exe" target="_blank">http://141.117.104.183/cgi-bin/mapserv.exe</a>
  mapfile=C:/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map
  extension=png
  layers=HII_railroads
</code></pre>
<hr>
<p><b>index.html</b></p>
<pre><code>hii_5 = new OpenLayers.Layer.WMS(&quot;Railroads&quot;,&quot;../../cgi-bin/tilecache.cgi?&quot;,{
    layers:&quot;HII_railroads&quot;,
    format:&quot;image/png&quot;},{
    isBaseLayer:false,
    transparent:true,
    format:&quot;image/png&quot;,
    alpha:true,
    displayInLayerSwitcher:false
    });
</code></pre>
</div>
<br>
<font face="verdana,sans-serif"><br clear="all">
</font>
<div><font color="#333333" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Michael Markieta - <a href="tel:%28416%29%20833%205581" value="+14168335581" target="_blank">(416) 833 5581</a></font></div>
<div><font color="#cccccc" face="&#39;trebuchet ms&#39;, sans-serif" size="1">------------------------------------------------------</font></div>
<div><font color="#666666" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Research Assistant - Department of Geography &amp;</font></div>
<div><font color="#666666" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Bachelor of Arts Candidate - Geographic Analysis</font></div>
<div><font color="#999999" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Ryerson University</font></div>
<div><font color="#999999" face="&#39;trebuchet ms&#39;, sans-serif" size="1">Toronto, ON, Canada</font></div>
<div><font color="#cccccc" face="&#39;trebuchet ms&#39;, sans-serif" size="1">------------------------------------------------------</font></div>
<div><font color="#333333" face="&#39;trebuchet ms&#39;, sans-serif" size="1"><a href="http://www.spatialanalysis.ca" target="_blank">www.spatialanalysis.ca</a></font></div>
<br>
</div></div></blockquote>
</div>

</blockquote></div><br>
</div></div></blockquote></div><br>