CONTENT_ROOT configuration not working

(note URL prefix is missing due to restriction on new users posting url’s)

If I set the CONTENT_ROOT, update runs for 1 second and nothing is updated.

System information

Arch Linux 4.9.33-1
$ pip2 -V
pip 9.0.1 from /usr/lib/python2.7/site-packages (python 2.7)


cat /srv/kalite/.kalite/server.log
[INFO] [2017-07-26 21:27:15,951] cherrypy.error: [26/Jul/2017:21:27:15] ENGINE Listening for SIGHUP.
[INFO] [2017-07-26 21:27:15,959] cherrypy.error: [26/Jul/2017:21:27:15] ENGINE Listening for SIGTERM.
[INFO] [2017-07-26 21:27:15,964] cherrypy.error: [26/Jul/2017:21:27:15] ENGINE Listening for SIGUSR1.
[INFO] [2017-07-26 21:27:15,964] cherrypy.error: [26/Jul/2017:21:27:15] ENGINE Bus STARTING
[INFO] [2017-07-26 21:27:15,964] cherrypy.error: [26/Jul/2017:21:27:15] Loading and serving the Django application
[INFO] [2017-07-26 21:27:15,968] cherrypy.error: [26/Jul/2017:21:27:15] ENGINE Started monitor thread ‘_TimeoutMonitor’.
[INFO] [2017-07-26 21:27:16,011] kalite: Running 1 due jobs… (“Secure Sync”)
[INFO] [2017-07-26 21:27:16,076] cherrypy.error: [26/Jul/2017:21:27:16] ENGINE Serving on
[INFO] [2017-07-26 21:27:16,079] cherrypy.error: [26/Jul/2017:21:27:16] ENGINE Bus STARTED

from kalite.project.settings.base import *
CONTENT_ROOT = “/media/esata/MEDIA/Videos/Education/Khan-Academy2”
DEBUG = True

Check of permissions

sudo -u kalite2 ls -1l /media/esata/MEDIA/Videos/Education/Khan-Academy2|head -10
total 32257136
-rw-r–r-- 1 adrian adrian 2518 Oct 25 2016 01c12NaUQDw.jpg
-rw-r–r-- 1 adrian adrian 1757525 Jun 16 2013 01c12NaUQDw.mp4
-rw-r–r-- 1 adrian adrian 64880 Jun 16 2013 01c12NaUQDw.png
-rw-r–r-- 1 adrian adrian 2504 Oct 25 2016 _01wqwsb66E.jpg
-rw-r–r-- 1 adrian adrian 2463761 Jun 16 2013 _01wqwsb66E.mp4
-rw-r–r-- 1 adrian adrian 60678 Jun 16 2013 _01wqwsb66E.png
-rw-r–r-- 1 adrian adrian 7404963 Jun 16 2013 02gVmoObrjM.mp4
-rw-r–r-- 1 adrian adrian 160541 Jun 23 2013 02gVmoObrjM.png
-rw-r–r-- 1 adrian adrian 5452291 Jun 16 2013 02h9yhc7ruc.mp4

KA Lite User

cat /etc/passwd|grep kalite2

KA Lite Start/Stop

sudo su -l kalite2 -c “KALITE_DIR=’/srv/kalite’ /srv/kalite/.local/bin/kalite start”

Running ‘kalite start’ as daemon (system service)
Going to daemon mode, logging to /srv/kalite/.kalite/server.log

To access KA Lite from another connected computer, try the following address(es):

To access KA Lite from this machine, try the following address:

This was also reported (and solved) on Github:

@nobicycle if you have further issues, please report them here.

I can see that you have added parts of the missing stuff in the settings file now.

If I set the CONTENT_ROOT, update runs for 1 second and nothing is updated.

What do you mean “is updated”? It’s like you haven’t changed the problem description? It would be nice if you could explain the issue in more detail or add a screenshot :slight_smile:

(note URL prefix is missing due to restriction on new users posting url’s)

This is silly, @laura could you change some setting so people can post tracebacks with URLs? Then in case we get too much spam, we could just revert?

Hi Benjamin
There is a screenshot in the closed github issue

It show the result of clicking on “Scan content folder for videos”

Emptry Content DB

Can the scan be launched manually from the command line?

Yes, kalite manage videoscan

But it seems like you have no content database, so KA Lite doesn’t know what to look for or run kalite manage retrievecontentpack download en.

How did you install KA Lite?

Try navigating to Manage -> Languages and download an English content pack.

Installed via

pip2 install --user ka-lite

I have 31G of Khan-Academy videos already that ran fine in the past (perhaps 2 years ago) with ka-lite.

Download or Update Language Packs

Language packs contain all available translations for the interface and video subtitles.

English Show beta language packs Get Language Pack
8468 subtitle(s) 83.07% translated 929.92 MB (to download)

Do I really need to download another 1G to kickstart KA-lite? As I’ve had a working installation in the past using this same content directory. If so, is there a way to specify the temporary directory used. I see the Language pack downloads to /tmp. Where I am, power cuts are frequent and internet slow. All will be lost if power goes off.

Cool, no problems here, only that you won’t have a content pack included so it will have to be installed after… and…

Yes, unfortunately, we had to change the layout of the content packs, not least the databases, because they were very very slow.

We maintain a compatibility between a KA Lite version and a content pack version, such that KA Lite 0.17 has content packs for 0.17 only.

Yeah, and this is very common… sorry but the reason for upgrading would be to have improvements in the software platform and updated contents from Khan Academy… so it defeats the purpose to want to reuse your old contents, anyways. In 2 years, a lot of things have changed, so I am afraid that when updating, you will also find that a lot of videos will have to be downloaded again.

If you want, try sending your location to @laura, or write it in the forum to see if there are anyone in your area who can help you fetch it?

Benjamin. Thanks very much for your help.
Best wishes

BTW. Anyone for anyone facing powercuts, and loss of downloads because /tmp is cleared out on reboot, the following should reassign tmp. Do this before starting kalite

sudo mount -o bind /tmp <new_path>/tmp

Ah yes, KA Lite doesn’t really come with a proper download manager for fetching content packs.

One way to fetch the content pack without using /tmp would be to fetch it directly and use a download command:

wget --continue -O

Thanks benjamin. Once downloaded where do I extract/place the file?

You can choose where to download it to. Then run this command:

kalite manage retrievecontentpack local en

Afterwards, you can delete to free up space, but it’s also good to keep for later :slight_smile:

1 Like

Greate. Thanks again