500 error on the dashboard page

1,108 views
Skip to first unread message

velcro

unread,
Mar 14, 2014, 5:29:22 PM3/14/14
to edx-...@googlegroups.com
I'm running the focaccia AMI on aws, and have been working on getting the Stanford theme up and running. However, once I got the main page up and running, I went to log in and immediately came across a 500 error. 

I'm not sure how to start on tracing the error; where are the logs for this, and what sort of thing should I be looking for?

Ned Batchelder

unread,
Mar 14, 2014, 8:53:19 PM3/14/14
to velcro, edx-...@googlegroups.com
Where you start looking for the error depends a lot on what the error is.  Do you get a yellow Django error page?  It has a stack trace on it with lots of useful information.  If you can show us that, we can help you get started.

--Ned.

David Azevedo

unread,
Mar 14, 2014, 10:10:33 PM3/14/14
to edx-...@googlegroups.com
Hello Velcro i got the same error.

If you post a traceback we could confirm.

Maybe changing lms/envs/common.py Language_code "en" this code "en" or "zh-cn" or whatever must be in lowercase with a - not a _ like the list of language codes on bottom of file.

David
escola.org

Ned Batchelder

unread,
Mar 15, 2014, 7:51:13 AM3/15/14
to David Azevedo, edx-...@googlegroups.com
Everyone, just to be clear: a "500 error" is not a single kind of error.  Anything that goes wrong in the Python code will result in a 500 status code being returned to the browser.  Without information about specifically what is going on, it's impossible to know whether two sites with 500 errors are "the same error."

Only with a full error report can we begin to diagnose the problem.

--Ned.

velcro

unread,
Mar 15, 2014, 5:02:27 PM3/15/14
to edx-...@googlegroups.com, David Azevedo
I don't get a django error page; I've attached a screenshot, but as Ned pointed out, it's not a terribly useful page. In the syslog, I see three errors. One is a celery problem (missed heartbeats) that recurs every few hours or so, and the other two happen when I try to access an https page (password reset, for example). 

Thanks for the help; I'm really not sure where to go from here.

