iblai / jupyter-edx-viewer-xblock

View Jupyter Notebooks in Open edX
https://ibleducation.com/jupyter-viewer-xblock
BSD 3-Clause "New" or "Revised" License
30 stars 22 forks source link

Installation Error #1

Closed gpsathas closed 5 years ago

gpsathas commented 6 years ago

I tried to follow the instructions from the readme file, but I am receiving an error saying:

WE'RE HAVING TROUBLE RENDERING YOUR COMPONENT Students will not be able to access this component. Re-edit your component to fix the error. Error: Reverse for 'jupyter_nb_viewer' not found. 'jupyter_nb_viewer' is not a valid view function or pattern name.

I tried to install the Xblock on both Gingko.2 and Hawthorn.beta1 releases with the same negative results.

mamigot commented 6 years ago

Hey @gpsathas,

Were you able to follow the “LMS/CMS Setup” instructions in the README as well?

The XBlock relies on a couple of API endpoints, which is why this is necessary.

Please let us know, and thanks!

gpsathas commented 6 years ago

@mamigot thank you for your answer.

I followed all the steps provided in README, meaning running the following commands and making the appropriate setups:

  1. sudo -i
  2. /edx/bin/pip.edxapp install git+https://github.com/ibleducation/jupyter-viewer-xblock.git
  3. Reboot server
  4. Add "xblock_jupyter_viewer" in the Advanced Module List (for my required course)
  5. Add urlpatterns+= ( url(r'^api/jupyter/', include('xblock_jupyter_viewer.rest.urls')), ) at the bottom of lms/urls.py and cms/urls.py
  6. Add 'xblock_jupyter_viewer', in the INSTALLED_APPS section in lms/envs/common.py and cms/envs/common.py
  7. Reboot server

After that, I tried to enable Jupyter viewer and I received the error message.

Please keep in mind that my instance is running on AWS r4.large and is a clean install without any customization etc.

Maybe something is missing from my installation?

Thank you.

gpsathas commented 6 years ago

Fortunately, I managed to install XBlock, but I used your AMI in Community AMIs.

Still, I didn't realize what the problem with my installation was! Missing some prerequisites maybe? If you have some advice for me to follow please tell me because I want to use my own instance.

mamigot commented 6 years ago

Great to hear that the OpenIBL AMI (Ginkgo.2) installation helped you!

The fact that it's not possible for you to install this XBlock on your own installation might have to do with the stability of your Open edX instance as opposed to the XBlock's, unfortunately. We've tested the XBlock thoroughly across multiple versions of Open edX and it seems like you've followed all the right instructions!

If you have cms or lms logs — depending on where you saw this error — it may be possible to identify the problem with your installation of Open edX, but that has a pretty wide surface area.

Closing this issue but feel free to reopen it if you encounter any problem, @gpsathas !

moocitfrance commented 5 years ago

Hi, we have the exact same issue on Hawhtorn. Are you sure there is no missing steps in the installation ?

File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock/runtime.py", line 810, in render frag = view_fn(context) File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/xblock_jupyter_viewer/xblock_jupyter_viewer.py", line 69, in student_view base = reverse('jupyter_nb_viewer') + "?{}" File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/urls/base.py", line 91, in reverse return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))) File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 497, in _reverse_with_prefix raise NoReverseMatch(msg) NoReverseMatch: Reverse for 'jupyter_nb_viewer' not found. 'jupyter_nb_viewer' is not a valid view function or pattern name.

jganzabal commented 5 years ago

exact same problem here with Hawhtorn

geoff-va commented 5 years ago

This has been fixed.

Feel free to re-open if you still have the same problem.