{"action":"created","issue":{"url":"https://api.github.com/repos/inducer/relate/issues/16","labels_url":"https://api.github.com/repos/inducer/relate/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/inducer/relate/issues/16/comments","events_url":"https://api.github.com/repos/inducer/relate/issues/16/events","html_url":"https://github.com/inducer/relate/issues/16","id":72760843,"number":16,"title":"Error on failing to create new course on Windows","user":{"login":"dzhuang","id":7379654,"avatar_url":"https://avatars.githubusercontent.com/u/7379654?v=3","gravatar_id":"","url":"https://api.github.com/users/dzhuang","html_url":"https://github.com/dzhuang","followers_url":"https://api.github.com/users/dzhuang/followers","following_url":"https://api.github.com/users/dzhuang/following{/other_user}","gists_url":"https://api.github.com/users/dzhuang/gists{/gist_id}","starred_url":"https://api.github.com/users/dzhuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzhuang/subscriptions","organizations_url":"https://api.github.com/users/dzhuang/orgs","repos_url":"https://api.github.com/users/dzhuang/repos","events_url":"https://api.github.com/users/dzhuang/events{/privacy}","received_events_url":"https://api.github.com/users/dzhuang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-03T06:50:20Z","updated_at":"2015-05-11T23:17:49Z","closed_at":"2015-05-03T16:55:24Z","body":"```\r\n[03/May/2015 14:18:48]\"POST /new-course/ HTTP/1.1\" 200 10638\r\nTraceback (most recent call last):\r\n  File \"F:\\tempgit\\forLocale\\relate\\course\\versioning.py\", line 192, in set_up_new_course\r\n    shutil.rmtree(repo_path)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 247, in rmtree\r\n    rmtree(fullname, ignore_errors, onerror)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 247, in rmtree\r\n    rmtree(fullname, ignore_errors, onerror)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 247, in rmtree\r\n    rmtree(fullname, ignore_errors, onerror)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 252, in rmtree\r\n    onerror(os.remove, fullname, sys.exc_info())\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 250, in rmtree\r\n    os.remove(fullname)\r\nWindowsError: [Error 32] : u'..\\\\demo\\\\.git\\\\objects\\\\pack\\\\pack-2e0d43fe4bf649ad323e3734efc2f3cd7ae7c71c.idx'\r\n```\r\n\r\nI see this <http://stackoverflow.com/questions/1889597/deleting-directory-in-python/1889686#1889686>. "},"comment":{"url":"https://api.github.com/repos/inducer/relate/issues/comments/101072515","html_url":"https://github.com/inducer/relate/issues/16#issuecomment-101072515","issue_url":"https://api.github.com/repos/inducer/relate/issues/16","id":101072515,"user":{"login":"dzhuang","id":7379654,"avatar_url":"https://avatars.githubusercontent.com/u/7379654?v=3","gravatar_id":"","url":"https://api.github.com/users/dzhuang","html_url":"https://github.com/dzhuang","followers_url":"https://api.github.com/users/dzhuang/followers","following_url":"https://api.github.com/users/dzhuang/following{/other_user}","gists_url":"https://api.github.com/users/dzhuang/gists{/gist_id}","starred_url":"https://api.github.com/users/dzhuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzhuang/subscriptions","organizations_url":"https://api.github.com/users/dzhuang/orgs","repos_url":"https://api.github.com/users/dzhuang/repos","events_url":"https://api.github.com/users/dzhuang/events{/privacy}","received_events_url":"https://api.github.com/users/dzhuang/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T23:17:49Z","updated_at":"2015-05-11T23:17:49Z","body":"```\r\nTraceback (most recent call last):\r\n  File \"E:\\git-trial\\course\\relate-upstream\\course\\versioning.py\", line 204, in set_up_new_course\r\n    shutil.rmtree(repo_path, onerror=remove_readonly)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 247, in rmtree\r\n    rmtree(fullname, ignore_errors, onerror)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 247, in rmtree\r\n    rmtree(fullname, ignore_errors, onerror)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 247, in rmtree\r\n    rmtree(fullname, ignore_errors, onerror)\r\n  File \"d:\\Python27\\lib\\shutil.py\", line 252, in rmtree\r\n    onerror(os.remove, fullname, sys.exc_info())\r\n  File \"E:\\git-trial\\course\\relate-upstream\\course\\versioning.py\", line 202, in remove_readonly\r\n    func(path)\r\nWindowsError: [Error 32] : u'D:\\\\document\\\\python\\\\course\\\\course-git\\\\wrong-demo\\\\.git\\\\objects\\\\pack\\\\pack-4f895822e704069af564b75b5ee68785063429ed.idx'\r\n```\r\n\r\nNow I think the problem is the directory is \"In use\" so that it failed to remove, as I use windows shell command `RD path/to/remove /S /Q ` (`deltree` equivalent in windows 7 shell), it prompt an exception that the .idx file and .pack file are currently used by another session, and cannot be deleted."}}