Missing Images, Graphs, Questions

Thank you for your effort. Following installation, I got a corrupted database error. Ran the recommended sqlite routine to repair the db and it appeared to work. Launched Kolibri, then it went through the normal setup routine, but then failed with the errors copied below:

484 static files copied to ‘/home/pi/.kolibri/static’.
Operations to perform:
Apply all migrations: admin, auth, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, sessions
Running migrations:
No migrations to apply.
Installed 2 object(s) from 1 fixture(s)
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/sqlite3/base.py”, line 328, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such column: content_channelmetadata.published_size

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/bin/kolibri”, line 11, in
load_entry_point(‘kolibri==0.11.1.dev0+git.20181217210944’, ‘console_scripts’, ‘kolibri’)()
File “/usr/lib/python3/dist-packages/kolibri/utils/cli.py”, line 609, in main
initialize(debug=debug)
File “/usr/lib/python3/dist-packages/kolibri/utils/cli.py”, line 174, in initialize
update()
File “/usr/lib/python3/dist-packages/kolibri/utils/cli.py”, line 253, in update
update_channel_metadata()
File “/usr/lib/python3/dist-packages/kolibri/core/content/utils/annotation.py”, line 46, in update_channel_metadata
import_channel_from_local_db(channel_id)
File “/usr/lib/python3/dist-packages/kolibri/core/content/utils/channel_import.py”, line 675, in import_channel_from_local_db
import_manager.import_channel_data()
File “/usr/lib/python3/dist-packages/kolibri/core/content/utils/channel_import.py”, line 507, in import_channel_data
if self.check_and_delete_existing_channel():
File “/usr/lib/python3/dist-packages/kolibri/core/content/utils/channel_import.py”, line 397, in check_and_delete_existing_channel
existing_channel = ChannelMetadata.objects.get(id=self.channel_id)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/manager.py”, line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 374, in get
num = len(clone)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 232, in len
self._fetch_all()
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 1118, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 53, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/sql/compiler.py”, line 899, in execute_sql
raise original_exception
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/sql/compiler.py”, line 889, in execute_sql
cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/utils.py”, line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/utils/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/sqlite3/base.py”, line 328, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such column: content_channelmetadata.published_size

Hi @cjackson,

What was the kolibri version you were using before installing 0.11.1.dev0+git.20181217210944?
If possible, could you please also provide kolibri.log in the directory ~/.kolibri?
Thank you so much!

Hi @lingyi:

I installed kolibri_0.11.1.dev0+git.20181217210944-0ubuntu1_all.deb over top of the previous installation.

Here’s a link to download from DropBox: https://www.dropbox.com/s/j53va91mus5a44y/kolibri.log.zip?dl=0

It’s a zipped file. Hope that is ok.

Hi @cjackson

Could you please send the log file to my email address lingyi@learningequality.org? Thank you!

just sent you a download link. Here it is again:

thank you!

Hi @cjackson,

Could you try running kolibri stop and then kolibri manage migrate?

You can restart the server with kolibri start if you see something like:

Running migrations:
  Applying content.0011_auto_20180907_1017... OK

If you don’t see the message above, please put the output in your terminal here. Thank you!

Did not work. Here is the output:

pi@raspberrypi:~ $ kolibri manage migrate
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO:kolibri.core.apps:Running Kolibri with the following settings: kolibri.deployment.default.settings.base
Operations to perform:
Apply all migrations: admin, auth, content, contenttypes, device, discovery, exams, kolibriauth, lessons, logger, morango, sessions
Running migrations:
No migrations to apply.

Hi @cjackson

I’m sorry that I’m not able to reproduce the error from my side. Could you help me debug your kolibri instance by running the command kolibri manage showmigrations and putting the result here? Thank you so much!

See below. Thank you again for your assistance. Was thinking of just doing a fresh install, but thought working through this process with you would help debug for other possible problems, so let’s see this through to find the cause. I’m in West Africa Time GMT-1, so that’s the delay in my replies.

pi@raspberrypi:~ $ kolibri manage showmigrations
WARNING:root:No C Extensions available for this platform.