Mar 15 12:06:01 ip-172-31-24-254 [service_variant=lms][celery.worker.consumer][env:sandbox] ERROR [ip-172-31-24-254  15060] [consumer.py:397] - consume
r: Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 395, in start
    self.consume_messages()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 458, in consume_messages
    poll_timeout = (fire_timers(propagate=errors) if scheduled
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/worker/hub.py", line 157, in fire_timers
    entry()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/utils/timer2.py", line 59, in __call__
    return self.fun(*self.args, **self.kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/utils/timer2.py", line 165, in _reschedules
    return fun(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/kombu/connection.py", line 270, in heartbeat_check
    return self.transport.heartbeat_check(self.connection, rate=rate)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 134, in heartbeat_check
    return connection.heartbeat_tick(rate=rate)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/amqp/connection.py", line 844, in heartbeat_tick
    raise ConnectionError('Too many heartbeats missed')
ConnectionError: Too many heartbeats missed

----------------------------------------------------

Mar 15 16:33:52 ip-172-31-24-254 [service_variant=lms][root][env:sandbox] ERROR [ip-172-31-24-254  10622] [exceptions.py:9] - Uncaught exception from <
class 'django.core.handlers.wsgi.WSGIHandler'>
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/student/views.py", line 511, in dashboard
    'errored_courses': errored_courses,
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 117, in render_to_response
    return HttpResponse(render_to_string(template_name, dictionary, context_instance, namespace), **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 104, in render_to_string
    return template.render_unicode(**context_dictionary)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 452, in render_unicode
    as_unicode=True)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 807, in _render
    **_kwargs_for_callable(callable_, data))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 839, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 865, in _exec_template
    callable_(context, *args, **kwargs)
  File "/tmp/tmpcpuV_zmako/main.html.py", line 253, in render_body
    __M_writer(filters.decode.utf8(self.body()))
  File "/tmp/tmpcpuV_zmako/dashboard.html.py", line 79, in render_body
    cert_name_short = settings.CERT_NAME_SHORT
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/functional.py", line 185, in inner
    return func(self._wrapped, *args)
AttributeError: 'Settings' object has no attribute 'CERT_NAME_SHORT'

------------------------------------------------------------------------------------

Mar 15 16:33:52 ip-172-31-24-254 [service_variant=lms][django.request][env:sandbox] ERROR [ip-172-31-24-254  10622] [base.py:215] - Internal Server Err
or: /dashboard
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 20, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/student/views.py", line 511, in dashboard
    'errored_courses': errored_courses,
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 117, in render_to_response
    return HttpResponse(render_to_string(template_name, dictionary, context_instance, namespace), **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 104, in render_to_string
    return template.render_unicode(**context_dictionary)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 452, in render_unicode
    as_unicode=True)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 807, in _render
    **_kwargs_for_callable(callable_, data))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 839, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 865, in _exec_template
    callable_(context, *args, **kwargs)
  File "/tmp/tmpcpuV_zmako/main.html.py", line 253, in render_body
    __M_writer(filters.decode.utf8(self.body()))
  File "/tmp/tmpcpuV_zmako/dashboard.html.py", line 79, in render_body
    cert_name_short = settings.CERT_NAME_SHORT
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/functional.py", line 185, in inner
    return func(self._wrapped, *args)
AttributeError: 'Settings' object has no attribute 'CERT_NAME_SHORT'
------------------------------------------------------------------
Screenshot from 2014-03-15 16:52:39.png

Jay Zoldak

unread,
Mar 15, 2014, 9:15:20 PM3/15/14
to edx-code

  File "/tmp/tmpcpuV_zmako/main.html.py", line 253, in render_body
    __M_writer(filters.decode.utf8(self.body()))
  File "/tmp/tmpcpuV_zmako/dashboard.html.py", line 79, in render_body
    cert_name_short = settings.CERT_NAME_SHORT
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/functional.py", line 185, in inner
    return func(self._wrapped, *args)
AttributeError: 'Settings' object has no attribute 'CERT_NAME_SHORT'


Velcro --

From the above error message, it looks to me like perhaps you have an old copy of lms/envs/common.py that is out of sync with the rest of the code. `git blame lms/envs/common.py` is showing that defaults for CERT_NAME_SHORT were added in hash 35112e9e on february 10th.

-- JZ

velcro

unread,
Mar 15, 2014, 9:19:56 PM3/15/14
to edx-...@googlegroups.com
########################## CERTIFICATE NAME ########################
CERT_NAME_SHORT = "Certificate"
CERT_NAME_LONG = "Certificate of Achievement"

Is this what I should have? Because this already exists in lms/envs/common.py, and I think I'm up to date (just updated recently).

Any other guesses?

Jay Zoldak

unread,
Mar 15, 2014, 9:38:45 PM3/15/14
to edx-code
Hm, nope that is correct - it's what you should have in common.py for lms.
Is it just the dashboard page that is giving 500 errors?
Are you using devstack?
What command are you using to start up lms?

-- JZ

David Azevedo

unread,
Mar 15, 2014, 10:31:01 PM3/15/14
to edx-...@googlegroups.com
Hello again

Velcro i installed the same focaccia AMI and it runs good from minute 1.

Did you at sometime had a good setup and then after some change the error ocurred?
Are you using a medium ec2? Because anything less will not work.
Did you run a configuration update? Because if you did there are some new configurations that are not compatible with focaccia AMI.

David

Ned Batchelder

unread,
Mar 16, 2014, 11:09:16 AM3/16/14
to velcro, edx-...@googlegroups.com
It's possible that you have more than one copy of the edx code, and that you are running new code and old code mixed together somehow.  For example, try running this command:

$ find / -name 'common.py'

--Ned.


On Sat, Mar 15, 2014 at 9:19 PM, velcro <viccr...@gmail.com> wrote:

velcro

unread,
Mar 16, 2014, 2:04:18 PM3/16/14
to edx-...@googlegroups.com
Aside from python folders all over, I only have:

/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/features/common.py
/edx/app/edxapp/edx-platform/cms/envs/common.py
/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/features/common.py
/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/features/common.py
/edx/app/edxapp/edx-platform/lms/envs/common.py

I had to run an update to get the stanford themes to work; Yarko's patch wasn't applicable until I updated. It sounds like starting a new instance is going to be easiest, but then I'm not sure how to apply the patch

I'm running it on a large ec2 instance, so that shouldn't be the problem. I'm using 'rake lms:gather_assets:aws' to run it.

David Azevedo

unread,
Mar 16, 2014, 2:21:58 PM3/16/14
to edx-...@googlegroups.com
Hello

You can try sudo /edx/bin/update edx-platform master - update edx-platform master ; and after ;  sudo /edx/bin/supervisorctl -c /edx/etc/supervisord.conf restart edxapp: (: included)

This overrides every file in folder edx-platform including edx-theme from Stanford and replaces it with master of edx if you havent changed the remote location of repository.

Hope this helps,

David




Sexta-feira, 14 de Março de 2014 22:29:22 UTC+1, velcro escreveu:

velcro

unread,
Mar 16, 2014, 2:48:56 PM3/16/14
to edx-...@googlegroups.com
Hey David,

Thanks for the help! When I ran the first command, I got a failure: 

TASK: [edxapp | checkout edx-platform repo into {{edxapp_code_dir}}] ********** 
failed: [localhost] => {"failed": true, "item": ""}
msg: Failed to download remote objects and refs
FATAL: all hosts have already failed -- aborting

I'm not really sure how it could fail to download, unless it's not a problem on my end here? 

Yarko Tymciurak

unread,
Mar 16, 2014, 3:04:26 PM3/16/14
to edx-...@googlegroups.com


On Sunday, March 16, 2014 1:48:56 PM UTC-5, velcro wrote:
Hey David,

Thanks for the help! When I ran the first command, I got a failure: 

TASK: [edxapp | checkout edx-platform repo into {{edxapp_code_dir}}] ********** 
failed: [localhost] => {"failed": true, "item": ""}
msg: Failed to download remote objects and refs
FATAL: all hosts have already failed -- aborting

To answer this - be sure you are running:
sudo /edx/bin/update edx-platform master
 
or the verbose mode:
sudo /edx/bin/update -v edx-platform master 

David Azevedo

unread,
Mar 16, 2014, 3:15:44 PM3/16/14
to edx-...@googlegroups.com
Hello

I think the error came from trying to run with 'rake lms:gather_assets:aws' because rake is not installed on focaccia AMI

David

Yarko Tymciurak

unread,
Mar 16, 2014, 3:24:21 PM3/16/14
to edx-...@googlegroups.com


On Sunday, March 16, 2014 1:04:18 PM UTC-5, velcro wrote:
Aside from python folders all over, I only have:

/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/features/common.py
/edx/app/edxapp/edx-platform/cms/envs/common.py
/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/features/common.py
/edx/app/edxapp/edx-platform/lms/djangoapps/instructor/features/common.py
/edx/app/edxapp/edx-platform/lms/envs/common.py

I had to run an update to get the stanford themes to work; Yarko's patch wasn't applicable until I updated. It sounds like starting a new instance is going to be easiest, but then I'm not sure how to apply the patch

The general version of "how to run a patch locally"  is here:  https://help.github.com/articles/checking-out-pull-requests-locally

...but you might just as simply note that:
  • PR #2387 changes 3 files:   rakefile (which hasn't changed in a long time);  rakelib/assets.rake;  cms/startup.py
  • you can safely do the following (from /edx/app/edxapp/edx-platform):
# these will give you a simple path back: 
mv rakefile rakefile-
mv rakelib/assets.rake rakelib/assets.rake-
mv cms/startup.py cms/startup.py-
 
#  startup for studio will fail because paths to theme not found (even though not used);
# the full lms startup will solve this:
ln -s ../lms/startup.py cms/startup.py
 
If you are on AWS, then you will need to checkout the stanford theme manually, and also manually set /edx/app/edxapp/lms.env.json - see https://github.com/edx/edx-platform/wiki/Developing-on-the-edX-Developer-Stack#configuring-themes-in-devstack
 
Hope that helps.

Yarko Tymciurak

unread,
Mar 16, 2014, 3:29:01 PM3/16/14
to edx-...@googlegroups.com
I'm not sure if this is accurate - see https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack#compile-assets-manually  for how to run fullstack  rake (you need to have the environment setup).

In any case, even if it is, you can run the rake commands in verbose mode on a vagrant fullstack (or probably devstack for that matter), and see the commands that it facilitates, and run those manually.

In other words, there should be no block, at worst lack of conveniences.

velcro

unread,
Mar 16, 2014, 3:49:54 PM3/16/14
to edx-...@googlegroups.com
Yep, that's what I have. Here's added verbosity.

TASK: [edxapp | checkout edx-platform repo into {{edxapp_code_dir}}] ********** 
<localhost> EXEC ['/bin/sh', '-c', 'mkdir -p /tmp/ansible-1394999332.03-9459190570979 && chmod a+rx /tmp/ansible-1394999332.03-9459190570979 && echo /tmp/ansible-1394999332.03-9459190570979']
<localhost> REMOTE_MODULE git dest=/edx/app/edxapp/edx-platform repo=https://github.com/edx/edx-platform.git version=master
<localhost> PUT /tmp/tmplJsjNk TO /tmp/ansible-1394999332.03-9459190570979/git
<localhost> EXEC ['/bin/sh', '-c', 'chmod a+r /tmp/ansible-1394999332.03-9459190570979/git']
<localhost> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=xptzziuniuqzqvuwtowagcimsbgrqupw] password: " -u edxapp /bin/sh -c '"'"'echo SUDO-SUCCESS-xptzziuniuqzqvuwtowagcimsbgrqupw; GIT_SSH=/tmp/edxapp_git_ssh.sh /usr/bin/python /tmp/ansible-1394999332.03-9459190570979/git'"'"''
<localhost> EXEC ['/bin/sh', '-c', 'rm -rf /tmp/ansible-1394999332.03-9459190570979/ >/dev/null 2>&1']

