{"action":"created","issue":{"url":"https://api.github.com/repos/ARM-DOE/pyart/issues/239","labels_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/239/labels{/name}","comments_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/239/comments","events_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/239/events","html_url":"https://github.com/ARM-DOE/pyart/issues/239","id":56693756,"number":239,"title":"undefined symbol","user":{"login":"rvalenzuelar","id":6894066,"avatar_url":"https://avatars.githubusercontent.com/u/6894066?v=3","gravatar_id":"","url":"https://api.github.com/users/rvalenzuelar","html_url":"https://github.com/rvalenzuelar","followers_url":"https://api.github.com/users/rvalenzuelar/followers","following_url":"https://api.github.com/users/rvalenzuelar/following{/other_user}","gists_url":"https://api.github.com/users/rvalenzuelar/gists{/gist_id}","starred_url":"https://api.github.com/users/rvalenzuelar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvalenzuelar/subscriptions","organizations_url":"https://api.github.com/users/rvalenzuelar/orgs","repos_url":"https://api.github.com/users/rvalenzuelar/repos","events_url":"https://api.github.com/users/rvalenzuelar/events{/privacy}","received_events_url":"https://api.github.com/users/rvalenzuelar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-02-05T16:32:57Z","updated_at":"2015-02-16T21:16:28Z","closed_at":"2015-02-16T18:10:45Z","body":"I'm getting the following message when I try to import pyart:\r\n\r\n```python\r\nIn [2]: import pyart\r\n---------------------------------------------------------------------------\r\nImportError                               Traceback (most recent call last)\r\n<ipython-input-2-706b47c96bb9> in <module>()\r\n----> 1 import pyart\r\n\r\n/usr/local/lib/python2.7/dist-packages/pyart/__init__.py in <module>()\r\n     11 # import subpackages\r\n     12 from . import core\r\n---> 13 from . import io\r\n     14 from . import correct\r\n     15 from . import graph\r\n\r\n/usr/local/lib/python2.7/dist-packages/pyart/io/__init__.py in <module>()\r\n     32     _RSL_AVAILABLE = False\r\n     33 from .mdv import read_mdv\r\n---> 34 from .sigmet import read_sigmet\r\n     35 from .chl import read_chl\r\n     36 from .cfradial import read_cfradial, write_cfradial\r\n\r\n/usr/local/lib/python2.7/dist-packages/pyart/io/sigmet.py in <module>()\r\n     24 from ..core.radar import Radar\r\n     25 from .common import make_time_unit_str\r\n---> 26 from ._sigmetfile import SigmetFile, bin4_to_angle, bin2_to_angle\r\n     27 from . import _sigmet_noaa_hh\r\n     28 \r\n\r\nImportError: /usr/local/lib/python2.7/dist-packages/pyart/io/_sigmetfile.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/ARM-DOE/pyart/issues/comments/74573624","html_url":"https://github.com/ARM-DOE/pyart/issues/239#issuecomment-74573624","issue_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/239","id":74573624,"user":{"login":"rvalenzuelar","id":6894066,"avatar_url":"https://avatars.githubusercontent.com/u/6894066?v=3","gravatar_id":"","url":"https://api.github.com/users/rvalenzuelar","html_url":"https://github.com/rvalenzuelar","followers_url":"https://api.github.com/users/rvalenzuelar/followers","following_url":"https://api.github.com/users/rvalenzuelar/following{/other_user}","gists_url":"https://api.github.com/users/rvalenzuelar/gists{/gist_id}","starred_url":"https://api.github.com/users/rvalenzuelar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rvalenzuelar/subscriptions","organizations_url":"https://api.github.com/users/rvalenzuelar/orgs","repos_url":"https://api.github.com/users/rvalenzuelar/repos","events_url":"https://api.github.com/users/rvalenzuelar/events{/privacy}","received_events_url":"https://api.github.com/users/rvalenzuelar/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T21:16:28Z","updated_at":"2015-02-16T21:16:28Z","body":"I checked the python sys.maxunicode and I got:\r\n\r\n- Miniconda python (e.g. /home/raul/miniconda/bin/python): UCS4\r\n- System python (e.g. /usr/bin/python): UCS4\r\n- Canopy python (e.g. /home/raul/Enthought/Canopy_32bit/User/bin/python): UCS2\r\n\r\nThen, I <code>ldd</code> _sigmetfile.so and I get:\r\n\r\nMiniconda:\r\n```bash\r\nraul@raul-ubuntu:~/miniconda/envs/_test/lib/python2.7/site-packages/pyart/io$ ldd _sigmetfile.so \r\n\tlinux-gate.so.1 =>  (0xb76e5000)\r\n\tlibpython2.7.so.1.0 => /home/raul/miniconda/envs/_test/lib/python2.7/site-packages/pyart/io/./../../../../libpython2.7.so.1.0 (0xb74ce000)\r\n\tlibpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7498000)\r\n\tlibc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb72e8000)\r\n\tlibdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb72e3000)\r\n\tlibutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xb72df000)\r\n\tlibm.so.6 => /home/raul/miniconda/envs/_test/lib/python2.7/site-packages/pyart/io/./../../../.././libm.so.6 (0xb72b6000)\r\n\t/lib/ld-linux.so.2 (0xb76e6000)\r\n```\r\nSystem:\r\n```bash\r\nraul@raul-ubuntu:/usr/local/lib/python2.7/dist-packages/pyart/io$ ldd _sigmetfile.so \r\n\tlinux-gate.so.1 =>  (0xb7776000)\r\n\tlibpython2.7.so.1.0 => /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 (0xb73a0000)\r\n\tlibpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7384000)\r\n\tlibc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb71d4000)\r\n\tlibz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb71ba000)\r\n\tlibdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb71b5000)\r\n\tlibutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xb71b1000)\r\n\tlibm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb716b000)\r\n\t/lib/ld-linux.so.2 (0xb7777000)\r\n```\r\nand Canopy:\r\n```bash\r\nraul@raul-ubuntu:~/Enthought/Canopy_32bit/User/lib/python2.7/site-packages/pyart/io$ ldd _sigmetfile.so \r\n\tlinux-gate.so.1 =>  (0xb77dd000)\r\n\tlibpython2.7.so.1.0 => /usr/lib/i386-linux-gnu/libpython2.7.so.1.0 (0xb7407000)\r\n\tlibpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb73eb000)\r\n\tlibc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb723b000)\r\n\tlibz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb7221000)\r\n\tlibdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb721c000)\r\n\tlibutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xb7218000)\r\n\tlibm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb71d2000)\r\n\t/lib/ld-linux.so.2 (0xb77de000)\r\n```\r\n\r\nHere is a point that still confuses me (I suspect I'm missing something here):\r\n\r\n-Miniconda python (UCS4) runs the test using _sigmetfile.so compiled with the Miniconda python (UCS4)\r\n-System python (UCS4) uses _sigmetfile.so compiled with system Python (UCS4)\r\n-Canopy python (UCS2) uses _sigmetfile.so compiled with system Python (UCS4) \r\n\r\nFrom this result I would expect to Canopy python to fail when calling pyart; nevertheless, the behavior is the following:\r\n\r\n- With Miniconda python (when building conda recipe): <code>undefined symbol: PyUnicodeUCS2_DecodeUTF8</code>\r\n- With System python: import pyart -->  <code>undefined symbol: PyUnicodeUCS2_DecodeUTF8</code>\r\n- With Canopy python: import pyart --> success (some warnings about plotting support show up)\r\n\r\nSo, if all <code>_sigmetfile.so</code> were compiled against a UCS4 libpython, why are they failing to compile with the UCS4 interpreters? Also, the error seems contradictory because is telling me that the module (sigmetfile) is UCS2 but <code>ldd</code> indicates that they are UCS4."}}