KA Lite doesn't serve javascript assets in Windows 10

I wanted to use ka lite to try to study when I don’t have internet connection. I’ve followed the steps on the installation page then tried to launch it. This is what I get

I’m not sure what to do from here. when I click on “learn” I go to a page whith a logo and all the legal stuff at the bottom

Hi @nana_lawless!

Thanks for getting in touch!

Could you confirm how much time you’ve waited after starting KA Lite for the first time?

From your screenshot, it’s evident that some files aren’t loading in the browser (the ones that load the menu, graphics, fonts etc). Either because they haven’t been copied in yet or because of some other problem (which would be cause for concern of a technical problem).

Thanks,
Benjamin

Hey, Thanks for resppnding! I started right after installing. Should I have waited? Ill start it again later today when I use the computer.

I have a theory that waiting a bit after starting KA Lite before loading it in your browser can do the trick, but I don’t have Windows at hand to test my theory :slight_smile:

I couldn’t test it today Becuse I was busy but I will soon

Its still doing the same thing. I waited awhile after starting it to open in browser

Hi @nana_lawless

Some files are missing, and I think it might be related to a failed setup process. Could you open a command line, find the kalite command and run kalite manage collectstatic ?

  1. WIN+R -> type cmd and press ENTER
  2. In the command line, go to your Python Scripts folder, typically cd C:\Python27\Scripts, but you may need to adapt the path to your specific system (navigate with your explorer to figure out your folder structure). cd means “change directory”, it’s a necessary step before running the kalite command on Windows.
  3. On the command line, once it’s inside the Scripts folder, type kalite manage collectstatic and press ENTER. When prompted, say “yes”.

After this is done, try refreshing your browser. You don’t need to stop/start KA Lite.

In case this doesn’t complete correctly or you have other problems, please post screenshots or copy-paste the contents of the command line.

======================================================================================
First time running KA-Lite on Windows 10 Professional, Creators Update
(ka-lite-static-0.17.0 and Python 2.7.13)

Chrome shows 23 errors on the splash page:

  1. All image links broken:
    o /static/images\logo_10-enlarged_2.png
    o /static/images/distributed/FLE.png
    o /static/images/distributed/CC-BY-NC-SA.png

Looking at the splash screen html:

  1. Referenced file not on machine: reverse.js

  2. There is no file en.js in specified path “/static/js/118n/en.js”
    (on my machine, a valid path would be C:\Python27\Lib\site-packages\kalite\static-libraries\js\i18n\en.js)

  3. For these paths on the splash page to work:
    “static/images/distributed/FLE.png” and
    “static/images/distributed/CC-BY-SA.png”
    “static/js/distributed/bundles/bundle_common.js”
    “static/js/distributed/bundles/bundle_base.js”
    “static/js/distributed/bundles/homepage.js”
    “static/js/distributed/perseus/ke/”
    the working direcory would need to be “C:\Python27\Lib\site-packages\kalite\distributed”

    This appears inconsistent with these paths on the splash page:
    “static/js/inline/bundles/bundle_bootstrap.js”
    “static/js/inline/bundles/bundle_inline_help.js”
    which require a working directory of “C:\Python27\Lib\site-packages\kalite\inline”

  4. The only button on the page, “x Close”, doesn’t work.

  5. None of the JavaScript resource files were executed.

  6. None of the CSS was implemented.

Maybe a problem with paths?

@Scott

What on earth - this is happening more and more often, could be a problem with the installer.

During installation, some steps are supposed to be executed, but this one seems to be missed from time to time.

Borrowing from your previous step guide, this is what should fix it:

  1. With File Manager, navigate to C:\Python27\Scripts
  2. Get command prompt (shift-right-click open area; select “Open command window here”)
  3. Type kalite manage collectstatic and hit [ENTER]

Hello,
I just installed it on my Windows 10 Pro machine and it works fine.
I suggest you try a fresh install but don’t install Python and KA Lite on the system drive (C:), in my past experience with other files Windows 10 tends to lock down files on the system drive.

I installed Python and KALite on D: instead (remember to point KAlite to the pip.exe in the Python folder when it asks).
Give it a shot, might just work.

Also, when you start the server for the first time wait for two prompts - the first one will tell you the server is now starting - the second prompt will confirm the server is up and running - you can confirm this by launching from the tray icon instead of typing the url in the browser.

EDIT: Do you have any chrome plugins that are ad/script blockers? Disable those for the KALite site url if you do.

Regards,
Aditya

Thanks for the insights @aditya - this is valuable, will share it with the Windows Installer team!

