esitarski / RaceDB

Web-based bike race registration application
15 stars 10 forks source link

core_competition.gpx_course_default_id #53

Closed hainesj closed 1 year ago

hainesj commented 1 year ago

Just downloaded the latest version RaceDB v3.0.92-20230922171640 I am getting an error when clicking on the Competitions. Similar errors occur when clicking on the GPX Courses, HUB, and Analytics. When i click on Images i get an error involving "no such column: core_image.url"

This is the error message when clicking on the Competitions. Environment:

Request Method: GET Request URL: http://192.168.1.21:8000/RaceDB/Competitions/

Django Version: 4.2.5 Python Version: 3.11.5 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_extensions', 'crispy_forms', 'crispy_bootstrap3', 'core') Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware']

Traceback (most recent call last): File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 89, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute return super().execute(query, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The above exception (no such column: core_competition.gpx_course_default_id) was the direct cause of the following exception: File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RaceDB\core\views_common.py", line 108, in wrap response = response or decorated_func( request, *args, *kwargs ) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RaceDB\core\WriteLog.py", line 90, in new_f return f( args, kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\contrib\auth\decorators.py", line 23, in _wrapper_view return view_func(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\RaceDB\core\views.py", line 1132, in CompetitionsDisplay last_competition = Competition.objects.all().order_by('-start_date').first() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\models\query.py", line 1057, in first for obj in queryset[:1]: ^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\models\query.py", line 398, in iter self._fetch_all() ^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\models\query.py", line 1881, in _fetch_all self._result_cache = list(self._iterable_class(self)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\models\query.py", line 91, in iter results = compiler.execute_sql(

File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\models\sql\compiler.py", line 1562, in execute_sql cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 102, in execute return super().execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 67, in execute return self._execute_with_wrappers(

File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 84, in _execute with self.db.wrap_database_errors: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\utils.py", line 91, in exit raise dj_exc_value.with_traceback(traceback) from exc_value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\utils.py", line 89, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Jeff\AppData\Local\Programs\Python\Python311\Lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute return super().execute(query, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Exception Type: OperationalError at /RaceDB/Competitions/ Exception Value: no such column: core_competition.gpx_course_default_id

hainesj commented 1 year ago

Update. I have resolved the issue. Evidently there were some Core migrations that needed to be created. I went to the command prompt and ran the makemigrations option, then migrate.

esitarski commented 1 year ago

It appears you are not running from the Docker container.

All of the migrations are checked in to the RaceDB project. To apply them, you just need to do:

python3 manage.py migrate

If you were running from the Docker container, this would be done automatically.

On Sat, Sep 30, 2023 at 2:19 AM hainesj @.***> wrote:

Closed #53 https://github.com/esitarski/RaceDB/issues/53 as completed.

— Reply to this email directly, view it on GitHub https://github.com/esitarski/RaceDB/issues/53#event-10516767043, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGXKLGTLMEAG3OW7Z4UBTX462VTANCNFSM6AAAAAA5NKMKA4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Edward Sitarski