INFO Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO:kolibri.core.apps:Running Kolibri with the following settings: kolibri.deployment.default.settings.base
admin
[X] 0001_initial
[X] 0002_logentry_remove_auto_add
auth
[X] 0001_initial
[X] 0002_alter_permission_name_max_length
[X] 0003_alter_user_email_max_length
[X] 0004_alter_user_username_opts
[X] 0005_alter_user_last_login_null
[X] 0006_require_contenttypes_0002
[X] 0007_alter_validators_add_error_messages
[X] 0008_alter_user_username_max_length
content
[X] 0001_initial
[X] 0002_channelmetadatacache_last_updated
[X] 0003_auto_20170607_1212
[X] 0004_auto_20170825_1038
[X] 0005_auto_20171009_0903
[X] 0006_auto_20171128_1703
[X] 0007_auto_20180212_1155
[X] 0008_contentnode_coach_content
[X] 0009_auto_20180410_1139
[X] 0008_auto_20180429_1709
[X] 0010_merge_20180504_1540
[X] 0011_auto_20180907_1017
[X] 0012_auto_20180910_1702
[X] 0013_auto_20180919_1142
contenttypes
[X] 0001_initial
[X] 0002_remove_content_type_name
device
[X] 0001_initial
[X] 0002_devicesettings_default_facility
[X] 0003_contentcachekey
discovery
[X] 0001_initial
exams
[X] 0001_initial
kolibriauth
[X] 0001_initial
[X] 0002_auto_20170608_2125
[X] 0003_auto_20170621_0958
[X] 0004_auto_20170816_1607
[X] 0005_auto_20170818_1203
[X] 0006_auto_20171206_1207
[X] 0007_auto_20171226_1125
[X] 0008_auto_20180222_1244
[X] 0009_auto_20180301_1123
[X] 0010_auto_20180320_1320
[X] 0011_facilitydataset_show_download_button_in_learn
[X] 0012_facilitydataset_allow_guest_access
[X] 0013_auto_20180917_1213
lessons
[X] 0001_initial
[X] 0002_auto_20180221_1115
logger
[X] 0001_initial
[X] 0002_auto_20170518_1031
[X] 0003_auto_20170531_1140
[X] 0004_tidy_progress_range
[X] 0005_auto_20180514_1419
morango
[X] 0001_initial
[X] 0002_auto_20170511_0400
[X] 0003_auto_20170519_0543
[X] 0004_auto_20170520_2112
[X] 0005_auto_20170629_2139
[X] 0006_instanceidmodel_system_id
[X] 0007_auto_20171018_1615
[X] 0008_auto_20171114_2217
[X] 0009_auto_20171205_0252
[X] 0010_auto_20171206_1615
sessions
[X] 0001_initial
pi@raspberrypi:~ $

Hi @cjackson,

thank you so much for your patience! I really appreciate your help on debugging this issue. From the output you pasted above, I don’t find any problem that could lead to the error you’ve been seeing. If you don’t mind, could you please send the database file (~/.kolibri/db.sqlite3) to my email address (lingyi@learningequality.org) so I can directly debug it? Thank you!

Here’s a DropBox link to the zipped file:

Hi @cjackson,

thank you so much for the database file! Could you run the following commands and see if that helps fix the error?

  1. kolibri stop
  2. kolibri manage migrate content 0010_merge_20180504_1540
  3. kolibri start

I ran the above commands and the error no such column: content_channelmetadata.published_size was gone.

However I got another error when kolibri started:

OperationalError: no such column: kolibriauth_facilitydataset.allow_guest_access

If you get the same error as me, please run the following commands:

  1. kolibri stop
  2. kolibri manage migrate kolibriauth 0011_facilitydataset_show_download_button_in_learn
  3. kolibri start

Please feel free to let me know things still don’t work. Thanks!

Thank you for your efforts. I follow the instructions and did indeed have to perform the two parts to get Kolibri up and running again. I’m including a link to the kolibri.log file here:

The first time I completed the 2nd part after the OperationError, Kolibri started. However, when I ran ‘kolibri status’, it crashed. I believe this is reflected in the log file. Then I restarted Kolibri and it us running. Doing a status check this time did not cause a crash.

I have confirmed that the other fix(es) you have performed do in fact resolve the problems initially raised in this thread. Thank you for that!

I have noticed that it does seem to run slower than before. I wonder if the fixes that make the system work on this earlier WebKit version also causes a hit on performance? Or is it that this is an experimental fix that will need to be cleaned up for improved performance? Or maybe my perceptions are off? (I accept the latter could very well be the case!)

Thank you again for your effort. If there is a place/way for you to explain what went wrong so that I can understand and possibly troubleshoot on my end, I’d appreciate that.

Chris

One last question: Is there a chance this fix can be wrapped into an update for KA Lite? The same problem exists there, too, and I have people using the same iPads to access KA Lite. I know KA Lite is no longer the the primary focus of your work at LE, but it would be nice to see this fix on that platform as well.

Thanks for your consideration.

Chris

Hi -

Glad to hear the original iOS issue was addressed. We will get that fix into release 0.11.1. This will hopefully be in time for your program to start on January 13, or if necessary we can publish an official 0.11.1-beta that should suffice for your purposes.