failed: [localhost] => {"failed": true, "item": ""}
msg: Failed to download remote objects and refs
FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/ubuntu/edxapp.retry
localhost                  : ok=3    changed=0    unreachable=0    failed=1   

velcro

unread,
Mar 16, 2014, 4:10:03 PM3/16/14
to edx-...@googlegroups.com
So I did install rake, and have been running things (and seeing changes I make in the Stanford theme directories) using the rake command.

Yarko: I get 

-bash: rakefile: Permission denied

when I run that last line; sudo doesn't fix it. 

velcro

unread,
Mar 16, 2014, 4:37:39 PM3/16/14
to edx-...@googlegroups.com
Alright, I'm going to cut my losses and start fresh. I will keep track of every command I run, so that if I manage to reproduce the error I can give an appropriate set of things (instead of wasting your time now...I'll waste it later instead?)

Thanks so much for the help and ideas!

David Azevedo

unread,
Mar 16, 2014, 4:43:22 PM3/16/14
to edx-...@googlegroups.com
OK

And update your findings please for future reference.


David

Sexta-feira, 14 de Março de 2014 22:29:22 UTC+1, velcro escreveu:

velcro

unread,
Mar 16, 2014, 4:57:36 PM3/16/14
to edx-...@googlegroups.com
Definitely. I think it's some weird steps that I came across in implementing the Stanford theme; I'll be sure to write up what I find.

