RunestoneInteractive / RunestoneServer

Interactive books for computer science and mathematics
http://runestoneinteractive.org
Other
575 stars 502 forks source link

problem building runestone assignment #948

Closed LauraDillon closed 7 years ago

LauraDillon commented 7 years ago

I have not been able to use the instructor interface of my courses (testESSA17, essa2017-csp) to create or grade assignments after countless hours trying to follow the instructions in the online tutorials. So I decided to try to try following the instructions at http://reputablejournal.com/how-to-make-a-lab-in-three-easy-steps.html#.WVfB9dMrKRv to install and use runestone locally to build assignments and post them on our webserver. It seems that the Runestone components installed fine. And no problems were reported when I ran 'runestone install' (the inputs appear to have changed some since the posting as I was asked for different information than shown in example in the post. But 'runestone build' crashed. See attached. I'd really appreciate any help with this problem! Thanks!! buildError.txt

bnmnetp commented 7 years ago

Laura,

There is an unfortunate bug in Sphinx. If you do the following you should be able to complete your build.

pip uninstall sphinx
pip install 'sphinx<1.6'

Separately, it would be great to understand the problems you were having creating assignments. Those of us who develop Runestone also use it, so although it works for us, knowing where you were having trouble would likely help many others.

Brad

LauraDillon commented 7 years ago

Brad,

Thanks for the quick response! OK, I did that and all seemed OK. But the build failed again. And I'm now wondering if it could be an incompatibility between anaconda and runestone? When I first tried to install runestone, I got errors on the install. I showed the errors to a colleague with more systems experience than me. He thought it might be library incompatibilities and suggested that I uninstall anaconda and try again. I did that and it installed OK. But I've since reinstalled anaconda for use in class. If it's incompatible with the runestone tool, is there some other python IDE you recommend?

Regarding creating assignments: I've had trouble with just about everything I've tried---both in the old instructor interface and the new one. I've been using the testESSA17 course as a test bed since the class has started. I managed to create an assignment called 'test 1' out of some exercises in the csp book (in spite of trouble with the search tool). I wasn't able to write my own assignment to add to it---no matter what I name the assignment, I get a message: 'Name is alerady in use. Please choose another name." A number of buttons in the assignment creation tool don't seem to do anything. And after rebuilding the course, I don't see the assignment I thought I added...
I've had lots of other problems. Is there someone that I could to a Zoom meeting with so I could share my screen and show them?

An unrelated question: Whenever I bring up the Instructor page of either course, I get a warning 'Bug fixes available Rebuild is recommended."
For a while, I dutifully rebuilt the course each time. But I've stopped since rebuilding does not appear to clear the message. Should I just be ignoring this warning?

Thanks!!

Laurie

On 7/1/17 1:44 PM, Bradley Miller wrote:

Laura,

There is an unfortunate bug in Sphinx. If you do the following you should be able to complete your build.

|pip uninstall sphinx pip install 'sphinx<1.6' |

Separately, it would be great to understand the problems you were having creating assignments. Those of us who develop Runestone also use it, so although it works for us, knowing where you were having trouble would likely help many others.

Brad

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RunestoneInteractive/RunestoneServer/issues/948#issuecomment-312445899, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJz5no4YWv4JlYzjfBUGkjfliz8ZRMhks5sJoWLgaJpZM4OLXdR.

bnmnetp commented 7 years ago

What error are you getting now?

LauraDillon commented 7 years ago

The same error. I'm attaching a dump showing the uninstall of sphinx, the install, and then the attempted build. I included the reinstall of sphinx because it shows that build is finding stuff in the anaconda library. The build of runestone is still using Sphinx v1.6.2, not the one I just installed. I haven't had time to uninstall anaconda and try anew. I'll do that later today.

On 7/2/17 12:13 AM, Bradley Miller wrote:

What error are you getting now?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RunestoneInteractive/RunestoneServer/issues/948#issuecomment-312469803, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJz5joWnGnLrVu_jKYTGzs_CJMvt9Luks5sJxjogaJpZM4OLXdR.

