# CONTENT\_ROOT configuration not working

**URL:** <https://community.learningequality.org/t/content-root-configuration-not-working/302>\
**Category:** KA Lite\
**Created:** [July 26, 2017, 1:41pm UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302 "2017-07-26T13:41:56Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [July 26, 2017, 1:41pm UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/1 "2017-07-26T13:41:56Z")

</div>

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

If I set the CONTENT\_ROOT, update 127.0.0.1:8008/update/videos/ runs for 1 second and nothing is updated.

## System information

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

## server.log

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 [http://0.0.0.0:8008](http://0.0.0.0:8008)  
[INFO] [2017-07-26 21:27:16,079] cherrypy.error: [26/Jul/2017:21:27:16] ENGINE Bus STARTED

## settings.py

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  
kalite2:x:1007:1007::/srv/kalite:/bin/bash

## 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):  
192.168.1.100:8008/

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

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [July 31, 2017, 5:34pm UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/2 "2017-07-31T17:34:08Z")

</div>

This was also reported (and solved) on Github: [https://github.com/learningequality/ka-lite/issues/5487](https://github.com/learningequality/ka-lite/issues/5487)

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [July 31, 2017, 5:39pm UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/3 "2017-07-31T17:39:26Z")

</div>

@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 127.0.0.1:8008/update/videos/ 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 🙂

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [July 31, 2017, 5:40pm UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/4 "2017-07-31T17:40:14Z")

</div>

> (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?

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 1, 2017, 5:22am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/6 "2017-08-01T05:22:20Z")

</div>

Hi Benjamin  
There is a screenshot in the closed github issue

 ![](https://canada1.discourse-cdn.com/flex035/uploads/learneq/original/1X/25ca5fc7ee131d9c966cc296b5a36c8c5e7d16a5.jpg)  
It show the result of clicking on “Scan content folder for videos”

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 1, 2017, 7:24am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/7 "2017-08-01T07:24:46Z")

</div>

Emptry Content DB

 ![](https://canada1.discourse-cdn.com/flex035/uploads/learneq/original/1X/80afdfae53a1eadfcfd945ad386d4e32d35f5ac1.png)

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 1, 2017, 7:25am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/8 "2017-08-01T07:25:33Z")

</div>

Can the scan be launched manually from the command line?

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [August 1, 2017, 8:13am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/9 "2017-08-01T08:13:34Z")

</div>

> [@nobicycle](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 1, 2017, 8:22am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/10 "2017-08-01T08:22:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [August 1, 2017, 9:13am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/11 "2017-08-01T09:13:41Z")

</div>

> [@nobicycle](#):
>
> ```
> pip2 install --user ka-lite
> 
> ```

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

> [@nobicycle](#):
>
> Do I really need to download another 1G to kickstart KA-lite?

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.

> [@nobicycle](#):
>
> Where I am, power cuts are frequent and internet slow. All will be lost if power goes off.

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?

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 1, 2017, 10:50am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/12 "2017-08-01T10:50:40Z")

</div>

Benjamin. Thanks very much for your help.  
Best wishes

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 1, 2017, 11:36am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/13 "2017-08-01T11:36:49Z")

</div>

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

> **[Temporarily change /tmp](https://www.linuxquestions.org/questions/slackware-14/temporarily-change-tmp-921057/)**
>
> Hi all, Basically, I am trying to build some software using SlackBuilds, but I do not have sufficient space on /tmp. Is there a way of temporarily

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [August 1, 2017, 11:43am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/14 "2017-08-01T11:43:48Z")

</div>

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:

```auto
wget --continue -O en.zip http://pantry.learningequality.org/downloads/ka-lite/0.17/content/contentpacks/en.zip

```

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 3, 2017, 11:10am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/15 "2017-08-03T11:10:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![benjamin](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/benjamin/32/574_2.png) [@benjamin](https://community.learningequality.org/u/benjamin)\
**Post date:** [August 3, 2017, 11:31am UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/16 "2017-08-03T11:31:38Z")

</div>

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

```
kalite manage retrievecontentpack local en en.zip

```

Afterwards, you can delete `en.zip` to free up space, but it’s also good to keep for later 🙂

---

<div class="post-metadata">

**Author:** ![nobicycle](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.learningequality.org/nobicycle/32/131_2.png) [@nobicycle](https://community.learningequality.org/u/nobicycle)\
**Post date:** [August 3, 2017, 12:27pm UTC](https://community.learningequality.org/t/content-root-configuration-not-working/302/17 "2017-08-03T12:27:20Z")

</div>

Greate. Thanks again
