When I click on Files and Uploads tab of studio, " The Studio servers encountered an error" is shown.
Student uploading files also doesn’t work. Any solutions ?
@nadheemabdulla how did yo solve this problem, I am experiencing same error When I click on Files and Uploads tab of studio, " The Studio servers encountered an error"
2021-10-03 13:45:24,487 INFO 7 [tracking] [user 3] [ip 154.160.14.66] logger.py:41 - {"name": "/assets/course-v1:GhLA+Edmodo+edmodo1/", "context": {"user_id": 3, "path": "/assets/course-v1:GhLA+Edmodo+edmodo1/", "course_id": "", "org_id": ""}, "username": "kaduansere", "session": "58a2d8d8a3f73afe062d78ad94872a32", "ip": "154.160.14.66", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36", "host": "studio.mooc.stag.tanitgh.net", "referer": "https://studio.mooc.stag.tanitgh.net/tabs/course-v1:GhLA+Edmodo+edmodo1", "accept_language": "en-US,en;q=0.9,af;q=0.8", "event": "{\"GET\": {}, \"POST\": {}}", "time": "2021-10-03T13:45:24.486741+00:00", "event_type": "/assets/course-v1:GhLA+Edmodo+edmodo1/", "event_source": "server", "page": null}
2021-10-03 13:45:24,546 ERROR 7 [root] [user None] [ip None] signals.py:22 - Uncaught exception from None
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/pyenv/versions/3.8.6/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/openedx/venv/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "./cms/djangoapps/contentstore/views/assets.py", line 86, in assets_handler
return _asset_index(request, course_key)
File "./cms/djangoapps/contentstore/views/assets.py", line 107, in _asset_index
return render_to_response('asset_index.html', {
File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 192, in render_to_response
return HttpResponse(render_to_string(template_name, dictionary, namespace, request), **kwargs)
File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 182, in render_to_string
return template.render(dictionary, request)
File "/openedx/edx-platform/common/djangoapps/edxmako/template.py", line 82, in render
return self.mako_template.render_unicode(**context_dictionary)
File "/openedx/venv/lib/python3.8/site-packages/mako/template.py", line 478, in render_unicode
return runtime._render(
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 878, in _render
_render_context(
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 920, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 947, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/base.html.py", line 269, in render_body
context['self'].content(**pageargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/asset_index.html.py", line 155, in render_content
__M_writer(filters.html_escape(filters.decode.utf8(static.optional_include_mako(file='asset_index_content_header.html'))))
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/static_content.html.py", line 388, in render_optional_include_mako
tmpl.render_context(context)
File "/openedx/venv/lib/python3.8/site-packages/mako/template.py", line 490, in render_context
runtime._render_context(self, self.callable_, context, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 920, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 947, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/lagunita/cms/templates/asset_index_content_header.html.py", line 35, in render_body
"{copyright_email}").format(copyright_email=settings.COPYRIGHT_EMAIL)))
File "/openedx/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 80, in __getattr__
val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'COPYRIGHT_EMAIL'
2021-10-03 13:45:24,573 ERROR 7 [django.request] [user 3] [ip 154.160.14.66] log.py:222 - Internal Server Error: /assets/course-v1:GhLA+Edmodo+edmodo1/
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/pyenv/versions/3.8.6/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/openedx/venv/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "./cms/djangoapps/contentstore/views/assets.py", line 86, in assets_handler
return _asset_index(request, course_key)
File "./cms/djangoapps/contentstore/views/assets.py", line 107, in _asset_index
return render_to_response('asset_index.html', {
File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 192, in render_to_response
return HttpResponse(render_to_string(template_name, dictionary, namespace, request), **kwargs)
File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 182, in render_to_string
return template.render(dictionary, request)
File "/openedx/edx-platform/common/djangoapps/edxmako/template.py", line 82, in render
return self.mako_template.render_unicode(**context_dictionary)
File "/openedx/venv/lib/python3.8/site-packages/mako/template.py", line 478, in render_unicode
return runtime._render(
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 878, in _render
_render_context(
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 920, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 947, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/base.html.py", line 269, in render_body
context['self'].content(**pageargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/asset_index.html.py", line 155, in render_content
__M_writer(filters.html_escape(filters.decode.utf8(static.optional_include_mako(file='asset_index_content_header.html'))))
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/static_content.html.py", line 388, in render_optional_include_mako
tmpl.render_context(context)
File "/openedx/venv/lib/python3.8/site-packages/mako/template.py", line 490, in render_context
runtime._render_context(self, self.callable_, context, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 920, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 947, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/lagunita/cms/templates/asset_index_content_header.html.py", line 35, in render_body
"{copyright_email}").format(copyright_email=settings.COPYRIGHT_EMAIL)))
File "/openedx/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 80, in __getattr__
val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'COPYRIGHT_EMAIL'
[pid: 7|app: 0|req: 101/307] 10.1.187.49 () {52 vars in 3248 bytes} [Sun Oct 3 13:45:24 2021] GET /assets/course-v1:GhLA+Edmodo+edmodo1/ => generated 11092 bytes in 332 msecs (HTTP/1.0 500) 7 headers in 507 bytes (1 switches on core 0)
[pid: 117|app: -1|req: -1/308] 10.1.187.49 () {50 vars in 3167 bytes} [Sun Oct 3 13:45:25 2021] GET /static/studio/lagunita/images/favicon.b97ac35fb19f.ico => generated 15086 bytes in 3 msecs via sendfile() (HTTP/1.0 200) 3 headers in 128 bytes (0 switches on core 0)
The error is syaing in the last line
AttributeError: 'Settings' object has no attribute 'COPYRIGHT_EMAIL'
So try setting that value, as:
tutor config save --set COPYRIGHT_EMAIL=example@example.com
More detials here in doc configuration
I have set the correct tutor config
save --set COPYRIGHT_EMAIL=example@example.com
But still getting the same error
2021-10-03 22:57:30,299 ERROR 6 [django.request] [user 3] [ip 154.160.14.95] log.py:222 - Internal Server Error: /assets/course-v1:GhLA+Edmodo2021+2021_10/
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/pyenv/versions/3.8.6/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/openedx/venv/lib/python3.8/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 142, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "./cms/djangoapps/contentstore/views/assets.py", line 86, in assets_handler
return _asset_index(request, course_key)
File "./cms/djangoapps/contentstore/views/assets.py", line 107, in _asset_index
return render_to_response('asset_index.html', {
File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 192, in render_to_response
return HttpResponse(render_to_string(template_name, dictionary, namespace, request), **kwargs)
File "/openedx/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 182, in render_to_string
return template.render(dictionary, request)
File "/openedx/edx-platform/common/djangoapps/edxmako/template.py", line 82, in render
return self.mako_template.render_unicode(**context_dictionary)
File "/openedx/venv/lib/python3.8/site-packages/mako/template.py", line 478, in render_unicode
return runtime._render(
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 878, in _render
_render_context(
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 920, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 947, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/base.html.py", line 269, in render_body
context['self'].content(**pageargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/asset_index.html.py", line 155, in render_content
__M_writer(filters.html_escape(filters.decode.utf8(static.optional_include_mako(file='asset_index_content_header.html'))))
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/static_content.html.py", line 388, in render_optional_include_mako
tmpl.render_context(context)
File "/openedx/venv/lib/python3.8/site-packages/mako/template.py", line 490, in render_context
runtime._render_context(self, self.callable_, context, *args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 920, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/openedx/venv/lib/python3.8/site-packages/mako/runtime.py", line 947, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/lagunita/cms/templates/asset_index_content_header.html.py", line 35, in render_body
"{copyright_email}").format(copyright_email=settings.COPYRIGHT_EMAIL)))
File "/openedx/venv/lib/python3.8/site-packages/django/conf/__init__.py", line 80, in __getattr__
val = getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute 'COPYRIGHT_EMAIL'
Oh right!, my bad.
The error is about the open_edx setting, not tutor.
-
To add a variable for the production of cms, try this:
echo "COPYRIGHT_EMAIL=example@me.com" >> $(tutor config printroot)/env/apps/openedx/settings/cms/production.py
-
To add a variable for the production of lms, try this:
echo "COPYRIGHT_EMAIL=example@me.com" >> $(tutor config printroot)/env/apps/openedx/settings/lms/production.py
Hope that will resolve, please note: whenver you run tutor config save
these settitng will be overwritten, so you would need to run them again.
After adding setting as expalined above, just restart tutor.
Lastly take a look about tutor and open edx configuration check this form the doc.
@ghassanmas your proposed solution broke both LMS and LOS and they wouldn’t load at all.
What i eventually tried is modified $(tutor config printroot)/env/apps/openedx/config/cms.env.json change the last enntry to the items below
“EMAIL_HOST_USER”: “example@acme.com”,
“EMAIL_HOST_PASSWORD”: “password”,
"COPYRIGHT_EMAIL": "example@acme.com"
If you want to make it permanent even after tutor config save you need to modify the original template. This all happened after applying a new theme
I am good now
Oh yes sorry again about that, the email should have been wrapped in qoutation, otherwise it would cause python error, like undefiend or something, here is what it had to be:
echo "COPYRIGHT_EMAIL='example@me.com'" >> $(tutor config printroot)/env/apps/openedx/settings/cms/production.py
Anyway glad you fixed and all good now.
FYI @kaduansere this error comes from your custom “lagunita” theme, as indicated by this error log:
...
File "/tmp/mako_cms/a5eebd6bfdd582a823356cb512d2e4e2/lagunita/cms/templates/asset_index_content_header.html.py", line 35, in render_body
"{copyright_email}").format(copyright_email=settings.COPYRIGHT_EMAIL)))
...
Also, you should almost never manually modify the files in $(tutor config printroot)/env
, as these changes will be overwritten every time you run tutor local quickstart
or tutor config save
. See the relevant docs: Concepts — Tutor documentation
Instead, you should create a Tutor plugin: Plugins — Tutor documentation
Hello @regis ,
thanks for the update. problem solved permanently with following patch
name: setcopyrightemail
version: 0.1.0
patches:
cms-env: |
"COPYRIGHT_EMAIL": "{{ CONTACT_EMAIL }}"
Thank you