springmeyer / quantumnik

Python integration of Mapnik with Quantum GIS
http://plugins.qgis.org/plugins/quantumnik/
BSD 3-Clause "New" or "Revised" License
36 stars 9 forks source link

'module' object has no attribute 'GlyphSymbolizer' #4

Open gisupc opened 11 years ago

gisupc commented 11 years ago

I compile the mapnik2.1.0 Release with Python2.7.3. when I enter “import mapnik” ,it's ok! the "rundemo.py" also run ok, but the plugins geterror like:

Couldn't load plugin 'quantumnik' from ['C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python', 'C:/Users/gc/.qgis//python', 'C:/Users/gc/.qgis//python/plugins', 'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python/plugins', 'C:\mapnik-2.1.0release\python\2.7\site-packages', 'C:\Windows\system32\python27.zip', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\DLLs', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\plat-win', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\lib-tk', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\qgis\bin', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\qgis\python\plugins\fTools\tools']

Traceback (most recent call last): File "C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python\qgis\utils.py", line 143, in loadPlugin import(packageName) File "C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/gc/.qgis//python/plugins\quantumnikinit.py", line 3, in from quantumnik import Quantumnik, NAME File "C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/gc/.qgis//python/plugins\quantumnik\quantumnik.py", line 13, in import mapnik2 as mapnik File "C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python\qgis\utils.py", line 309, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\mapnik-2.1.0release\python\2.7\site-packages\mapnik2init.py", line 23, in from mapnik import * AttributeError: 'module' object has no attribute 'GlyphSymbolizer'

Python version: 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]

QGIS version: 1.8.0-Lisboa Lisboa, 6416f38

Python path: ['C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python', 'C:/Users/gc/.qgis//python', 'C:/Users/gc/.qgis//python/plugins', 'C:/PROGRA~2/Quantum GIS Lisboa/apps/qgis/./python/plugins', 'C:\mapnik-2.1.0release\python\2.7\site-packages', 'C:\Windows\system32\python27.zip', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\DLLs', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\plat-win', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\lib-tk', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\qgis\bin', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\PIL', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\win32', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\win32\lib', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\Pythonwin', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\Python27\lib\site-packages\wx-2.8-msw-unicode', 'C:\PROGRA~2\Quantum GIS Lisboa\apps\qgis\python\plugins\fTools\tools']

gisupc commented 11 years ago

when I enter " import mapnik " ok,but when enter "from mapnik import*",it get error like:

import mapnik from mapnik import*

Traceback (most recent call last): File "<pyshell#14>", line 1, in from mapnik import* AttributeError: 'module' object has no attribute 'GlyphSymbolizer'

gisupc commented 11 years ago

if I enter " import mapnik2 dir(mapnik2) " the result is: ['BoostPythonMetaclass', 'Box2d', 'BuildingSymbolizer', 'COLORIZER_DISCRETE', 'C OLORIZER_EXACT', 'COLORIZER_INHERIT', 'COLORIZERLINEAR', 'CharProperties', 'Col or', 'ColorizerMode', 'ColorizerStop', 'ColorizerStops', 'CompositeOp', 'Context ', 'Coord', 'CreateDatasource', 'DataGeometryType', 'DataType', 'Datasource', 'D atasourceCache', 'Envelope', 'Expression', 'ExpressionSet', 'Feature', 'Features et', 'Filter', 'FontEngine', 'FontSet', 'FormattingExpressionFormat', 'Formattin gFormat', 'FormattingList', 'FormattingNode', 'FormattingText', 'Gdal', 'Geometr y2d', 'GeometryType', 'Geos', 'Grid', 'GridView', 'Image', 'ImageView', 'Kismet' , 'LabelCollisionDetector', 'Layer', 'Layers', 'LinePatternSymbolizer', 'LineSym bolizer', 'Map', 'MarkersSymbolizer', 'MemoryDatasource', 'Names', 'Occi', 'Ogr' , 'Osm', 'Palette', 'Parameter', 'Parameters', 'Path', 'PathExpression', 'PointS ymbolizer', 'PolygonPatternSymbolizer', 'PolygonSymbolizer', 'PostGIS', 'Process edText', 'ProjTransform', 'Projection', 'Python', 'PythonDatasource', 'Query', ' Raster', 'RasterColorizer', 'RasterSymbolizer', 'Rasterlite', 'Rule', 'Rules', ' SQLite', 'Shapefile', 'ShieldSymbolizer', 'Singleton', 'Stroke', 'Style', 'Symbo lizer', 'Symbolizers', 'TextPlacementInfo', 'TextPlacements', 'TextSymbolizer', 'TextSymbolizerProperties', 'ViewTransform', 'builtins', 'doc', '**file _', '__name', 'package', 'path', 'warningregistry**', 'aspect_fix_mo de', 'bootstrap_env', 'clear_cache', 'filtermode', 'fontscollectionpath', 'forw ard', 'gamma_method', 'has_cairo', 'has_jpeg', 'has_pycairo', 'horizontalalign ment', 'inputpluginspath', 'inverse', 'itertools', 'justifyalignment', 'label placement', 'line_cap', 'line_join', 'line_rasterizer', 'load_map', 'load_map_fr om_string', 'logger', 'mapnik_version', 'mapnik_version_from_string', 'mapnik_ve rsion_string', 'marker_placement', 'msg', 'os', 'paths', 'pattern_alignment', 'p oint_placement', 'printing', 'register_fonts', 'register_plugins', 'render', 're nder_grid', 'render_layer', 'render_tile_to_file', 'render_to_file', 'render_wit h_detector', 'save_map', 'save_map_to_string', 'scale_denominator', 'scaling_met hod', 'severity_type', 'sys', 'text_transform', 'vertical_alignment', 'warnings' , 'wkbByteOrder']