Skip to content

Instantly share code, notes, and snippets.

View valera-rozuvan's full-sized avatar
💻
coding

Valera Rozuvan valera-rozuvan

💻
coding
View GitHub Profile
@valera-rozuvan
valera-rozuvan / gist:648e01e52512ef1a5251
Created April 30, 2014 10:21
Error on grader handler
[30/Apr/2014 06:20:31] "POST /preview/xblock/i4x:;_;_private;_01;_video;_f02ecbdb91c54705af02f67b784c624d/handler/xmodule_handler/save_user_state HTTP/1.1" 200 17
2014-04-30 06:20:52,224 ERROR 4611 [contentstore.views.preview] preview.py:75 - error processing ajax call
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/preview.py", line 59, in preview_handler
resp = instance.handle(handler, req, suffix)
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/core.py", line 284, in handle
return self.runtime.handle(self, handler_name, request, suffix)
File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/x_module.py", line 960, in handle
return super(MetricsMixin, self).handle(block, handler_name, request, suffix=suffix)
File "/edx/app/edxapp/venvs/edxapp/src/xblock/xblock/runtime.py", line 643, in handle
@valera-rozuvan
valera-rozuvan / gist:10662769
Created April 14, 2014 16:23
Passing Jasmine JavaScript tests...
edxapp@precise64:~/edx-platform$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
edxapp@precise64:~/edx-platform$ git pull
remote: Counting objects: 301, done.
remote: Compressing objects: 100% (294/294), done.
remote: Total 301 (delta 118), reused 8 (delta 1)
Receiving objects: 100% (301/301), 590.38 KiB | 127.00 KiB/s, done.
Resolving deltas: 100% (118/118), done.
From https://github.com/edx/edx-platform
@valera-rozuvan
valera-rozuvan / gist:10624952
Created April 14, 2014 07:42
Current state of end-time acceptance tests
=======================================
Running lms acceptance tests tests
=======================================
./manage.py lms --settings acceptance harvest --traceback --debug-mode --verbosity 2 --with-xunit --xunit-file /edx/app/edxapp/edx-platform/reports/acceptance/lms.xml lms/djangoapps/courseware/features/video.feature
Preparing to serve django's admin site static files...
Django's builtin server is running at 0.0.0.0:8003
Video component is fully rendered in the LMS in HTML5 mode ... OK
2014-04-14 03:30:30,269 WARNING [courseware.module_render] Invalid location for course id edx/test_course/Test_Course: i4x://edx/test_course/video/Video
Video component is fully rendered in the LMS in Youtube mode with HTML5 sources ... OK
Video component is not rendered in the LMS in Youtube mode with HTML5 sources ... OK
For video http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4 I try to upload transcript file (see below) and I get the following errors in Python console:
[11/Apr/2014 10:05:24] "GET /xblock/private.01.2014_T1/branch/draft/block/video055/studio_view HTTP/1.1" 200 39411
[11/Apr/2014 10:05:24] "GET /static/c0110c2/js/views/video/transcripts/editor.js HTTP/1.1" 200 9048
[11/Apr/2014 10:05:24] "GET /transcripts/check?data=%7B%22locator%22%3A%22private.01.2014_T1%2Fbranch%2Fdraft%2Fblock%2Fvideo055%22%2C%22videos%22%3A%5B%7B%22mode%22%3A%22html5%22%2C%22video%22%3A%22big_buck_bunny%22%2C%22type%22%3A%22mp4%22%7D%5D%7D HTTP/1.1" 200 244
[11/Apr/2014 10:05:32] "POST /transcripts/upload HTTP/1.1" 400 32
And the following in JavaScript console:
http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
@valera-rozuvan
valera-rozuvan / gist:10283848
Created April 9, 2014 15:35
Error when running acceptance tests
$ rake test:acceptance:lms["lms/djangoapps/courseware/features/video.feature"]
...
<Step: "And I see duration "1:00"">
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/src/lettuce/lettuce/core.py", line 144, in __call__
ret = self.function(self.step, *args, **kw)
File "/edx/app/edxapp/edx-platform/lms/djangoapps/courseware/features/video.py", line 531, in i_see_duration
assert duration() == parse_time_str(position)
@valera-rozuvan
valera-rozuvan / gist:10111639
Created April 8, 2014 11:25
Error while trying to bring up local dev Vagrant
$ cd devstack9/
$ curl https://raw.github.com/edx/configuration/master/vagrant/release/devstack/Vagrantfile > Vagrantfile
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2746 100 2746 0 0 5011 0 --:--:-- --:--:-- --:--:-- 6035
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Box 'himbasha-devstack' was not found. Fetching box from specified URL for
the provider 'virtualbox'. Note that if the URL does not have
a box for this provider, you should interrupt Vagrant now and add
@valera-rozuvan
valera-rozuvan / gist:10105375
Created April 8, 2014 09:50
Error when running rake test:acceptance:lms["lms/djangoapps/courseware/features/video.feature -s 26"]
./manage.py lms --settings acceptance migrate --traceback --noinput
Traceback (most recent call last):
File "./manage.py", line 91, in <module>
startup.run()
File "/edx/app/edxapp/edx-platform/lms/startup.py", line 21, in run
autostartup()
File "/edx/app/edxapp/edx-platform/common/lib/django_startup.py", line 15, in autostartup
mod = import_module(app + '.startup')
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
@valera-rozuvan
valera-rozuvan / gist:10018448
Created April 7, 2014 11:13
How to add a decorator so that screenshots are taken before and after a function
def print_jpg(func):
def inner(*args, **kwargs):
world.browser.driver.save_screenshot(func.func_name + '.jpg')
return func(*args, **kwargs)
return inner
@print_jpg
def change_video_speed(speed):
world.browser.execute_script("$('.speeds').addClass('open')")
@valera-rozuvan
valera-rozuvan / gist:10017776
Created April 7, 2014 10:16
How git cleans files upon rake test:acceptance ...
When you run
rake test:acceptance ...
then the following shell command is executed
git clean -fqdx test_root/logs test_root/data test_root/staticfiles test_root/uploads
@valera-rozuvan
valera-rozuvan / gist:9975087
Created April 4, 2014 13:49
Error when I run specific test
Doing a:
rake test:acceptance:lms["lms/djangoapps/courseware/features/video.feature -s 9"]
passes the test, but there are errors in the Python console:
2014-04-04 09:44:22,744 ERROR [edx.discussion] Could not create comments service user with id 1
Traceback (most recent call last):
File "/edx/app/edxapp/edx-platform/common/djangoapps/student/models.py", line 878, in create_comments_service_user
cc_user.save()