Giter VIP home page Giter VIP logo

Comments (10)

inducer avatar inducer commented on May 29, 2024

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

from relate.

duwhop avatar duwhop commented on May 29, 2024

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!

from relate.

dzhuang avatar dzhuang commented on May 29, 2024

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.

from relate.

duwhop avatar duwhop commented on May 29, 2024

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.

from relate.

dzhuang avatar dzhuang commented on May 29, 2024

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.

from relate.

duwhop avatar duwhop commented on May 29, 2024

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!!

from relate.

dzhuang avatar dzhuang commented on May 29, 2024

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.

from relate.

duwhop avatar duwhop commented on May 29, 2024

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

from relate.

inducer avatar inducer commented on May 29, 2024

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

from relate.

inducer avatar inducer commented on May 29, 2024

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

from relate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.