Yarko Tymciurak

unread,
Mar 16, 2014, 5:05:21 PM3/16/14
to velcro, edx-...@googlegroups.com

FYI I've been implementing the Stanford theme often in the past month with easy success.

Do note that a small changes required - see https://github.com/Stanford-Online/edx-theme/pull/4

- Yarko

velcro

unread,
Mar 17, 2014, 6:02:27 PM3/17/14
to edx-...@googlegroups.com, velcro
I attached documentation of exactly what I've done, on a freshly launched AMI. Hopefully this will help in finding the error? The first patch (#2387) had a whitespace error, and that may be what destroyed everything else.

Either way, to apply patch #4 (which seems necessary, based on the error after rake-ing), I think I need to update?

Thanks again for the help!
Stanford theme failure.txt

Trinh Nguyen

unread,
Mar 17, 2014, 7:45:00 PM3/17/14
to velcro, edx-...@googlegroups.com
FYI, I've successfully applied the Standford theme using the provision method:



David Azevedo

unread,
Mar 17, 2014, 7:58:11 PM3/17/14
to edx-...@googlegroups.com, velcro
I also installed Stanford theme this way.
Follow that in a clean server. 
David 

velcro

unread,
Mar 17, 2014, 8:10:55 PM3/17/14
to edx-...@googlegroups.com, velcro
WOW! THANK YOU!

