Error importing users

hello again, I have to add more than 500 users and try to use the import option, however when I do it I get the following error

Hi @Billy,

When you click on Ayudanos informando sobre este error what information does it show, could you copy paste the information here to give us more information to debug?

Kind Regards,
Richard

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/job.py”, line 174, in to_json
string_result = json.dumps(working_dictionary)
File “/usr/lib/python3.8/json/init.py”, line 231, in dumps
return _default_encoder.encode(obj)
File “/usr/lib/python3.8/json/encoder.py”, line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File “/usr/lib/python3.8/json/encoder.py”, line 257, in iterencode
return _iterencode(o, 0)
File “/usr/lib/python3.8/json/encoder.py”, line 179, in default
raise TypeError(f’Object of type {o.class.name} ’
TypeError: Object of type proxy is not JSON serializable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/worker.py”, line 61, in handle_finished_future
result = future.result()
File “/usr/lib/python3.8/concurrent/futures/_base.py”, line 437, in result
return self.__get_result()
File “/usr/lib/python3.8/concurrent/futures/_base.py”, line 389, in __get_result
raise self._exception
File “/usr/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/job.py”, line 117, in execute_job
result = func(*args, **kwargs)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/core/management/init.py”, line 131, in call_command
return command.execute(*args, **defaults)
File “/usr/lib/python3/dist-packages/kolibri/dist/django/core/management/base.py”, line 330, in execute
output = self.handle(*args, **options)
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/management/commands/base.py”, line 119, in handle
return self.handle_async(*args, **options)
File “/usr/lib/python3/dist-packages/kolibri/core/auth/management/commands/bulkimportusers.py”, line 852, in handle_async
self.exit_if_error()
File “/usr/lib/python3/dist-packages/kolibri/core/auth/management/commands/bulkimportusers.py”, line 769, in exit_if_error
self.job.save_meta()
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/job.py”, line 244, in save_meta
self.storage.save_job_meta(self)
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/storage.py”, line 287, in save_job_meta
self._update_job(job.job_id, extra_metadata=job.extra_metadata)
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/storage.py”, line 300, in _update_job
orm_job.saved_job = job.to_json()
File “/usr/lib/python3/dist-packages/kolibri/core/tasks/job.py”, line 178, in to_json
raise TypeError(
TypeError: Job objects need to be JSON-serializable: Object of type proxy is not JSON serializable

apparently it is an error because the file is not in the correct format

Yes - that does seem to be the issue, although it should report that error to you rather than showing an error page!

I am filing an issue for this on our tracker, it should be fixed in a patch release on 0.15.x.

For now, make sure that the file you are uploading is a valid CSV file - other file types will not be processed.

I have filed an issue on our Github here: Reporting an error in bulkimportusers triggers an error · Issue #9554 · learningequality/kolibri · GitHub - hopefully we should be able to resolve this by the end of August.

Hello @Bily , looking at your error traceback I see the problem is not in the file format but in the way errors in the file are notified. Your file contains some error that should be shown in the browser. The errors are translated into your server language and it seems the translation is failing.

To try to reproduce it, could you give me more info about your server? kolibri version, Operative system, language (probably es-GT , etc.) ?

I’ve tried to reproduce it using Ubuntu 20.04 and the translation is correct and this error does not appear so I guess you’re using a different system.

Thanks
José

Hi @Billy,

@jredrejo has made a fix for what we think was the cause of this, and it should be in the next patch release of Kolibri that will be out in just under two weeks. Thanks for reporting and helping us improve Kolibri!

Kind Regards,
Richard