Ok Regis, please see replies below:
-
The theme is now working, right?
I still had the same branded theme error, so I removed "branded from the admin panel. I also changed this entry from the lms.env.json, so it would default to original settings:
Added back: "COMPREHENSIVE_THEME_DIRS":["/openedx/themes"],
Removed: "ENABLE_COMPREHENSIVE_THEME_DIRS": true,
-
You no longer have the “Theme ‘branded’ not found” error, right?
Correct. I still had the error until removing “branded” from the admin panel.
-
You no longer have the issue that prevented you to install packages from archive.ubuntu.com, right?
I do still have the issue that prevented me from installing packages. One popular fix on stackoverflow was overriding the DNS server using google DNS server but didn’t work.
-
Your ‘branded’ is now active, right?
No - it is not active, because when I removed the “branded” theme entry from the admin panel, and the true/false entry from the json file, the theme error went away.
Please paste here the full error stacktrace. I am aware that you already posted it earlier, but it was for an earlier Open edX version.
Sure the latest are now pasted. The 2 errors I see are here:
lms_1 | TypeError: int() argument must be a string or a number, not 'RequestSite'
lms_1 | 2019-11-25 14:36:54,669 ERROR 11 [django.request] exception.py:135 - Internal Server Error: /
dbilleter@HP-Z200-BC03:~$ tutor local logs --tail=100 lms
docker-compose -f /home/dbilleter/.local/share/tutor/env/local/docker-compose.yml --project-name tutor_local logs --tail 100 lms
Attaching to tutor_local_lms_1
lms_1 | courses = [c for c in courses if has_access(user, permission_name, c)]
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 148, in has_access
lms_1 | return _has_access_course(user, action, obj)
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 420, in _has_access_course
lms_1 | return _dispatch(checkers, action, user, courselike)
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 674, in _dispatch
lms_1 | result = table[action]()
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 384, in see_exists
lms_1 | return ACCESS_GRANTED if (can_load() or can_enroll()) else ACCESS_DENIED
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 363, in can_load
lms_1 | has_not_expired = check_course_expired(user, courselike)
lms_1 | File "/openedx/edx-platform/openedx/features/course_duration_limits/access.py", line 105, in check_course_expired
lms_1 | if not CourseDurationLimitConfig.enabled_for_enrollment(user=user, course_key=course.id):
lms_1 | File "/openedx/edx-platform/openedx/features/course_duration_limits/models.py", line 141, in enabled_for_enrollment
lms_1 | return cls.enabled_for_course(course_key=course_key, target_datetime=timezone.now())
lms_1 | File "/openedx/edx-platform/openedx/features/course_duration_limits/models.py", line 171, in enabled_for_course
lms_1 | current_config = cls.current(course_key=course_key)
lms_1 | File "/openedx/edx-platform/openedx/core/djangoapps/config_model_utils/models.py", line 135, in current
lms_1 | course_override_q
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 787, in filter
lms_1 | return self._filter_or_exclude(False, *args, **kwargs)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 805, in _filter_or_exclude
lms_1 | clone.query.add_q(Q(*args, **kwargs))
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1250, in add_q
lms_1 | clause, _ = self._add_q(q_object, self.used_aliases)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1270, in _add_q
lms_1 | current_negated, allow_joins, split_subq)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1270, in _add_q
lms_1 | current_negated, allow_joins, split_subq)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1276, in _add_q
lms_1 | allow_joins=allow_joins, split_subq=split_subq,
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1206, in build_filter
lms_1 | condition = lookup_class(lhs, value)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/lookups.py", line 24, in __init__
lms_1 | self.rhs = self.get_prep_lookup()
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/fields/related_lookups.py", line 112, in get_prep_lookup
lms_1 | self.rhs = target_field.get_prep_value(self.rhs)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 966, in get_prep_value
lms_1 | return int(value)
lms_1 | TypeError: int() argument must be a string or a number, not 'RequestSite'
lms_1 | 2019-11-25 14:36:54,669 ERROR 11 [django.request] exception.py:135 - Internal Server Error: /
lms_1 | Traceback (most recent call last):
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
lms_1 | response = get_response(request)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
lms_1 | response = self._get_response(request)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
lms_1 | response = self.process_exception_by_middleware(e, request)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
lms_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/utils/decorators.py", line 149, in _wrapped_view
lms_1 | response = view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/common/djangoapps/util/cache.py", line 76, in wrapper
lms_1 | response = view_func(request, *args, **kwargs)
lms_1 | File "/openedx/edx-platform/lms/djangoapps/branding/views.py", line 77, in index
lms_1 | return student.views.index(request, user=request.user)
lms_1 | File "/openedx/edx-platform/common/djangoapps/student/views/management.py", line 142, in index
lms_1 | courses = get_courses(user)
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/courses.py", line 465, in get_courses
lms_1 | courses = [c for c in courses if has_access(user, permission_name, c)]
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 148, in has_access
lms_1 | return _has_access_course(user, action, obj)
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 420, in _has_access_course
lms_1 | return _dispatch(checkers, action, user, courselike)
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 674, in _dispatch
lms_1 | result = table[action]()
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 384, in see_exists
lms_1 | return ACCESS_GRANTED if (can_load() or can_enroll()) else ACCESS_DENIED
lms_1 | File "/openedx/edx-platform/lms/djangoapps/courseware/access.py", line 363, in can_load
lms_1 | has_not_expired = check_course_expired(user, courselike)
lms_1 | File "/openedx/edx-platform/openedx/features/course_duration_limits/access.py", line 105, in check_course_expired
lms_1 | if not CourseDurationLimitConfig.enabled_for_enrollment(user=user, course_key=course.id):
lms_1 | File "/openedx/edx-platform/openedx/features/course_duration_limits/models.py", line 141, in enabled_for_enrollment
lms_1 | return cls.enabled_for_course(course_key=course_key, target_datetime=timezone.now())
lms_1 | File "/openedx/edx-platform/openedx/features/course_duration_limits/models.py", line 171, in enabled_for_course
lms_1 | current_config = cls.current(course_key=course_key)
lms_1 | File "/openedx/edx-platform/openedx/core/djangoapps/config_model_utils/models.py", line 135, in current
lms_1 | course_override_q
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 787, in filter
lms_1 | return self._filter_or_exclude(False, *args, **kwargs)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/query.py", line 805, in _filter_or_exclude
lms_1 | clone.query.add_q(Q(*args, **kwargs))
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1250, in add_q
lms_1 | clause, _ = self._add_q(q_object, self.used_aliases)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1270, in _add_q
lms_1 | current_negated, allow_joins, split_subq)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1270, in _add_q
lms_1 | current_negated, allow_joins, split_subq)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1276, in _add_q
lms_1 | allow_joins=allow_joins, split_subq=split_subq,
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1206, in build_filter
lms_1 | condition = lookup_class(lhs, value)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/lookups.py", line 24, in __init__
lms_1 | self.rhs = self.get_prep_lookup()
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/fields/related_lookups.py", line 112, in get_prep_lookup
lms_1 | self.rhs = target_field.get_prep_value(self.rhs)
lms_1 | File "/openedx/venv/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 966, in get_prep_value
lms_1 | return int(value)
**lms_1 | TypeError: int() argument must be a string or a number, not 'RequestSite'**
lms_1 | 2019-11-25 14:37:00,886 INFO 10 [tracking] logger.py:50 - {"username": "", "event_type": "/register", "ip": "10.3.2.205", "agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36", "host": "learn.logistics.corp", "referer": "http://learn.logistics.corp/", "accept_language": "en-US,en;q=0.9", "event": "{\"POST\": {}, \"GET\": {\"next\": [\"/\"]}}", "event_source": "server", "context": {"user_id": null, "org_id": "", "course_id": "", "path": "/register"}, "time": "2019-11-25T14:37:00.885912+00:00", "page": null}
Also, can you please try to disable the ‘branded’ theme? Does the error still occur?
Is it removed and the branded error is gone.