You are my new hero. If this were reddit, I'd give you all the gold. As it isn't, I hope my thanks will suffice: thank you for pointing me there! There's so much other information about other ways to do it that I never even saw this one.

Trinh Nguyen

unread,
Mar 17, 2014, 8:23:49 PM3/17/14
to velcro, edx-...@googlegroups.com
No problem. To a sass/less and ruby novice like me, using the automation provisioning script is the best way to get start since it simplified most of the steps.

velcro

unread,
Mar 17, 2014, 11:27:39 PM3/17/14
to edx-...@googlegroups.com, velcro
Definitely.  I'm noticing that the way I've been compiling manually (https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack#compile-assets-manually) isn't working; how are you causing the changes to take effect?

For reference, my errors look like this:

      error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: stanford.

velcro

unread,
Mar 17, 2014, 11:43:12 PM3/17/14
to edx-...@googlegroups.com, velcro
And if I could edit that last post, I'd say "I tried Yarko's suggestion here: https://groups.google.com/d/msg/edx-code/pxIRTxe2LDE/HrOc10Lv_g8J", but I got an error about whitespace on one diff, and the other didn't apply:

sudo git apply 2387.diff
2387.diff:46: trailing whitespace.
    SERVICE_VARIANT = clean_args.include?('lms') ? "lms" : 
warning: 1 line adds whitespace errors.

Yarko Tymciurak

unread,
Mar 18, 2014, 1:45:33 AM3/18/14
to edx-...@googlegroups.com, velcro


On Monday, March 17, 2014 10:27:39 PM UTC-5, velcro wrote:
Definitely.  I'm noticing that the way I've been compiling manually (https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack#compile-assets-manually) isn't working; how are you causing the changes to take effect?

For reference, my errors look like this:

      error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: stanford.

This is because the SERVICE_VARIANT isn't set for rakefile & rakelib.

That others report this works surprised me, so this means something is different between systems - some can set the extra-vars for ansible (which is what server-vars.yml is) and have lms be passed as the SERVICE_VARIANT, and some not (which is one of two points of #2387).

Perhaps the root cause needs to dug into more.   But the only way that sass and coffee could porcess properly without #2387 is if theme files were put somewhere within edx-platform (common, lms, or cms) - which would be bad form.   To get the /edx/app/edxapp/theme  path added to coffee and sass processing, the changes from #2387 to rakelib/assets must be in place.

So - my question to the others:  how on earth does your theme work using https://github.com/edx/edx-platform/wiki/Stanford-Theming ?

For this to work from within server-vars.yml, the ansible playbooks would have to put this in a different place than /edx/app/edxapp/theme...

(I'd have tested this tonight, and not asked the questions - but, sorry to say, my graphics card died, so I'm out a computer at the moment)

Yarko Tymciurak

unread,
Mar 18, 2014, 1:59:52 AM3/18/14
to edx-...@googlegroups.com, velcro


On Monday, March 17, 2014 10:43:12 PM UTC-5, velcro wrote:
And if I could edit that last post, I'd say "I tried Yarko's suggestion here: https://groups.google.com/d/msg/edx-code/pxIRTxe2LDE/HrOc10Lv_g8J", but I got an error about whitespace on one diff, and the other didn't apply:

I do not know why the git diff would fail on a trailing space on one line.  It's harmless, but thanks - I've fixed it.
The post you refer to is more than a month old;  the second PR has since been merged, so it makes sense that it wouldn't apply.

Yarko Tymciurak

unread,
Mar 18, 2014, 3:17:12 AM3/18/14
to edx-...@googlegroups.com, velcro


On Tuesday, March 18, 2014 12:45:33 AM UTC-5, Yarko Tymciurak wrote:


On Monday, March 17, 2014 10:27:39 PM UTC-5, velcro wrote:
Definitely.  I'm noticing that the way I've been compiling manually (https://github.com/edx/configuration/wiki/edX-Managing-the-Production-Stack#compile-assets-manually) isn't working; how are you causing the changes to take effect?

For reference, my errors look like this:

      error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: stanford.

This is because the SERVICE_VARIANT isn't set for rakefile & rakelib.

That others report this works surprised me, so this means something is different between systems - some can set the extra-vars for ansible (which is what server-vars.yml is) and have lms be passed as the SERVICE_VARIANT, and some not (which is one of two points of #2387).

Perhaps the root cause needs to dug into more.   But the only way that sass and coffee could porcess properly without #2387 is if theme files were put somewhere within edx-platform (common, lms, or cms) - which would be bad form.   To get the /edx/app/edxapp/theme  path added to coffee and sass processing, the changes from #2387 to rakelib/assets must be in place.

So - my question to the others:  how on earth does your theme work using https://github.com/edx/edx-platform/wiki/Stanford-Theming ?

For this to work from within server-vars.yml, the ansible playbooks would have to put this in a different place than /edx/app/edxapp/theme...

(I'd have tested this tonight, and not asked the questions - but, sorry to say, my graphics card died, so I'm out a computer at the moment)

Just to be clearer that I'm serious in this question:
Thanks,
- Yarko

Trinh Nguyen

unread,
Mar 18, 2014, 4:11:42 AM3/18/14
to Yarko Tymciurak, edx-...@googlegroups.com, velcro
I did successfully apply the Standford theme on March 6 following exactly the steps from the wiki.

I will update the output of the combine asset command tonight (9-10PM GMT+7) because my company network blocks the ssh connection right now.


Trinh Nguyen

unread,
Mar 18, 2014, 8:12:38 AM3/18/14
to Yarko Tymciurak, edx-...@googlegroups.com, velcro
Hi,

You were right, i ran the collect assest command and got this error:

  • rake lms:gather_assets:aws
      error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/application-extend2.scss (Line 23: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/application.scss (Line 22: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/course.scss (Line 14: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)


  • rake cms:gather_assets:aws

      error lms/static/sass/application-extend1.scss (Line 23: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/application-extend2.scss (Line 23: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/application.scss (Line 22: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)
      error lms/static/sass/course.scss (Line 14: File to import not found or unreadable: stanford.
Load paths:
  /edx/app/edxapp/edx-platform
  /edx/app/edxapp/edx-platform/common/static/sass
  /edx/app/edxapp/edx-platform/cms/static
  /edx/app/edxapp/edx-platform/common/static
  /edx/app/edxapp/edx-platform/lms/static)


But the theme is still applied to the running instance.


Trinh Nguyen

unread,
Mar 18, 2014, 8:43:10 AM3/18/14
to Yarko Tymciurak, edx-...@googlegroups.com, velcro
After I updated the edx-platform from master branch, I logged in and navigate to a course intro page. I got a 500 error.

The log file says:

DatabaseError: (1146, "Table 'edxapp.user_api_usercoursetag' doesn't exist")

I produced a db migration and things are ok now.

Vicki Crosson

unread,
Mar 18, 2014, 8:47:36 AM3/18/14
to Trinh Nguyen, edx-...@googlegroups.com, Yarko Tymciurak

That's exactly the error I've been getting.

velcro

unread,
Mar 18, 2014, 11:31:49 AM3/18/14
to edx-...@googlegroups.com, Trinh Nguyen, Yarko Tymciurak, vicki....@gmail.com
Trinh, did you simply 'git update' the edx-platform, and then './manage.py lms syncdb --migrate'? And then you could gather_assets and your custom theme worked?

That 500 error you got is almost certainly the one I started with, at the top of the thread!  I'm starting up a new instance to see whether everything looks the same from my end. 

velcro

unread,
Mar 18, 2014, 11:42:20 AM3/18/14
to edx-...@googlegroups.com, Trinh Nguyen, Yarko Tymciurak, vicki....@gmail.com
Argh, sorry. 'git pull', obviously.

velcro

unread,
Mar 18, 2014, 12:52:08 PM3/18/14
to edx-...@googlegroups.com, Trinh Nguyen, Yarko Tymciurak, vicki....@gmail.com
Okay, having tried on a fresh instance, I used the provision method and checked my git status: up to date.

After running migrations (sudo -u www-data /edx/app/edxapp/venvs/edxapp/bin/python ./manage.py lms syncdb --migrate --settings aws) I still get the same errors when trying to rake. Trinh: not sure how you got that to work?
Reply all
Reply to author
Forward
0 new messages