Lauras-MacBook-Pro-2:TestQuiz lauradillon$ pip uninstall sphinx Uninstalling Sphinx-1.5.6: /Users/lauradillon/anaconda/bin/sphinx-apidoc /Users/lauradillon/anaconda/bin/sphinx-autogen /Users/lauradillon/anaconda/bin/sphinx-build /Users/lauradillon/anaconda/bin/sphinx-quickstart /Users/lauradillon/anaconda/lib/python3.6/site-packages/Sphinx-1.5.6-py3.6.egg Proceed (y/n)? y Successfully uninstalled Sphinx-1.5.6 Lauras-MacBook-Pro-2:TestQuiz lauradillon$ pip install 'sphinx<1.6' Collecting sphinx<1.6 Downloading Sphinx-1.5.6-py2.py3-none-any.whl (1.6MB) 100% |████████████████████████████████| 1.6MB 368kB/s Requirement already satisfied: docutils>=0.11 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: Jinja2>=2.3 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: imagesize in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: snowballstemmer>=1.1 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: Pygments>=2.0 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: six>=1.5 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: alabaster<0.8,>=0.7 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: babel!=2.0,>=1.3 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: requests>=2.0.0 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from sphinx<1.6) Requirement already satisfied: MarkupSafe>=0.23 in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from Jinja2>=2.3->sphinx<1.6) Requirement already satisfied: pytz>=0a in /Users/lauradillon/anaconda/lib/python3.6/site-packages (from babel!=2.0,>=1.3->sphinx<1.6) Installing collected packages: sphinx Successfully installed sphinx-1.5.6 Lauras-MacBook-Pro-2:TestQuiz lauradillon$ pwd /Users/lauradillon/Dropbox/2017essa/Testing/Assignments/TestQuiz Lauras-MacBook-Pro-2:TestQuiz lauradillon$ runestone build Skipping all DB operations because environment variables not set up Cannot connect Building with Runestone 2.7.14 ---> runestone.build git describe --long fatal: Not a git repository (or any of the parent directories): .git

Building into ./build/testQuiz1 mkdir_p path('././build/testQuiz1') mkdir_p path('./build/testQuiz1') mkdir_p path('././build/testQuiz1/doctrees') sphinx-build -b html -d ././build/testQuiz1/doctrees -c . -Acourse_id=testQuiz1 -Alogin_required=false -Aappname=runestone -Aloglevel=0 -Acourse_url=http://127.0.0.1:8000 -Ause_services=false -Apython3=false -Adburl= -Abasecourse=testQuiz1 -Arunestone_version=2.7.14 -Abuild_info=unknown ./_sources ./build/testQuiz1 Running Sphinx v1.6.2 loading pickled environment... not yet created building [mo]: targets for 0 po files that are out of date building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed The exception is name 'engine' is not defined
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/runestone/activecode/activecode.py", line 328, in run engine.execute(Source_code.delete().where(Source_code.c.acid == divid).where(Source_code.c.course_id == course_name)) NameError: name 'engine' is not defined testQuiz1 Unable to save to source_code table in activecode.py. Possible problems:

  1. dburl or course_id are not set in conf.py for your book
  2. unable to connect to the database using dburl

This should only affect the grading interface. Everything else should be fine.

looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] index
Exception occurred: File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/sphinx/util/osutil.py", line 61, in relative_uri if to.startswith(SEP): jinja2.exceptions.UndefinedError: 'str object' has no attribute 'filename' The full traceback has been saved in /var/folders/rx/x2v14gfd7m19hkvjgpdqz1700000gn/T/sphinx-err-er9fx0zp.log, if you want to report the issue to the developers. Please also report this if it was a user error, so that a better error message can be provided next time. A bug report can be filed in the tracker at https://github.com/sphinx-doc/sphinx/issues. Thanks! Chapter Information Creation Failed with too many values to unpack (expected 2) Error in building testQuiz1

LauraDillon commented 7 years ago

Got the runestone tools working! :)

So here is what worked: Uninstalled anaconda; re-uninstalled sphinx; re-installed 'sphinx<1.6'; deleted all files created from last runestone install attempt; with all cleaned up and anaconda gone, I was able to initialize and build a test lab.

I'll need something to replace anaconda (idle is too painful)... The csp book recommends JES. I'll try it out (hopefully it won't install the newer sphinx?).

bnmnetp commented 7 years ago

Glad you got it working.

For what its worth, I use anaconda and runestone together all the time. It seems to me that in addition to an old anaconda installation with some permissions problems you may have had (still have) some problems with your PATH environment variable that were causing you to run some commands from the System python installation and others from Anaconda --- never a good thing.