Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues creating a new course site #64

Closed
duwhop opened this issue Sep 4, 2015 · 10 comments
Closed

Issues creating a new course site #64

duwhop opened this issue Sep 4, 2015 · 10 comments

Comments

@duwhop
Copy link

duwhop commented Sep 4, 2015

Hello,

I wanted to know if it was possible to help me. I followed the instructions from the install page (http://documen.tician.de/relate/misc.html?highlight=css). I keep getting an error (WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'.....pack....idx'). I have been googling how to rectify this issue but I have been unsuccessful. I am working on a Windows machine. I have python 2.7.6 installed. I look forward to hearing from you soon thank you!

@inducer
Copy link
Owner

inducer commented Sep 6, 2015

What are you doing when this error is reported? How is it reported to you? What happens if you try that operation again?

@duwhop
Copy link
Author

duwhop commented Sep 6, 2015

Hello,

Thank you for the reply. I am pressing the "Validate and create" button to create a new course.
The message I get is as follows (in the powershell screen):
Traceback (most recent call last):
File "C:\Users\kjeanpie\Documents\SAILS\relate\course\versioning.py", line 220, in set_up_new_course
shutil.rmtree(repo_path, onerror=remove_readonly)
File "c:\python27_x64\Lib\shutil.py", line 248, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:\python27_x64\Lib\shutil.py", line 248, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:\python27_x64\Lib\shutil.py", line 248, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "c:\python27_x64\Lib\shutil.py", line 253, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\Users\kjeanpie\Documents\SAILS\relate\course\versioning.py", line 217, in remove_readonly
func(path)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'..\TestSAILS.git\objects\pack\pack-0fcac813d2c616ac3fc35e29f3936e0a436add6f.idx'

This is what I see via local host when I click the button:
Failed to delete unused repository directory '..\TestSAILS'.
Course creation failed: WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'..\TestSAILS.git\objects\pack\pack-0fcac813d2c616ac3fc35e29f3936e0a436add6f.idx'

Each time I try to do it, I get the same error message. Several times I have tried to name it differently, but I get the same thing. I have googled the message (WindowsError: [Error 32]), but I can't seem to find a resolution that works. Any help to help me get to a resolution will greatly appreciated!

@dzhuang
Copy link
Contributor

dzhuang commented Sep 7, 2015

Seems duplicate #16 .

For windows, when setting up a new course with a repo which failed to pass validation, windows fails to remove the repo directory due to permission, that will cause the error. Better start from a simple repo which can pass validation, then update the repo.

@duwhop
Copy link
Author

duwhop commented Sep 9, 2015

When you say start from a simple repo do you mean move my relate folder to another directory? I have moved the folder to a few other directories and tried to build, but I get the same error. I saw this online as a possible workaround (kfogel/OneTime#13), but I'm not sure how to apply it to this project (made a guess as to the shutil.py file in regards to making a call to the os.remove function). Thank you in advance for your help.

@dzhuang
Copy link
Contributor

dzhuang commented Sep 9, 2015

My suggestion is, you can fork the sample repo as a new repo, and set up new course with it.

After the course is set up, copy your original code/files into that forked repo, commit it. Then update the course content on you site.

I guess the reason of your error is your course material failed validation, which might be caused by syntax error or duplicated id or something else. The first step above is to ensure you pass the validation stage with a valid repo, and the directory can be created without problem. The second step will help you to identified the issues with your code, since the course has been created successfully.

@duwhop
Copy link
Author

duwhop commented Sep 9, 2015

Ok awesome. It worked. I still kept getting the error, but on textfield where it asked for the "Course root directory" I left it blank. I wasn't sure if I was supposed to put something in there in the first place. Thank you both so much for your time and help with this situation!!

@dzhuang
Copy link
Contributor

dzhuang commented Sep 10, 2015

Glad if it helps. The Course root directory field is an optional field which is introduced recently, and I've just tried to set up a new course leaving that field blank, without problem. I've no idea what causes your error.

@duwhop
Copy link
Author

duwhop commented Sep 10, 2015

Yes it did help. Yes leaving it blank helped. When I enter something in there then I would get the error. Not sure why.

@inducer
Copy link
Owner

inducer commented Sep 13, 2015

In 583e28d I have included changes that make it clear that 'course subdirectory' (now 'course root in repository' is not required).

@inducer
Copy link
Owner

inducer commented Sep 13, 2015

I'll close this, since it sounds like the issue was resolved.

@inducer inducer closed this as completed Sep 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants