{"action":"created","issue":{"url":"https://api.github.com/repos/dahlia/libsass-python/issues/137","repository_url":"https://api.github.com/repos/dahlia/libsass-python","labels_url":"https://api.github.com/repos/dahlia/libsass-python/issues/137/labels{/name}","comments_url":"https://api.github.com/repos/dahlia/libsass-python/issues/137/comments","events_url":"https://api.github.com/repos/dahlia/libsass-python/issues/137/events","html_url":"https://github.com/dahlia/libsass-python/issues/137","id":141744464,"number":137,"title":"'module' object has no attribute 'compile'","user":{"login":"adamlwgriffiths","id":1239156,"avatar_url":"https://avatars.githubusercontent.com/u/1239156?v=3","gravatar_id":"","url":"https://api.github.com/users/adamlwgriffiths","html_url":"https://github.com/adamlwgriffiths","followers_url":"https://api.github.com/users/adamlwgriffiths/followers","following_url":"https://api.github.com/users/adamlwgriffiths/following{/other_user}","gists_url":"https://api.github.com/users/adamlwgriffiths/gists{/gist_id}","starred_url":"https://api.github.com/users/adamlwgriffiths/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamlwgriffiths/subscriptions","organizations_url":"https://api.github.com/users/adamlwgriffiths/orgs","repos_url":"https://api.github.com/users/adamlwgriffiths/repos","events_url":"https://api.github.com/users/adamlwgriffiths/events{/privacy}","received_events_url":"https://api.github.com/users/adamlwgriffiths/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-18T00:48:09Z","updated_at":"2016-03-18T02:27:11Z","closed_at":"2016-03-18T02:27:11Z","body":"I'm running Python 2.7.10 on Ubuntu 14.04 via Anaconda.\r\n\r\nRunning the example code I come across this.\r\n\r\n```\r\n$ pip freeze | grep libsass\r\nlibsass==0.10.1\r\n$ python\r\nPython 2.7.10 |Continuum Analytics, Inc.| (default, May 28 2015, 17:02:03)\r\n[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\nAnaconda is brought to you by Continuum Analytics.\r\nPlease check out: http://continuum.io/thanks and https://binstar.org\r\n>>> import sass\r\n>>> sass.__version__\r\n'2.2+libsass1.0.1'\r\n>>> print sass.compile(string='a { b { color: blue; } }')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nAttributeError: 'module' object has no attribute 'compile'\r\n>>> print sass.compile_string('a { b { color: blue; } }')\r\na b {\r\n  color: blue; }\r\n>>> dir(sass)\r\n['CompileError', 'SASS_STYLE_COMPACT', 'SASS_STYLE_COMPRESSED', 'SASS_STYLE_EXPANDED', 'SASS_STYLE_NESTED', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '__test__', '__version__', 'compile_file', 'compile_string']\r\n```\r\n\r\nI find the `__version__` value quite strange.\r\n\r\nThis is even more bizarre because the sass.py has the function `def compile(**kwargs)` in it.\r\n```\r\n$ cat ~/.anaconda/envs/systema/lib/python2.7/site-packages/sass.py | grep \"def compile(\"\r\ndef compile(**kwargs):\r\n```\r\n\r\nThis is also quite strange\r\n```\r\n>>> help(sass)\r\n<snip>\r\nFILE\r\n    /home/adamgriffiths/.anaconda/envs/systema/lib/python2.7/site-packages/sass.so\r\n<snip>\r\n```\r\nI would have expected that to be `sass.py`, `.pyc`, or `.pyo`"},"comment":{"url":"https://api.github.com/repos/dahlia/libsass-python/issues/comments/198167741","html_url":"https://github.com/dahlia/libsass-python/issues/137#issuecomment-198167741","issue_url":"https://api.github.com/repos/dahlia/libsass-python/issues/137","id":198167741,"user":{"login":"adamlwgriffiths","id":1239156,"avatar_url":"https://avatars.githubusercontent.com/u/1239156?v=3","gravatar_id":"","url":"https://api.github.com/users/adamlwgriffiths","html_url":"https://github.com/adamlwgriffiths","followers_url":"https://api.github.com/users/adamlwgriffiths/followers","following_url":"https://api.github.com/users/adamlwgriffiths/following{/other_user}","gists_url":"https://api.github.com/users/adamlwgriffiths/gists{/gist_id}","starred_url":"https://api.github.com/users/adamlwgriffiths/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamlwgriffiths/subscriptions","organizations_url":"https://api.github.com/users/adamlwgriffiths/orgs","repos_url":"https://api.github.com/users/adamlwgriffiths/repos","events_url":"https://api.github.com/users/adamlwgriffiths/events{/privacy}","received_events_url":"https://api.github.com/users/adamlwgriffiths/received_events","type":"User","site_admin":false},"created_at":"2016-03-18T02:27:10Z","updated_at":"2016-03-18T02:27:10Z","body":"Thanks for the tip.\r\nTurns out I had a library called `sass` shadowing libsass. I must've installed it a while ago.\r\n\r\n```\r\n$ pip freeze | grep sass\r\nlibsass==0.10.1\r\nsass==2.3\r\n```\r\n\r\nRemoving it fixed the problem.\r\nThanks again."}}