I had a similar problem, due to installing kalite on a different drive than C:.
I had to add “C:” in front of the paths in KALITE_PYTHON and KALITE_SCRIPT.
That allowed the server to actually run.

Now my problem is that the web page tells me I need to install the full version of the English language pack to work.
I think the install process was supposed to do that.
When I try to “Go to Language Management” I get the error:
You must be logged in with an account authorized to view this page.

When I click on the LOGIN tab, nothing happens.

@Simon_Field

Yes, this sounds like a similar problem to the one you solved by changing environment variables. Maybe @Richard_Amodia can advice on what to change further, and also make note of the possible cause of why the installer seems to get it wrong when the drive isn’t C:\.

Could you post a screen shot of this and possibly have a look in your log files to see if there are errors explaining this odd behavior?

When I Inspect the web page in Chrome, I see that static/django_js_reverse/reverse.js is not loaded.
The server log is empty.
The logs/django.log is too long to post here, but looks healthy, just the startup lines and a lot of web log info.
Everything there is prefixed by [INFO], no warnings or errors.

A screenshot of the page doing nothing when I click on the LOGIN tab would just look like the main page,
since clicking does nothing. :slight_smile:

Any ideas on how to get django_js_reverse/reverse.js to be installed in the right place?
Or is this just one aspect of a general install failure?

Hi @Simon_Field I think the KA Lite static files are not properly loaded could you try to run the following commands.
kalite.bat manage setup --noinput
kalite.bat manage collectstatic --noinput
Instructions to manually run theses commands.

  • Open the command prompt.
  • Goto the KALITE_SCRIPT_DIR path. A sample command is cd x:\xxxx\Python27\Scripts.
  • Now you can run these command kalite.bat manage setup --noinput then run kalite.bat manage collectstatic --noinput

It would also help if you post the output logs after you ran the following commands.

FYI: @Simon_Field you can also use the kalite instead of kalite.bat in these command manage setup --noinput manage collectstatic --noinput

Thanks!
That seemed to work:

C:\Python27\Scripts>kalite.bat manage setup --noinput


| | / / / _ \ | | () |
| |/ / / /
\ \ | | | | ___
| \ | _ | | | | | / _
| |\ | | | | | |
| | || __/
_| _/_| |
/ ___/|____|

https://learningequality.org/ka-lite/

     version 0.17.3

WARNING: Database file already exists!

Upgrading database to KA Lite version 0.17.3
Baking a fresh database from scratch or upgrading existing database.
Syncing…
Creating tables …
Installing custom SQL …
Installing indexes …
Installed 0 object(s) from 0 fixture(s)

Synced:

django.contrib.auth
django.contrib.sessions
django.contrib.messages
django.contrib.admin
django.contrib.staticfiles
django.contrib.contenttypes
django_js_reverse
south
kalite.coachreports
kalite.distributed
kalite.topic_tools
kalite.contentload
kalite.dynamic_assets
kalite.inline
kalite.control_panel

Not synced (use migrations):

  • tastypie
  • securesync
  • fle_utils.config
  • fle_utils.chronograph
  • kalite.main
  • kalite.updates
  • kalite.facility
  • kalite.student_testing
  • kalite.i18n
    (use ./manage.py migrate to migrate these)
    Running migrations for tastypie:
  • Nothing to migrate.
  • Loading initial data for tastypie.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for securesync:
  • Nothing to migrate.
  • Loading initial data for securesync.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for config:
  • Nothing to migrate.
  • Loading initial data for config.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for chronograph:
  • Nothing to migrate.
  • Loading initial data for chronograph.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for main:
  • Nothing to migrate.
  • Loading initial data for main.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for updates:
  • Nothing to migrate.
  • Loading initial data for updates.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for facility:
  • Nothing to migrate.
  • Loading initial data for facility.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for student_testing:
  • Nothing to migrate.
  • Loading initial data for student_testing.
    Installed 0 object(s) from 0 fixture(s)
    Running migrations for i18n:
  • Nothing to migrate.
  • Loading initial data for i18n.
    Installed 0 object(s) from 0 fixture(s)
    Skipping C:\Python27\lib\site-packages\kalite\database\templates\content_items\content_khan_en.sqlite
    Not running in interactive mode; skipping content pack download.
    Copying static media…
    Annotating availability of all content, checking for content in this directory: C:\Users\User.kalite\content
    [INFO] [2017-09-12 07:03:28,056] kalite: Annotating content for language: en, channel: khan

This may take several minutes depending on system resources…
[INFO] [2017-09-12 07:03:30,480] kalite: Annotation complete for language: en, channel: khan

CONGRATULATIONS! You’ve finished setting up the KA Lite server software.
You can now start KA Lite with the following command:

None start