The iOS issue was caused by how some URL paths were being formatted, and how older Safari versions handled those paths differently from other browsers. Here are the github issue and pull request with the fix.

As far as I know, there are no changes that should have affected performance - except of course that files which previously weren’t loading at all are now loading correctly. If you are experiencing slower performance in other parts of the app besides the previously broken exercises, let us know.

Sorry to hear about the DB issues - we’ll continue to investigate in the new year. Might want to start a new thread for those or take it to PM.

Regarding KA, I’ve filed a new issue here. I’m a little surprised that the same problem would be occurring because the systems are so different, but it’s certainly possible. We don’t have the bandwidth to work on that change, but perhaps someone in the community might.

Quick heads-up: our offices are closed from now until January 2.

happy holidays,
Devon

Thanks, @devon, for the explanation.

@lingyi: Kolibri has continued to crash. I’ve inserted the kolibri.log data from yesterday to today that shows the errors, etc.

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/sqlite3/base.py”, line 328, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such column: kolibriauth_facilitydataset.allow_guest_access

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/kolibri/dist/django/core/handlers/exception.py”, line 41, in inner
response = get_response(request)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/core/handlers/base.py”, line 178, in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
File “/usr/lib/python3/dist-packages/kolibri/core/middleware/signin_page.py”, line 29, in process_view
dataset = getattr(Facility.get_default_facility(), ‘dataset’, None)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/fields/related_descriptors.py”, line 184, in get
rel_obj = self.get_object(instance)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/fields/related_descriptors.py”, line 159, in get_object
return qs.get(self.field.get_reverse_related_filter(instance))
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 374, in get
num = len(clone)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 232, in len
self._fetch_all()
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 1118, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/query.py”, line 53, in iter
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/sql/compiler.py”, line 899, in execute_sql
raise original_exception
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/models/sql/compiler.py”, line 889, in execute_sql
cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/utils.py”, line 94, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/utils/six.py”, line 685, in reraise
raise value.with_traceback(tb)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/utils.py”, line 64, in execute
return self.cursor.execute(sql, params)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/db/backends/sqlite3/base.py”, line 328, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such column: kolibriauth_facilitydataset.allow_guest_access
ERROR 2018-12-22 13:56:05,671 cli During graceful shutdown, server says: Kolibri server configuration error (9)
ERROR 2018-12-22 13:56:05,758 cli Not responding, killing with force
INFO 2018-12-22 13:56:38,450 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-22 13:57:18,385 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-22 13:58:30,227 vacuumsqlite Sqlite database Vacuum finished.
INFO 2018-12-22 13:58:30,387 cli Running update routines for new version…
INFO 2018-12-22 13:58:34,161 cli Running ‘kolibri start’ as daemon (system service)
INFO 2018-12-22 13:58:34,283 cli Kolibri running on:

INFO 2018-12-22 13:58:34,286 cli Going to daemon mode, logging to /home/pi/.kolibri/server.log
INFO 2018-12-22 13:58:34,421 ping Attempting a ping.
INFO 2018-12-22 13:58:35,239 utils Started new MESSAGEPROCESSOR thread ID#edward-leopard-oxygen-uniform
INFO 2018-12-22 13:58:35,243 utils Started new SCHEDULER thread ID#leopard-neptune-alanine-kitten
INFO 2018-12-22 13:58:35,246 utils Started new WORKERMESSAGEHANDLER thread ID#timing-queen-spring-hotel
INFO 2018-12-22 13:59:22,890 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-22 13:59:48,778 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-22 14:00:52,868 vacuumsqlite Sqlite database Vacuum finished.
INFO 2018-12-22 14:00:53,030 cli Running update routines for new version…
INFO 2018-12-22 14:00:57,957 cli Running ‘kolibri start’ as daemon (system service)
INFO 2018-12-22 14:00:58,066 cli Kolibri running on:

INFO 2018-12-22 14:00:58,069 cli Going to daemon mode, logging to /home/pi/.kolibri/server.log
INFO 2018-12-22 14:00:58,227 ping Attempting a ping.
INFO 2018-12-22 14:00:59,433 utils Started new MESSAGEPROCESSOR thread ID#sweet-two-wyoming-item
INFO 2018-12-22 14:00:59,436 utils Started new SCHEDULER thread ID#friend-potato-jig-blossom
INFO 2018-12-22 14:00:59,438 utils Started new WORKERMESSAGEHANDLER thread ID#bravo-pasta-nebraska-arizona
INFO 2018-12-22 14:01:48,383 vacuumsqlite Sqlite database Vacuum finished.
INFO 2018-12-22 14:01:48,408 vacuumsqlite Next Vacuum at 3AM local server time (in 778.1833333333333 minutes).
INFO 2018-12-22 14:01:52,801 ping Ping succeeded! (response: {‘id’: 130966})
INFO 2018-12-22 14:02:05,596 ping Sleeping for 1440.0 minutes.
INFO 2018-12-22 14:03:06,267 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-22 14:13:00,899 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-22 14:14:50,112 vacuumsqlite Sqlite database Vacuum finished.
INFO 2018-12-22 14:14:50,266 cli Running update routines for new version…
INFO 2018-12-22 14:14:54,267 cli Running ‘kolibri start’ as daemon (system service)
INFO 2018-12-22 14:14:54,350 cli Kolibri running on:

INFO 2018-12-22 14:14:54,353 cli Going to daemon mode, logging to /home/pi/.kolibri/server.log
INFO 2018-12-22 14:14:54,466 ping Attempting a ping.
INFO 2018-12-22 14:14:55,555 utils Started new MESSAGEPROCESSOR thread ID#pasta-fruit-green-carpet
INFO 2018-12-22 14:14:55,560 utils Started new SCHEDULER thread ID#early-enemy-paris-robin
INFO 2018-12-22 14:14:55,566 utils Started new WORKERMESSAGEHANDLER thread ID#wolfram-avocado-edward-eighteen
INFO 2018-12-22 14:15:29,473 vacuumsqlite Sqlite database Vacuum finished.
INFO 2018-12-22 14:15:29,480 vacuumsqlite Next Vacuum at 3AM local server time (in 764.5 minutes).
INFO 2018-12-22 14:15:31,584 ping Ping succeeded! (response: {‘id’: 130973})
INFO 2018-12-22 14:15:43,821 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-22 14:15:44,946 ping Sleeping for 1440.0 minutes.
INFO 2018-12-23 15:54:21,165 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-23 15:54:43,168 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-23 15:56:27,111 vacuumsqlite Sqlite database Vacuum finished.
INFO 2018-12-23 15:56:27,400 cli Running update routines for new version…
INFO 2018-12-23 15:56:35,035 cli Running ‘kolibri start’ as daemon (system service)
INFO 2018-12-23 15:56:35,159 cli Kolibri running on:

INFO 2018-12-23 15:56:35,164 cli Going to daemon mode, logging to /home/pi/.kolibri/server.log
INFO 2018-12-23 15:56:35,391 ping Attempting a ping.
INFO 2018-12-23 15:56:36,698 utils Started new MESSAGEPROCESSOR thread ID#coffee-november-alabama-colorado
INFO 2018-12-23 15:56:36,704 utils Started new SCHEDULER thread ID#green-sierra-hamper-montana
INFO 2018-12-23 15:56:36,709 utils Started new WORKERMESSAGEHANDLER thread ID#potato-missouri-aspen-quiet
INFO 2018-12-23 15:57:36,597 vacuumsqlite Sqlite database Vacuum finished.
INFO 2018-12-23 15:57:36,619 vacuumsqlite Next Vacuum at 3AM local server time (in 662.3833333333333 minutes).
INFO 2018-12-23 15:57:37,797 apps Running Kolibri with the following settings: kolibri.deployment.default.settings.base
INFO 2018-12-23 15:57:51,346 ping Ping succeeded! (response: {‘id’: 131718})
INFO 2018-12-23 15:58:12,413 ping Sleeping for 1440.0 minutes.

Hi,

Sorry for the late reply. Usually that OperationalError means that the migration was not applied. However, your previous result of “showmigrations” indicated that the migration had been applied. The commands I mentioned last time were to un-apply the migration and apply it again to make the column appear in the database. I’m sorry that I’m still unsure why the column disappeared in the database while the migration had been applied.

You mentioned that kolibri has continued to crash. Is the error still the OperationalError: no such column: kolibriauth_facilitydataset.allow_guest_access? Did it occur after running the commands below? Thank you!

  1. kolibri stop
  2. kolibri manage migrate kolibriauth 0011_facilitydataset_show_download_button_in_learn
  3. kolibri start

@radina-matic @lingyi
Devon and Radina: we have just completed translation of Kolibri 0.11 content. It has been checked and approved. Since there has been discussion of doing an interim fix release that includes the fix for older iOS URL handling, is there any chance we could get the FV version wrapped in as well? Our big annual literacy workshops start Jan. 13. We have completed almost all of KA Early Math as well. They are preparing a topic tree for us to have a demo site available to work with as well, but we would very much like to have the KA content working inside the Kolibri framework in Fulfulde so the learners can use and give feedback to us while they are here.

Thanks for your consideration.

Getting your Kolibri translations in shouldn’t be a problem. Adding the new KA content channels might be a little tricker but I’ll let the content folks know.