Hi @regis and thanks a lot for your quick reply.
The command pip freeze
displays tutor-openedx==12.0.1
and the command tutor --version
displays tutor, version 12.1.7
.
I am not sure I have ever run the the tutor local init
command. I just checked the docs again and I think I skipped this command unintentionally (I probably did not notice it, but I am not 100% sure). Is it Ok to run it now ? Will I loose data ? The platform is already running and I did not notice anything strange so far except account deletion (but I havenβt explored everything).
The command tutor local run lms ./manage.py lms manage_user --remove <user_name> <user_email>
returns the following error:
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 259, in query
_mysql.connection.query(self, query)
MySQLdb._exceptions.ProgrammingError: (1146, "Table 'openedx.proctoring_proctoredexamstudentattempt_history' doesn't exist")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "./manage.py", line 123, in <module>
execute_from_command_line([sys.argv[0]] + django_args)
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute()
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options)
File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
output = self.handle(*args, **options)
File "/opt/pyenv/versions/3.8.6/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/openedx/edx-platform/common/djangoapps/student/management/commands/manage_user.py", line 92, in handle
return self._handle_remove(username, email)
File "/openedx/edx-platform/common/djangoapps/student/management/commands/manage_user.py", line 85, in _handle_remove
user.delete()
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/base.py", line 921, in delete
collector.collect([self], keep_parents=keep_parents)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/deletion.py", line 223, in collect
elif sub_objs:
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 278, in __bool__
self._fetch_all()
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 1242, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 55, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
File "/openedx/venv/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1142, in execute_sql
cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/openedx/venv/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 71, in execute
return self.cursor.execute(query, args)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 206, in execute
res = self._query(query)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/cursors.py", line 319, in _query
db.query(q)
File "/openedx/venv/lib/python3.8/site-packages/MySQLdb/connections.py", line 259, in query
_mysql.connection.query(self, query)
django.db.utils.ProgrammingError: (1146, "Table 'openedx.proctoring_proctoredexamstudentattempt_history' doesn't exist")
ERROR: 1
Error: Command failed with status 1: docker-compose -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.yml -f /home/ubuntu/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local run --rm lms ./manage.py lms manage_user --remove ...