On 16 Feb 2008, at 16:05, Artem Pavlenko wrote:

> Hi Hans,
>
> On 16 Feb 2008, at 15:45, Hank Sims wrote:
>
>>      Hi all:
>>
>>      I'm trying to get the Mapnik WMS server (from v. 0.5) up and
>> running on my Ubuntu Gutsy box, but I keep running into the same
>> import error:
>>
>> Traceback (most recent call last):
>>   File "./wms", line 9, in <module>
>>     from mapnik.ogcserver.cgiserver import Handler
>>   File "/usr/lib/python2.5/site-packages/mapnik/ogcserver/
>> cgiserver.py", line 29, in <module>
>>     from wms111 import ExceptionHandler as ExceptionHandler111
>>   File "/usr/lib/python2.5/site-packages/mapnik/ogcserver/
>> wms111.py", line 22, in <module>
>>     from common import ParameterDefinition, Response, Version,
>> ListFactory, \
>>   File "/usr/lib/python2.5/site-packages/mapnik/ogcserver/
>> common.py", line 23, in <module>
>>     from mapnik import Map, Color, Envelope, render, rawdata,
>> Image, Projection as MapnikProjection, render_to_file, Coord
>> ImportError: cannot import name rawdata
>>
>>      For what it's worth, mapnik itself seems to work fine. I've
>> drawn a couple of sample maps with it.
>>
>>      I've tested this error from the shell, and "rawdata" seems to
>> be the only module that won't import.
>>      My general setup and configuration is based on Matt Perry's
>> little tutorial.
>>      Any ideas? I've already installed and reinstalled.
>>
>>      Thanks much,
>
>
> It looks like WMS hasn't been updated to reflect last moment change
> to Python bindings. I'll need to install WMS on my development
> machine to test it properly (and I will asap) but here is something
> that might just work  - replace GetMap in common.py with :
>
> # Untested !!!!
> def GetMap(self, params):
>          m = self._buildMap(params)
>          im = Image(params['width'], params['height'])
>          render(m, im)
>          return Response(params['format'], im.tostring(params 
> ['format'])


And remove reference to rawdata in import  .....


>
>
> Let me know if it works for you.
>
> Cheers
> Artem
>
>>
>>
>> -- 
>>     Hank Sims
>>     Editor
>>     North Coast Journal
>>     (707) 826-2000
>> _______________________________________________
>> Mapnik-users mailing list
>> [email protected]
>> https://lists.berlios.de/mailman/listinfo/mapnik-users
>
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
>

_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users

Reply via email to