Bug 1357575

Summary: ImportError
Product: [Fedora] Fedora Reporter: Jozef Mlich <jmlich83>
Component: python-mapnikAssignee: Tom Hughes <tom>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: andreas.kriegl, hdfssk, mkolman, tom
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-mapnik-0.1-7.20160202git1cb6851.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-04 20:53:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
mapnik_test.py none

Description Jozef Mlich 2016-07-18 14:29:10 UTC
Created attachment 1181124 [details]
mapnik_test.py

Description of problem:
It seems mapnik binding doesn't work as expected in fedora 24.

Version-Release number of selected component (if applicable):
[imlich@localhost mapnik$ dnf info python3-mapnik
Installed Packages
Name        : python3-mapnik
Arch        : x86_64
Epoch       : 0
Version     : 0.1
Release     : 6.20151209gitdb7c1fd.fc24
Size        : 5.4 M
Repo        : @System
Summary     : Python bindings for Mapnik
URL         : https://github.com/mapnik/python-mapnik
License     : LGPLv2+
Description : Python bindings for Mapnik.

How reproducible:
always


Steps to Reproduce:
[imlich@localhost mapnik$ cat ./mapnik_test.py 
#!/usr/bin/python3

import mapnik

if __name__ == "__main__":
    print("hello world")
[imlich@localhost mapnik$ ./mapnik_test.py 
Traceback (most recent call last):
  File "./mapnik_test.py", line 3, in <module>
    import mapnik
  File "/usr/lib64/python3.5/site-packages/mapnik/__init__.py", line 74, in <module>
    from ._mapnik import *
ImportError: /usr/lib64/python3.5/site-packages/mapnik/_mapnik.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZN6mapnik10image_viewINS_5imageINS_9gray64s_tEEEED1Ev

Actual results:
ImportError

Expected results:
hello world

Comment 1 hdfssk 2016-07-22 17:43:18 UTC
This problem affects both python2-mapnik and python3-mapnik - both are unusable on an up to date f24 install.

Manually rebuilding the SRPM also fails, during tests:

======================================================================
ERROR: python_tests.png_encoding_test.test_expected_encodings
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/media/brugan/Work/Code/rpmbuild/BUILD/python-mapnik-db7c1fdb2e970bdc93ab439119465fa5c0df3a07/test/python_tests/png_encoding_test.py", line 62, in test_expected_encodings
    im.save(actual, opt)
RuntimeError: miniz support has been removed from Mapnik

======================================================================
FAIL: python_tests.cairo_test.test_passing_pycairo_context_svg
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/media/brugan/Work/Code/rpmbuild/BUILD/python-mapnik-db7c1fdb2e970bdc93ab439119465fa5c0df3a07/test/python_tests/cairo_test.py", line 114, in test_passing_pycairo_context_svg
    eq_(diff < 1500, True, msg)
AssertionError: diff in size (1835) between actual (/tmp/mapnik-cairo-context-test.svg) and expected(tests/python_tests/./images/pycairo/cairo-cairo-expected.svg)

----------------------------------------------------------------------
Ran 578 tests in 28.315s

FAILED (failures=1, errors=1)

Comment 2 Tom Hughes 2016-07-26 21:03:36 UTC
*** Bug 1360473 has been marked as a duplicate of this bug. ***

Comment 3 Fedora Update System 2016-07-27 11:50:07 UTC
python-mapnik-0.1-7.20160202git1cb6851.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-497daf15dc

Comment 4 Fedora Update System 2016-07-28 05:58:30 UTC
python-mapnik-0.1-7.20160202git1cb6851.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-497daf15dc

Comment 5 Andreas Kriegl 2016-07-29 11:04:56 UTC
I can confirm, that the upgrade to python-mapnik-0.1-7.20160202git1cb6851.fc24
resolved the problems.
Thanks for the prompt correction.

Comment 6 hdfssk 2016-07-30 19:38:05 UTC
python-mapnik-0.1-7.20160202git1cb6851.fc24 also runs as expected here.

Comment 7 Fedora Update System 2016-08-04 20:53:03 UTC
python-mapnik-0.1-7.20160202git1cb6851.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.