{"action":"created","issue":{"url":"https://api.github.com/repos/scrooloose/syntastic/issues/1306","labels_url":"https://api.github.com/repos/scrooloose/syntastic/issues/1306/labels{/name}","comments_url":"https://api.github.com/repos/scrooloose/syntastic/issues/1306/comments","events_url":"https://api.github.com/repos/scrooloose/syntastic/issues/1306/events","html_url":"https://github.com/scrooloose/syntastic/issues/1306","id":55235373,"number":1306,"title":"Python 3.x error: checker python/python returned abnormal status 1 (ValueError: Attempted relative import in non-package)","user":{"login":"benjaminbrent","id":1594962,"avatar_url":"https://avatars.githubusercontent.com/u/1594962?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaminbrent","html_url":"https://github.com/benjaminbrent","followers_url":"https://api.github.com/users/benjaminbrent/followers","following_url":"https://api.github.com/users/benjaminbrent/following{/other_user}","gists_url":"https://api.github.com/users/benjaminbrent/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaminbrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaminbrent/subscriptions","organizations_url":"https://api.github.com/users/benjaminbrent/orgs","repos_url":"https://api.github.com/users/benjaminbrent/repos","events_url":"https://api.github.com/users/benjaminbrent/events{/privacy}","received_events_url":"https://api.github.com/users/benjaminbrent/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-23T01:52:13Z","updated_at":"2015-01-23T07:51:19Z","closed_at":"2015-01-23T07:51:19Z","body":"When using Syntastic with a Python 3.x file inside a package with a relative import, I receive the following:\r\n\r\n```\r\nsyntastic: 49.752754: &shell = '/bin/zsh', &shellcmdflag = '-c', &shellpipe = '2>&1| tee', &shellquote = '', &shellredir = '>%s 2>&1', &shellslash = 0, &shelltemp = 1, &shellxquote = '', &shellxescape = ''       \r\nsyntastic: 49.753021: UpdateErrors (auto): default checkers                                                                                                                                                         \r\nsyntastic: 49.753379: CacheErrors: default checkers                                                                                                                                                                 \r\nsyntastic: 49.754138: g:syntastic_aggregate_errors = 0                                                                                                                                                              \r\nsyntastic: 49.754334: getcwd() = /home/benjamin/Repos/YCSB-runner                                                                                                                                                   \r\nsyntastic: 49.754727: CacheErrors: Invoking checker: python/python                                                                                                                                                  \r\nsyntastic: 49.755590: SyntasticMake: called with options: {'errorformat': '%E%f:%l:%c: %m', 'makeprg': 'python3 runner/dbsystem.py', 'env': {'TERM': 'dumb'}, 'returns': [0]}                                       \r\nsyntastic: 49.817694: checker output: ['Traceback (most recent call last):', '  File \"runner/dbsystem.py\", line 3, in <module>', '    from . import constants as const', 'ValueError: Attempted relative import in n\r\non-package', '']                                                                                                                                                                                                    \r\nsyntastic: error: checker python/python returned abnormal status 1                                                                                                                                                  \r\nsyntastic: 49.818354: python/python raw: []                                                                                                                                                                         \r\nsyntastic: 49.818589: quiet_messages filter: {}                                                                                                                                                                     \r\nsyntastic: 49.818899: CacheErrors: Checker python/flake8 is not available                                                                                                                                           \r\nsyntastic: 49.819082: CacheErrors: Checker python/pylint is not available                                                                                                                                           \r\nsyntastic: 49.819317: aggregated: {'_sorted': 0, '_name': '', '_owner': 1, '_columns': 1, '_rawLoclist': []}                                                                                                        \r\nPress ENTER or type command to continue\r\n```\r\n\r\nTo get the above output, I opened the Python file and ran the following in vim:\r\n\r\n```\r\n:let g:syntastic_python_python_exe = 'python3'\r\n:let g:syntastic_debug=3\r\n:SyntasticCheck python\r\n:mes\r\n```\r\n\r\nThe Python file in question is inside a package and contains the following relative import at the top:\r\n\r\n```python\r\nfrom . import constants as const\r\n```\r\n\r\nThe main error here is the one from Python: `ValueError: Attempted relative import in non-package`."},"comment":{"url":"https://api.github.com/repos/scrooloose/syntastic/issues/comments/71158539","html_url":"https://github.com/scrooloose/syntastic/issues/1306#issuecomment-71158539","issue_url":"https://api.github.com/repos/scrooloose/syntastic/issues/1306","id":71158539,"user":{"login":"lcd047","id":1281736,"avatar_url":"https://avatars.githubusercontent.com/u/1281736?v=3","gravatar_id":"","url":"https://api.github.com/users/lcd047","html_url":"https://github.com/lcd047","followers_url":"https://api.github.com/users/lcd047/followers","following_url":"https://api.github.com/users/lcd047/following{/other_user}","gists_url":"https://api.github.com/users/lcd047/gists{/gist_id}","starred_url":"https://api.github.com/users/lcd047/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcd047/subscriptions","organizations_url":"https://api.github.com/users/lcd047/orgs","repos_url":"https://api.github.com/users/lcd047/repos","events_url":"https://api.github.com/users/lcd047/events{/privacy}","received_events_url":"https://api.github.com/users/lcd047/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T07:51:19Z","updated_at":"2015-01-23T07:51:19Z","body":"That's because `<mumble>_exe` and `<mumble>_exec` are both meaningful to syntastic, and they do very different things (stupid choice of option names, I know).  You want to set `g:syntastic_python_python_exec` rather than `g:syntastic_python_python_exe`."}}