Ken-ichi,

On the Mapnik Dev list a Robert ran into your same NoneType error and  
has an explanation/fix.

See his 
email:https://lists.berlios.de/pipermail/mapnik-devel/2008-April/000614.html

Do report back if that works for you,

Cheers,

Dane


On Apr 17, 2008, at 3:09 PM, Ken-ichi wrote:

> Hey Dane,
>
> (You are a support super hero today!)  Thanks for the tip.  I tried it
> (after rebuilding boost and python), but still a no-go.  Here's what I
> did:
>
> mapnik-0.5.1 > printenv
> ...
> PATH=/opt/local/lib/postgresql82/bin:/opt/local/apache2/bin:/opt/ 
> local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/ 
> opt/local/lib/mysql5/bin/:/bin:/sbin:/usr/bin:/usr/sbin
> ...
>
> mapnik-0.5.1 > python scons/scons.py DEBUG=y
> scons: Reading SConscript files ...
> Building on Darwin ...
> Checking for C library m... (cached) yes
> Checking for C library ltdl... (cached) yes
> Checking for C library png... (cached) yes
> Checking for C library tiff... (cached) yes
> Checking for C library z... (cached) yes
> Checking for C library jpeg... (cached) yes
> Checking for C library proj... (cached) yes
> Checking for C library iconv... (cached) yes
> Checking for C library pq... (cached) no
> Checking for C++ library gdal... (cached) yes
> Checking for C++ library boost_filesystem-mt... (cached) yes
> Checking for C++ library boost_regex-mt... (cached) yes
> Checking for C++ library boost_iostreams-mt... (cached) yes
> Checking for C++ library boost_program_options-mt... (cached) yes
> Checking for C++ library boost_thread-mt... (cached) yes
> Bindings Python version... 2.5
> Python 2.5 prefix... /opt/local
> scons: done reading SConscript files.
> scons: Building targets ...
> ...
> scons: done building targets.
>
> mapnik-0.5.1 > sudo python scons/scons.py DEBUG=y install
> ...
> scons: done building targets.
>
> mapnik-0.5.1 > python
> Python 2.5.2 (r252:60911, Apr 17 2008, 13:25:37)
> [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from mapnik import *
> registered datasource : gdal
> registered datasource : raster
> registered datasource : shape
>>>> m = Map(600,300,"+proj=latlong +datum=WGS84")
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: __init__() should return None, not 'NoneType'
>
>
> This is on my OS 10.4 system at work.  I'll try it under 10.5 when I
> get home (I've gotten the same error on both systems in the past).
>
> -Ken-ichi
>
>
>
> On Thu, Apr 17, 2008 at 12:47 PM, Dane Springmeyer  
> <[EMAIL PROTECTED]> wrote:
>> Hi Ken,
>>
>> So you are still trying to avoid those nonetype errors, huh?  Well, I
>> just looked back at your email and yes: from my experience with
>> compiling mapnik dependencies macports has been troublesome.  I would
>> recommend trying to compile the mapnik libs in the default /usr/ 
>> local/
>> lib/mapnik location.
>>
>> I still rely on macports for the boost libraries and a few image
>> libaries, and scons is able to find them in /opt/local/ without
>> explicitly setting those path during the scons build as long as the
>> macports binaries are on my path (export PATH=/opt/local/bin:/opt/
>> local/sbin:$PATH).
>>
>> So my build just looks like this:
>>
>> python scons/scons.py DEBUG=y PGSQL_INCLUDES=/usr/local/pgsql/include
>> PGSQL_LIBS=/usr/local/pgsql/lib
>>
>> Dane
>>
>>
>>
>> On Apr 17, 2008, at 11:49 AM, Ken-ichi wrote:
>>
>>
>>
>>> Hi Claire,
>>>
>>> I'm still struggling to get mapnik installed myself, but here are
>>> somethings you can try:
>>>
>>> - check when version of python you're running with
>>>
>>> which python
>>>
>>> and make sure that's the same framework python for which you
>>> installed mapnik.
>>>
>>>
>>> - in your mapnik src dir, try
>>>
>>> python scons/scons.py -h
>>>
>>> with whatever flags you initially used to compile and make sure that
>>> all the paths line up with what you might expect.  It's possible you
>>> have another copy of python installed on your system (e.g. the
>>> MacPorts version), and mapnik installed itself there instead of  
>>> where
>>> you think.
>>>
>>> Hope that helps a little.
>>>
>>>
>>> -Ken-ichi
>>>
>>>
>>>
>>> On Thu, Apr 17, 2008 at 10:35 AM, Claire McLister
>>> <[EMAIL PROTECTED]> wrote:
>>>> Hi,
>>>>
>>>> I just managed to get mapnik compiled and installed on Mac OS X.
>>>>
>>>> When I invoke python and try to import mapnik, I get the following
>>>> error:
>>>>
>>>> Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16)
>>>> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
>>>> Type "help", "copyright", "credits" or "license" for more
>>>> information.
>>>>>>> from mapnik import *
>>>> Traceback (most recent call last):
>>>>  File "<stdin>", line 1, in <module>
>>>> ImportError: No module named mapnik
>>>>>>>
>>>>
>>>> If I look under the site-packages directory for python, mapnik.so
>>>> seems to be there:
>>>>
>>>> [zeemac:site-packages]$ ls -l /System/Library/Frameworks/
>>>> Python.framework/Versions/2.5/lib/python2.5/site-packages/mapnik/
>>>> total 5248
>>>> -rw-r--r--   1 root  wheel     2911 Sep 25  2007 __init__.py
>>>> -rwxr-xr-x   1 root  wheel  2675520 Apr 17 10:04 _mapnik.so*
>>>> drwxr-xr-x  11 root  wheel      374 Apr 17 10:09 ogcserver/
>>>> -rw-r--r--   1 root  wheel      132 Apr 17 10:09 paths.py
>>>> [zeemac:site-packages]$
>>>>
>>>> Can someone please point me in the right direction?
>>>>
>>>> Thanks
>>>>
>>>> Claire
>>>>
>>>> --
>>>> Claire McLister                        [EMAIL PROTECTED]
>>>> 21060 Homestead Road Suite 150
>>>> Cupertino, CA 95014            408-733-2737(fax)
>>>>
>>>>                     http://www.zeemaps.com
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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
>>

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

Reply via email to