{"action":"created","issue":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/517","labels_url":"https://api.github.com/repos/spyder-ide/spyder/issues/517/labels{/name}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/issues/517/comments","events_url":"https://api.github.com/repos/spyder-ide/spyder/issues/517/events","html_url":"https://github.com/spyder-ide/spyder/issues/517","id":57865976,"number":517,"title":"img_path undefined in spyderlib/config.py when wrapped with py2exe","user":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/1%20star","name":"1 star","color":"FFFFFF"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/imported","name":"imported","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-16T23:53:35Z","updated_at":"2015-02-16T23:53:36Z","closed_at":null,"body":"_From [hpantoli...@gmail.com](https://code.google.com/u/111136140825071405832/) on 2011-01-02T04:06:21Z_\n\n\\> \n\nWhat steps will reproduce the problem?\n\n\r\n\r\n'import spyder' from inside a py2exe-wrapped program seems to \r\ntrigger this.  in my specific case:\r\n\r\n  from spyderlib.widgets.internalshell import InternalShell\r\n  import spyder\r\n\r\n  ...\r\n\r\n  sh = InternalShell(...)\r\n\r\ngives the traceback :\r\n\r\n  ... my code ...\r\n  File \"spyderlib\\widgets\\internalshell.pyc\", line 96, in __init__\r\n  File \"spyderlib\\widgets\\shell.pyc\", line 695, in __init__\r\n  File \"spyderlib\\widgets\\shell.pyc\", line 69, in __init__\r\n  File \"spyderlib\\widgets\\internalshell.pyc\", line 201, in setup_context_menu\r\n  File \"spyderlib\\widgets\\shell.pyc\", line 727, in setup_context_menu\r\n  File \"spyderlib\\widgets\\shell.pyc\", line 111, in setup_context_menu\r\n  File \"spyderlib\\config.pyc\", line 362, in get_icon\r\n  File \"spyderlib\\config.pyc\", line 357, in get_image_path\r\nUnboundLocalError: local variable 'img_path' referenced before assignment\r\n\r\n\r\nso the proximal cause is that img_path does not have a value if\r\nthe default image name is to be used.  ultimately, there may be a \r\nlarger issue with IMG_PATH under py2exe.\r\n\r\n\\> What is the expected output? What do you see instead?\r\n\r\nsee above.\r\n\r\n\\> What version of the product are you using? On what operating system?\r\n\r\nspyder-2.0.5_py26.exe, win xp.\n\n_Original issue: http://code.google.com/p/spyderlib/issues/detail?id=517_"},"comment":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/comments/74592955","html_url":"https://github.com/spyder-ide/spyder/issues/517#issuecomment-74592955","issue_url":"https://api.github.com/repos/spyder-ide/spyder/issues/517","id":74592955,"user":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"created_at":"2015-02-16T23:53:36Z","updated_at":"2015-02-16T23:53:36Z","body":"_From [pierre.raybaut](https://code.google.com/u/pierre.raybaut/) on 2011-01-12T13:16:04Z_\n\nPlease take a look at the application example now included in Spyder source package, on Mercurial repository only for now but it will be in the next release of course: https://code.google.com/p/spyderlib/source/browse/app_example/example.pyw https://code.google.com/p/spyderlib/source/browse/app_example/setup.py"}}