Coder Social home page Coder Social logo

racedb's People

Contributors

esitarski avatar mbuckaway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

racedb's Issues

init_oca

So having finally got some races to organise, I need once again to be able to pre-load riders into the database. Under python 2.7 I was using the init_oca process. I think it's been a victim of the python 3 upgrade as it no longer works. I've ploughed though the str/string issue, the optione/options one, but I'm still hitting more issues with the move to utf8. The load is now failing as follows:

command:
python3 /RaceDB/manage.py init_oca /racedb-data/lcca_2020_Race1_oca_entries_20201215190657.csv

error:
RaceDBVersion=v3.0.35-private databaseEngine="django.db.backends.postgresql" databaseName="racedb" ServerTimeZone="Europe/London" python="3.7.9 (default, Nov 18 2020, 05:33:08) [GCC 8.3.0]" logFileName="/racedb-data/RaceDB-log.txt" fix_bad_license_codes and emergency contacts... Traceback (most recent call last): File "/RaceDB/manage.py", line 38, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 323, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 364, in execute output = self.handle(*args, **options) File "/RaceDB/core/management/commands/init_oca.py", line 16, in handle core.init_oca.init_oca( options['fname'] ) File "/RaceDB/core/init_oca.py", line 143, in init_oca fields = utils.getHeaderFields( [unescape(v.strip()) for v in row] ) File "/RaceDB/core/utils.py", line 133, in getHeaderFields fields = [v.replace('-','_').replace('#','').strip().replace('4', 'four').replace(' ','_') for v in fields] File "/RaceDB/core/utils.py", line 133, in <listcomp> fields = [v.replace('-','_').replace('#','').strip().replace('4', 'four').replace(' ','_') for v in fields] TypeError: a bytes-like object is required, not 'str'

Thanks
Chris

Unable to add participant under multiple categories via UI

Hi, I'm getting RaceDB set back up for this year's races.

I'd like to use the feature where you can add a rider to a competition multiple times, to add them under different categories.
However, each time I'm trying this, the API call ParticipantAddToCompetitionDifferentCategory throws a DoesNotExist error: Participant matching query does not exist.

Steps to reproduce:

  • Create a competition
  • Create a license holder
  • Competition > Participant Manual Add
  • Set participants category
  • Click 'Add Category' button at the bottom
  • Confirm that you'd like to add another category

Instead of having the rider added to the competition again, I'm getting the attached error:

Environment:


Request Method: GET
Request URL: http://localhost:8000/RaceDB/Competitions/CompetitionDashboard/1/ParticipantManualAdd/1//ParticipantAddToCompetitionDifferentCategory/1/16/

Django Version: 3.2.6
Python Version: 3.9.6
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_extensions',
 'crispy_forms',
 '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 "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/RaceDB/core/views_common.py", line 108, in wrap
    response = response or decorated_func( request, *args, **kwargs )
  File "/RaceDB/core/WriteLog.py", line 90, in new_f
    return f( *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/RaceDB/core/participant.py", line 469, in ParticipantAddToCompetitionDifferentCategory
    participant.save()
  File "/RaceDB/core/models.py", line 3699, in save
    setattr( self, f, (getattr(self, f) or '').strip() )
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query_utils.py", line 144, in __get__
    instance.refresh_from_db(fields=[field_name])
  File "/usr/local/lib/python3.9/site-packages/django/db/models/base.py", line 637, in refresh_from_db
    db_instance = db_instance_qs.get()
  File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(

Exception Type: DoesNotExist at /RaceDB/Competitions/CompetitionDashboard/1/ParticipantManualAdd/1//ParticipantAddToCompetitionDifferentCategory/1/16/
Exception Value: Participant matching query does not exist.

I noticed some of those files might have been updated in the last 15 days (but I didn't dig into git history), so I've tried this on latest, beta, and I found a published Docker tag from 20-30 days ago, and found the same issue on all versions tried.

I have managed to add a participant under multiple categories by making a pre-reg spreadsheet, but that's going to be a show-stopper during registration.

License Holders Import Excel

Receive error when trying to upload a .xlsx file. Below log file:

Running init scripts stored in /docker-entrypoint-init.d
RaceDBVersion=v3.0.43-20210505130116
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/01-logstart.sh
databaseEngine="django.db.backends.postgresql"

databaseName="racedb"
RACEDB STARTED Fri May 7 10:32:49 UTC 2021
ServerTimeZone="Africa/Johannesburg"

python="3.9.5 (default, May 4 2021, 18:15:18)
/usr/sbin/entrypoint.sh: running bash script: /docker-entrypoint-init.d/02-postgres.sh
[GCC 8.3.0]"
Waiting for Postgres to start up...
logFileName="/racedb-data/RaceDB-log.txt"
Checking if the racedb exists...
RaceDBVersion=v3.0.43-20210505130116
RaceDB DB already exists. Not creating.
databaseEngine="django.db.backends.postgresql"

databaseName="racedb"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/10-configure.sh
ServerTimeZone="Africa/Johannesburg"
Configuring RaceDB for psql-local
python="3.9.5 (default, May 4 2021, 18:15:18)
Configured Date/Time for ISO format
[GCC 8.3.0]"

logFileName="/racedb-data/RaceDB-log.txt"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/20-data.sh
Not Found: /favicon.ico
Database already initialized.
WARNING:django.request:Not Found: /favicon.ico

psql: FATAL: the database system is starting up
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/30-backup.sh
RaceDBVersion=v3.0.43-20210505130116
Backing up database to /racedb-data/backups/racedb-backup-20210507-103250.json
databaseEngine="django.db.backends.postgresql"

databaseName="racedb"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/40-import.sh
ServerTimeZone="Africa/Johannesburg"
No SQLITE data to import from /racedb-data/RaceDB.sqlite3
python="3.9.5 (default, May 4 2021, 18:15:18)
No JSON data to import from /racedb-data/racedb-import.json
[GCC 8.3.0]"

logFileName="/racedb-data/RaceDB-log.txt"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/95-start.sh
RaceDBVersion=v3.0.43-20210505130116
Starting RaceDB...
databaseEngine="django.db.backends.postgresql"
Operations to perform:
databaseName="racedb"
Apply all migrations: admin, auth, contenttypes, core, sessions
ServerTimeZone="Africa/Johannesburg"
Running pre-migrate handlers for application admin
python="3.9.5 (default, May 4 2021, 18:15:18)
Running pre-migrate handlers for application auth
[GCC 8.3.0]"
Running pre-migrate handlers for application contenttypes
logFileName="/racedb-data/RaceDB-log.txt"
Running pre-migrate handlers for application sessions
psql: FATAL: the database system is starting up
Running pre-migrate handlers for application django_extensions
RaceDBVersion=v3.0.43-20210505130116
Running pre-migrate handlers for application core
databaseEngine="django.db.backends.postgresql"
Running migrations:
databaseName="racedb"
No migrations to apply.
ServerTimeZone="Africa/Johannesburg"
Running post-migrate handlers for application admin
python="3.9.5 (default, May 4 2021, 18:15:18)
Running post-migrate handlers for application auth
[GCC 8.3.0]"
Running post-migrate handlers for application contenttypes
logFileName="/racedb-data/RaceDB-log.txt"
Running post-migrate handlers for application sessions
RaceDBVersion=v3.0.43-20210505130116
Running post-migrate handlers for application django_extensions
databaseEngine="django.db.backends.postgresql"
Running post-migrate handlers for application core
databaseName="racedb"
Running init scripts stored in /docker-entrypoint-init.d
ServerTimeZone="Africa/Johannesburg"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/01-logstart.sh
python="3.9.5 (default, May 4 2021, 18:15:18)

[GCC 8.3.0]"
RACEDB STARTED Fri May 7 12:22:54 UTC 2021
logFileName="/racedb-data/RaceDB-log.txt"

psql: FATAL: the database system is starting up
/usr/sbin/entrypoint.sh: running bash script: /docker-entrypoint-init.d/02-postgres.sh
RaceDBVersion=v3.0.43-20210505130116
Waiting for Postgres to start up...
databaseEngine="django.db.backends.postgresql"
Postgres is unavailable - sleeping
databaseName="racedb"
Checking if the racedb exists...
ServerTimeZone="Africa/Johannesburg"
RaceDB DB already exists. Not creating.
python="3.9.5 (default, May 4 2021, 18:15:18)

[GCC 8.3.0]"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/10-configure.sh
logFileName="/racedb-data/RaceDB-log.txt"
Database already configured.
RaceDBVersion=v3.0.43-20210505130116
Configured Date/Time for ISO format
databaseEngine="django.db.backends.postgresql"

databaseName="racedb"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/20-data.sh
ServerTimeZone="Africa/Johannesburg"
Database already initialized.
python="3.9.5 (default, May 4 2021, 18:15:18)

[GCC 8.3.0]"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/30-backup.sh
logFileName="/racedb-data/RaceDB-log.txt"
Backing up database to /racedb-data/backups/racedb-backup-20210507-122305.json

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/40-import.sh
No SQLITE data to import from /racedb-data/RaceDB.sqlite3
No JSON data to import from /racedb-data/racedb-import.json

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/95-start.sh
Starting RaceDB...
Operations to perform:
Apply all migrations: admin, auth, contenttypes, core, sessions
Running pre-migrate handlers for application admin
Running pre-migrate handlers for application auth
Running pre-migrate handlers for application contenttypes
Running pre-migrate handlers for application sessions
Running pre-migrate handlers for application django_extensions
Running pre-migrate handlers for application core
Running migrations:
No migrations to apply.
Running post-migrate handlers for application admin
Running post-migrate handlers for application auth
Running post-migrate handlers for application contenttypes
Running post-migrate handlers for application sessions
Running post-migrate handlers for application django_extensions
Running post-migrate handlers for application core
Running init scripts stored in /docker-entrypoint-init.d
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/01-logstart.sh

RaceDBVersion=v3.0.43-20210505130116
RACEDB STARTED Fri May 7 15:33:58 UTC 2021
databaseEngine="django.db.backends.postgresql"

databaseName="racedb"
/usr/sbin/entrypoint.sh: running bash script: /docker-entrypoint-init.d/02-postgres.sh
ServerTimeZone="Africa/Johannesburg"
Waiting for Postgres to start up...
python="3.9.5 (default, May 4 2021, 18:15:18)
Postgres is unavailable - sleeping
[GCC 8.3.0]"
Checking if the racedb exists...
logFileName="/racedb-data/RaceDB-log.txt"
RaceDB DB already exists. Not creating.
RaceDBVersion=v3.0.43-20210505130116

databaseEngine="django.db.backends.postgresql"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/10-configure.sh
databaseName="racedb"
Database already configured.
ServerTimeZone="Africa/Johannesburg"
Configured Date/Time for ISO format
python="3.9.5 (default, May 4 2021, 18:15:18)

[GCC 8.3.0]"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/20-data.sh
logFileName="/racedb-data/RaceDB-log.txt"
Database already initialized.

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/30-backup.sh
Backing up database to /racedb-data/backups/racedb-backup-20210507-153409.json

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/40-import.sh
No SQLITE data to import from /racedb-data/RaceDB.sqlite3
No JSON data to import from /racedb-data/racedb-import.json

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/95-start.sh
Starting RaceDB...
Traceback (most recent call last):
Operations to perform:
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
Apply all migrations: admin, auth, contenttypes, core, sessions
return self.cursor.execute(sql, params)
Running pre-migrate handlers for application admin
psycopg2.errors.AdminShutdown: terminating connection due to administrator command
Running pre-migrate handlers for application auth
server closed the connection unexpectedly
Running pre-migrate handlers for application contenttypes
This probably means the server terminated abnormally
Running pre-migrate handlers for application sessions
before or while processing the request.
Running pre-migrate handlers for application django_extensions
Running pre-migrate handlers for application core
Running migrations:
The above exception was the direct cause of the following exception:
No migrations to apply.
Running post-migrate handlers for application admin
Traceback (most recent call last):
Running post-migrate handlers for application auth
File "/RaceDB/manage.py", line 38, in
Running post-migrate handlers for application contenttypes
execute_from_command_line(sys.argv)
Running post-migrate handlers for application sessions
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
Running post-migrate handlers for application django_extensions
utility.execute()
Running post-migrate handlers for application core
File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 413, in execute
Running init scripts stored in /docker-entrypoint-init.d
self.fetch_command(subcommand).run_from_argv(self.argv)
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/01-logstart.sh
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv

self.execute(*args, **cmd_options)

RACEDB STARTED Fri May 7 19:19:00 UTC 2021
File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute

output = self.handle(*args, **options)

/usr/sbin/entrypoint.sh: running bash script: /docker-entrypoint-init.d/02-postgres.sh
File "/RaceDB/core/management/commands/launch.py", line 229, in handle
Waiting for Postgres to start up...
launch_server( self, **options )
Postgres is unavailable - sleeping
File "/RaceDB/core/management/commands/launch.py", line 87, in launch_server
Checking if the racedb exists...
models_fix_data()
RaceDB DB already exists. Not creating.
File "/RaceDB/core/models.py", line 5877, in models_fix_data

fix_finish_times()

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/10-configure.sh
File "/RaceDB/core/models.py", line 5864, in fix_finish_times
Database already configured.
ft = r.compute_finish_time()
Configured Date/Time for ISO format
File "/RaceDB/core/models.py", line 2993, in compute_finish_time

rts = self.get_race_times()

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/20-data.sh
File "/RaceDB/core/models.py", line 2990, in get_race_times
Database already initialized.
return [ rt.total_seconds() for rt in self.get_race_time_query().order_by('race_time').values_list('race_time',flat=True) ]

File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 280, in iter
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/30-backup.sh
self._fetch_all()
Backing up database to /racedb-data/backups/racedb-backup-20210507-191911.json
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 1324, in _fetch_all

self._result_cache = list(self._iterable_class(self))

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/40-import.sh
File "/usr/local/lib/python3.9/site-packages/django/db/models/query.py", line 171, in iter
No SQLITE data to import from /racedb-data/RaceDB.sqlite3
for row in compiler.results_iter(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size):
No JSON data to import from /racedb-data/racedb-import.json
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1124, in results_iter

results = self.execute_sql(MULTI, chunked_fetch=chunked_fetch, chunk_size=chunk_size)

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/95-start.sh
File "/usr/local/lib/python3.9/site-packages/django/db/models/sql/compiler.py", line 1169, in execute_sql
Starting RaceDB...
cursor.execute(sql, params)
Operations to perform:
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 98, in execute
Apply all migrations: admin, auth, contenttypes, core, sessions
return super().execute(sql, params)
Running pre-migrate handlers for application admin
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
Running pre-migrate handlers for application auth
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
Running pre-migrate handlers for application contenttypes
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
Running pre-migrate handlers for application sessions
return executor(sql, params, many, context)
Running pre-migrate handlers for application django_extensions
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
Running pre-migrate handlers for application core
return self.cursor.execute(sql, params)
Running migrations:
File "/usr/local/lib/python3.9/site-packages/django/db/utils.py", line 90, in exit
No migrations to apply.
raise dj_exc_value.with_traceback(traceback) from exc_value
Running post-migrate handlers for application admin
File "/usr/local/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
Running post-migrate handlers for application auth
return self.cursor.execute(sql, params)
Running post-migrate handlers for application contenttypes
django.db.utils.OperationalError: terminating connection due to administrator command
Running post-migrate handlers for application sessions
server closed the connection unexpectedly
Running post-migrate handlers for application django_extensions
This probably means the server terminated abnormally
Running post-migrate handlers for application core
before or while processing the request.
Running init scripts stored in /docker-entrypoint-init.d
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/01-logstart.sh
RaceDBVersion=v3.0.43-20210505130116

databaseEngine="django.db.backends.postgresql"
RACEDB STARTED Sat May 8 13:11:32 UTC 2021
databaseName="racedb"

ServerTimeZone="Africa/Johannesburg"
/usr/sbin/entrypoint.sh: running bash script: /docker-entrypoint-init.d/02-postgres.sh
python="3.9.5 (default, May 4 2021, 18:15:18)
Waiting for Postgres to start up...
[GCC 8.3.0]"
Checking if the racedb exists...
logFileName="/racedb-data/RaceDB-log.txt"
RaceDB DB already exists. Not creating.
RaceDBVersion=v3.0.43-20210505130116

databaseEngine="django.db.backends.postgresql"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/10-configure.sh
databaseName="racedb"
Database already configured.
ServerTimeZone="Africa/Johannesburg"
Configured Date/Time for ISO format
python="3.9.5 (default, May 4 2021, 18:15:18)

[GCC 8.3.0]"
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/20-data.sh
logFileName="/racedb-data/RaceDB-log.txt"
Database already initialized.
Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/

Traceback (most recent call last):
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/30-backup.sh
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
Backing up database to /racedb-data/backups/racedb-backup-20210508-131133.json
response = get_response(request)

File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/40-import.sh
response = wrapped_callback(request, *callback_args, **callback_kwargs)
No SQLITE data to import from /racedb-data/RaceDB.sqlite3
File "/RaceDB/core/views_common.py", line 108, in wrap
No JSON data to import from /racedb-data/racedb-import.json
response = response or decorated_func( request, *args, **kwargs )

File "/RaceDB/core/WriteLog.py", line 90, in new_f
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/95-start.sh
return f( *args, **kwargs)
Starting RaceDB...
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
Operations to perform:
return view_func(request, *args, **kwargs)
Apply all migrations: admin, auth, contenttypes, core, sessions
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
Running pre-migrate handlers for application admin
return view_func(request, *args, **kwargs)
Running pre-migrate handlers for application auth
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
Running pre-migrate handlers for application contenttypes
results_str = handle_license_holder_import_excel(
Running pre-migrate handlers for application sessions
File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
Running pre-migrate handlers for application django_extensions
license_holder_import_excel(
Running pre-migrate handlers for application core
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
Running migrations:
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )
No migrations to apply.
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
Running post-migrate handlers for application admin
reader = ExcelReader(filename, read_only, keep_vba,
Running post-migrate handlers for application auth
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init
Running post-migrate handlers for application contenttypes
self.archive = _validate_archive(fn)
Running post-migrate handlers for application sessions
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
Running post-migrate handlers for application django_extensions
raise InvalidFileException(msg)
Running post-migrate handlers for application core
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'.xmlpk\x05\x06\x00\x00\x00\x00\x10\x00\x10\x00x\x04\x00\x00\xbdy\x00\x00\x00\x00' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm
fix_bad_license_codes and emergency contacts...
ERROR:django.request:Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/
fix_nation_codes...
Traceback (most recent call last):
fix_non_unique_number_set_entries...
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
fix_bad_category_hints...
response = get_response(request)
fix_phone_numbers...
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
fix results finish times...
response = wrapped_callback(request, *callback_args, **callback_kwargs)
Shutdown called
File "/RaceDB/core/views_common.py", line 108, in wrap
Running init scripts stored in /docker-entrypoint-init.d
response = response or decorated_func( request, *args, **kwargs )
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/01-logstart.sh
File "/RaceDB/core/WriteLog.py", line 90, in new_f

return f( *args, **kwargs)

RACEDB STARTED Sat May 8 13:16:27 UTC 2021
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view

return view_func(request, *args, **kwargs)

/usr/sbin/entrypoint.sh: running bash script: /docker-entrypoint-init.d/02-postgres.sh
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
Waiting for Postgres to start up...
return view_func(request, *args, **kwargs)
Checking if the racedb exists...
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
RaceDB DB already exists. Not creating.
results_str = handle_license_holder_import_excel(

File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/10-configure.sh
license_holder_import_excel(
Database already configured.
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
Configured Date/Time for ISO format
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )

File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/20-data.sh
reader = ExcelReader(filename, read_only, keep_vba,
Database already initialized.
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init

self.archive = _validate_archive(fn)

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/30-backup.sh
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
Backing up database to /racedb-data/backups/racedb-backup-20210508-131628.json
raise InvalidFileException(msg)

openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'.xmlpk\x05\x06\x00\x00\x00\x00\x10\x00\x10\x00x\x04\x00\x00\xbdy\x00\x00\x00\x00' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm
/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/40-import.sh
Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/
No SQLITE data to import from /racedb-data/RaceDB.sqlite3
Traceback (most recent call last):
No JSON data to import from /racedb-data/racedb-import.json
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner

response = get_response(request)

/usr/sbin/entrypoint.sh: sourcing bash script: /docker-entrypoint-init.d/95-start.sh
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
Starting RaceDB...
response = wrapped_callback(request, *callback_args, **callback_kwargs)
Operations to perform:
File "/RaceDB/core/views_common.py", line 108, in wrap
Apply all migrations: admin, auth, contenttypes, core, sessions
response = response or decorated_func( request, *args, **kwargs )
Running pre-migrate handlers for application admin
File "/RaceDB/core/WriteLog.py", line 90, in new_f
Running pre-migrate handlers for application auth
return f( *args, **kwargs)
Running pre-migrate handlers for application contenttypes
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
Running pre-migrate handlers for application sessions
return view_func(request, *args, **kwargs)
Running pre-migrate handlers for application django_extensions
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
Running pre-migrate handlers for application core
return view_func(request, *args, **kwargs)
Running migrations:
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
No migrations to apply.
results_str = handle_license_holder_import_excel(
Running post-migrate handlers for application admin
File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
Running post-migrate handlers for application auth
license_holder_import_excel(
Running post-migrate handlers for application contenttypes
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
Running post-migrate handlers for application sessions
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )
Running post-migrate handlers for application django_extensions
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
Running post-migrate handlers for application core
reader = ExcelReader(filename, read_only, keep_vba,
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init
self.archive = _validate_archive(fn)
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
raise InvalidFileException(msg)
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'.xmlpk\x05\x06\x00\x00\x00\x00\x10\x00\x10\x00x\x04\x00\x00\xday\x00\x00\x00\x00' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm
ERROR:django.request:Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
results_str = handle_license_holder_import_excel(
File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
license_holder_import_excel(
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
reader = ExcelReader(filename, read_only, keep_vba,
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init
self.archive = _validate_archive(fn)
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
raise InvalidFileException(msg)
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'.xmlpk\x05\x06\x00\x00\x00\x00\x10\x00\x10\x00x\x04\x00\x00\xday\x00\x00\x00\x00' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm
Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
results_str = handle_license_holder_import_excel(
File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
license_holder_import_excel(
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
reader = ExcelReader(filename, read_only, keep_vba,
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init
self.archive = _validate_archive(fn)
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
raise InvalidFileException(msg)
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm
ERROR:django.request:Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
results_str = handle_license_holder_import_excel(
File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
license_holder_import_excel(
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
reader = ExcelReader(filename, read_only, keep_vba,
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init
self.archive = _validate_archive(fn)
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
raise InvalidFileException(msg)
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm
Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view

return view_func(request, *args, **kwargs)

File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
results_str = handle_license_holder_import_excel(
File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
license_holder_import_excel(
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
reader = ExcelReader(filename, read_only, keep_vba,
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init
self.archive = _validate_archive(fn)
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
raise InvalidFileException(msg)
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'.xmlpk\x05\x06\x00\x00\x00\x00\r\x00\r\x00l\x03\x00\x00]^\x00\x00\x00\x00' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm
ERROR:django.request:Internal Server Error: /RaceDB/LicenseHolders/LicenseHoldersImportExcel/
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/views.py", line 1621, in LicenseHoldersImportExcel
results_str = handle_license_holder_import_excel(
File "/RaceDB/core/views.py", line 1606, in handle_license_holder_import_excel
license_holder_import_excel(
File "/RaceDB/core/license_holder_import_excel.py", line 527, in license_holder_import_excel
wb = load_workbook( filename = worksheet_contents, read_only=True, data_only=True )
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 315, in load_workbook
reader = ExcelReader(filename, read_only, keep_vba,
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 124, in init
self.archive = _validate_archive(fn)
File "/usr/local/lib/python3.9/site-packages/openpyxl/reader/excel.py", line 94, in _validate_archive
raise InvalidFileException(msg)
openpyxl.utils.exceptions.InvalidFileException: openpyxl does not support b'.xmlpk\x05\x06\x00\x00\x00\x00\r\x00\r\x00l\x03\x00\x00]^\x00\x00\x00\x00' file format, please check you can open it with Excel first. Supported formats are: .xlsx,.xlsm,.xltx,.xltm

RaceDb error TemplateDoesNotExist

I've reinstall the computer, docker and RaceDB v3.0.84-20230327101343.
RaceB Version

When i try to go on any page like competitions i got an error screen.
competitions

same on teams and other pages
image

"Localhost" share not possible

Try to share DB access to another laptop on same network, but no access granted. Changed "Localhost" with main laptop ip address, but still no access possible. Before I moved over to the docker network, I was able to share access for example (http://192.168.0.1:8000/RaceDB/) to another laptop on the same network in order for that person to capture info or assist with registration.

"Team" Search option does not work

The Team (-1 for Independent) option in the Show Participants view does not work. Tried to search for a team and used all options but it does not work:

RaceDB v3.0.81-20220616100128
Windows 10 Pro 21H2
Firefox 103.0 (64-bit)

image

Error on Excel Exports for RaceDB v3.0.66-20210915075724

The latest version brings up an error: "[Errno 25] Inappropriate ioctl for device" for every type of excel export from RaceDB.

Below is the error message in full for a Competition Participant Export, but the same type message gets displayed when I want to export for instance a CrossMgr Excel file:

_Environment:

Request Method: POST
Request URL: http://localhost:8000/RaceDB/Competitions/CompetitionDashboard/179/Participants/179/

Django Version: 3.2.7
Python Version: 3.9.7
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'crispy_forms',
'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 "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/participant.py", line 277, in Participants
xl = get_participant_excel( Q(pk__in=participants.values_list('pk',flat=True)) )
File "/RaceDB/core/get_participant_excel.py", line 114, in get_participant_excel
add_excel_info( wb )
File "/RaceDB/core/add_excel_info.py", line 19, in add_excel_info
set_custom_property('RaceDB_User', os.getlogin())

Exception Type: OSError at /RaceDB/Competitions/CompetitionDashboard/179/Participants/179/
Exception Value: [Errno 25] Inappropriate ioctl for device_

Motorola FX7400 reader on RFID page

This reader works fine with CrossMgrImpinj as far as I can tell, as long as the transmit power setting is set to something. Otherwise the setting seems to have no effect on range or readability of tags. However with RaceDB I am unable to get it to read tags. Errors that appear:

Status: Failure
Tag Read Failure

No tags read.

From RaceDB console:

Launching RFID server thread...
    llrp_host="169.254.10.1"
    transmitPower=10
LLRPServer: init: localhost:50117
[LLRPServer 2019-07-23 15:59:10]  runServer: LLRP Server on (localhost:50117)
[LLRPServer 2019-07-23 15:59:10]  runServer: Successfully connected to (169.254.10.1:5084)!
[LLRPServer 2019-07-23 15:59:10]  runServer: Server: connect success


[LLRPServer 2019-07-23 15:59:21]  runServer: Server: Request: b'{"cmd": "read", "antenna": 1, "timestamp": "2019-07-23 15:59:21.078"}\r\n'
[LLRPServer 2019-07-23 15:59:21]  runServer: Server: Reply: {"success": false, "tags": [], "antenna": 1, "errors": ["No tags read."], "timestamp": "2019-07-23 15:59:21.517"}
[LLRPServer 2019-07-23 16:03:00]  runServer: Server: Request: b'{"cmd": "read", "antenna": 1, "timestamp": "2019-07-23 16:03:00.141"}\r\n'
[LLRPServer 2019-07-23 16:03:00]  runServer: Server: Reply: {"success": false, "tags": [], "antenna": 1, "errors": ["No tags read."], "timestamp": "2019-07-23 16:03:00.582"}
[LLRPServer 2019-07-23 16:05:38]  runServer: Server: Request: b'{"cmd": "read", "antenna": 1, "timestamp": "2019-07-23 16:05:38.312"}\r\n'
[LLRPServer 2019-07-23 16:05:38]  runServer: Server: Reply: {"success": false, "tags": [], "antenna": 1, "errors": ["No tags read."], "timestamp": "2019-07-23 16:05:38.751"}

Implement pagination on participants list

When operating an event with only pre-registration, the sign on process relies entirely on the participants page for an event, and searching for a pre-registered participant. Given participant numbers over 200, the time to load this page is quite large, and without a filter applied, the rendered information is also not needed.

If pagination was implemented with a max of 25 visible, the page load time should decline dramatically. Could have a dropdown with number of items per page to display. (10, 25, 50, 100)

Licence Holder Excel file upload: "Phone" field

In what format does the phone number need to be typed in an excel cell in order to be uploaded:
I've tried the following formats:

+27 81 6938 6324
+27 (81) 6938 6324
+27-81-6938-6324
(081) 6938 6324
(081) 69386324

I've also formatted the excel cell to a "text" format, as well as "general" format, but no result. Am I doing something wrong or is there an excel upload error for the phone field?

Date localisation

Request:

Add date localisation throughout - configurable in settings.py

Would cover date picker, and presented dates too.

Thanks

administration permissions have no effect on users

Is there a trick that needs to be done after modifying user or group permissions from the administration page? For example I am unable to create an user with permissions to create a new race without giving the user superuser permissions. This happens even if I give the user all permissions from the list.

Help Needed: docker upgrade broke RaceDB and I don't know how to fix it.

Hi all,

The latest docker upgrade broke the RaceDB container and I don't know how to fix it.

The core problem seems to be that the application cannot connect to the Postgres database.
This throws a bunch of errors about not being able to access Postgres when RaceDB adds new fields to the existing tables.
This used to work, but I don't know what I am missing.

If anyone has docker expertise (especially Python, Django and Postgres), please help.

Issue exporting registrations and importing again to bulk update

When you export your pre-reg list from a competition to Excel, the category get the (men) etc appended to the end. So when you import back in that column doesnt match and all get skipped.

I would expect exported data to be in the same format as the import.

Enhancement Request: PDF Certificate of event participant

Here in South Africa and maybe in other countries as well, the private Health Care companies reduce member premiums in relation to how many physical activities they do in a month. If they log their physical activities on a regular basis, their premiums remain at a discount, but if not, it increases again to the normal premium. As such many timekeepers/event organizers are vetted by these Health Care Companies to provide digital proof of participation or some type of certificate that are acceptable. Quite a few now have the ability for the participants to generate it themselves from the published results (for example: https://results.finishtime.co.za/results.aspx?CId=35&RId=4147) . I would prefer to not do it that way as there is too many ways to manipulate the certificate, but it would really be nice to generate a protected pdf out of the Hub in RaceDB with a watermark or something (more authentic) for those riders/athletes that request it, as not everyone needs it. This may even assist with more uptake of RaceDB as Events Management application.
@esitarski

Error in Results Hub - Custom Categories

Installed RaceDB v3.0.90-20230905131643.
Test Results Hub on existing event result. Normal Event Category Results display correct, but with the Custom Categories, I get the below error:

NameError at /RaceDB/Hub/CustomCategoryResults/555/0/788/

name 'results' is not defined
Request Method: GET
http://localhost:8000/RaceDB/Hub/CustomCategoryResults/555/0/788/
4.2.5
NameError
name 'results' is not defined
/RaceDB/core/hub.py, line 408, in CustomCategoryResults
core.hub.CustomCategoryResults
/usr/local/bin/python
3.10.13
['/RaceDB', '/RaceDB', '/usr/local/lib/python310.zip', '/usr/local/lib/python3.10', '/usr/local/lib/python3.10/lib-dynload', '/usr/local/lib/python3.10/site-packages', '/RaceDB/src/pyllrp']
Wed, 06 Sep 2023 07:22:37 -0400

Traceback Switch to copy-and-paste view

/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py, line 55, in inner

                    response = get_response(request)

     โ€ฆ
Local vars
/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py, line 197, in _get_response

                    response = wrapped_callback(request, *callback_args, **callback_kwargs)

     โ€ฆ
Local vars
/RaceDB/core/hub.py, line 408, in CustomCategoryResults

    	num_nationalities = len(set(rr.participant.license_holder.nation_code for rr in results if rr.participant.license_holder.nation_code))

     โ€ฆ
Local vars

Hub Results not reflecting Start Offset

When results are uploaded from CrossMgr to RaceDB, it does not take the "Start Offset" time in consideration. It only display the "Race Time" (without Start Offset deducted) in HUB. This error pulls all the way through to all Series Results calculations as well. Where for instance points are calculated as a % of the winning time, it uses the "Race Time" as base and not the real finishing time with start offset deducted. In cases where the Start Offset can be 40 minutes or longer it makes a significant difference in the points.

Competition Participants without a tag

When viewing a competition that is using tags, would be helpful if there was a filter for participants that didnt have a tag, just like bib numbers.

Maybe in the "Scan Search" field we can have a -1 option to search for no tag?

Number Sets 120 char limit

When adding new Number sets, there is a 120 char field limit, for what I can see no particular reason. On the Category numbers page there is a TextField instead of a CharField, which seems to have no limit on the length of the range, and can thus accept longer number sets..

RaceDB - startlist export as UCI DataRide Excel fails

Request Method: GET
http://192.168.40.16:8000/RaceDB/Competitions/CompetitionDashboard/367/StartList/978/UCIExcelDownload/978/0/
2.2.1
ValueError
seek of closed file
/lvm1/home/racedb/RaceDB-03000027/core/views.py in UCIExcelDownload, line 1401
/usr/bin/python3
3.6.8
['/lvm1/home/racedb/RaceDB-03000027', '/usr/lib/python36.zip', '/usr/lib/python3.6', '/usr/lib/python3.6/lib-dynload', '/usr/local/lib/python3.6/dist-packages', '/usr/lib/python3/dist-packages']
Mon, 6 Jan 2020 00:44:00 -0800

Add web server to Docker container (eg. nginx).

The current Docker container includes the Postgres database, however, it still uses RaceDB's internal Python web server (waitress).
A far better solution is to extend the container to use a proper web server (eg. nginx).
This requires gunicorn to bridge the web server to Django so that Django is called for the dynamic content.
And, the web server must be configured to access RaceDB's static files (requiring collectstatic calls in startup).
A good explanation is here.

FinishLynx file encoding cannot be UTF-8

As per title, the FinishLynx files do not work properly when the encoding is UTF-8.

I can set FinishLynx database encoding to be either "Single Byte" (from what I've gathered, basically ANSI) or "Unicode". I can use the UTF-8 encoded files when I have set FinishLynx encoding to Single Byte, but when there is a proper UTF-8 character, the encoding doesn't work. When using "Unicode" encoding in FinishLynx, the UTF-8 encoded files from RaceDB do not work at all! However when I save these files with "Unicode" or "Unicode Big Endian", the files work fine, also fully compatible with FinishLynx "Unicode" encoding. This means that even Unicode/UTF-8 specific characters such as รครถรฅ work normally. I can also save the files with ANSI and use Single Byte encoding, and at least รครถรฅ characters do work, but I imagine if you put in any other language with more characters it will not work properly. Perhaps there should be info in the manual or even an option in the UI to be able to download the FinishLynx files in either ANSI (default encoding in FinishLynx) or Unicode (not UTF-8) encoding.

As a summary, Unicode != UTF-8 and FinishLynx only supports Unicode (or Unicode Big Endian) or ANSI/Single Byte

The FinishLynx documentation doesn't even describe this properly! http://www.finishlynx.com/download/finishlynx-documentation/finishlynx-manuals/finishlynx_version_4.pdf

Data Code Set (Single Byte)
This controls the format of the character-format data being transferred between FinishLynx
and the database.

Error in adding Mass Start Event in RaceDB v3.0.87-20230729105401

Get the following error message when trying to add another Mass event: 'EventMassStart' instance needs to have a primary key value before this relationship can be used.

Environment:

Request Method: GET
Request URL: http://localhost:8000/RaceDB/Competitions/CompetitionDashboard/240/EventMassStartNew/240/

Django Version: 4.2
Python Version: 3.10.11
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']

Template error:
In template /RaceDB/core/templates/event_mass_start_form.html, error at line 24
'EventMassStart' instance needs to have a primary key value before this relationship can be used.
14 :
15 : {% block content %}
16 :
17 :

{{title}}


18 :

{{instance.competition.name}}: {{instance.competition.date_range_year_str}}


19 :

{{instance.name}}: {{instance.date_time|date_hhmm}}


20 :

21 : {% crispy form %}
22 :

23 : {% spaceless %}
24 : {% with wave_set=instance.wave_set.all %}
25 : {% if wave_set.exists %}
26 :

{% trans "Waves" %}


27 :
28 :
29 :
30 :
31 :
32 :
33 :
34 :

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
File "/usr/local/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/django/contrib/auth/decorators.py", line 23, in _wrapper_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/views.py", line 2150, in EventMassStartNew
return render( request, 'event_mass_start_form.html', locals() )
File "/usr/local/lib/python3.10/site-packages/django/shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "/usr/local/lib/python3.10/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/usr/local/lib/python3.10/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 175, in render
return self._render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 167, in _render
return self.nodelist.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 167, in _render
return self.nodelist.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/defaulttags.py", line 414, in render
return strip_spaces_between_tags(self.nodelist.render(context).strip())
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
File "/usr/local/lib/python3.10/site-packages/django/template/defaulttags.py", line 539, in render
values = {key: val.resolve(context) for key, val in self.extra_context.items()}
File "/usr/local/lib/python3.10/site-packages/django/template/defaulttags.py", line 539, in
values = {key: val.resolve(context) for key, val in self.extra_context.items()}
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 715, in resolve
obj = self.var.resolve(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 847, in resolve
value = self._resolve_lookup(context)
File "/usr/local/lib/python3.10/site-packages/django/template/base.py", line 914, in _resolve_lookup
current = current()
File "/usr/local/lib/python3.10/site-packages/django/db/models/manager.py", line 164, in all
return self.get_queryset()
File "/usr/local/lib/python3.10/site-packages/django/db/models/fields/related_descriptors.py", line 718, in get_queryset
raise ValueError(

Exception Type: ValueError at /RaceDB/Competitions/CompetitionDashboard/240/EventMassStartNew/240/
Exception Value: 'EventMassStart' instance needs to have a primary key value before this relationship can be used.

{% trans "Wave" %}{% trans "Start Offset" %}{% trans "Categories" %}{% trans "Rank Together" %}

Error when exporting Cross Mgr Excel file out of RaceDB

Tried to export the Cross Mgr file from out of RaceDB. Receive the below error. Checked if it was a case with an old event that worked, same error. Below is the error message. Also tried the open the event from CrossMgr, but got an "Error Connecting to RaceDB Server" Message "http://127.0.0.1:8000/RaceDB"

Environment:

Request Method: GET
Request URL: http://localhost:8000/RaceDB/Competitions/CompetitionDashboard/185/EventMassStartCrossMgr/615/

Django Version: 4.0.1
Python Version: 3.9.10
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'crispy_forms',
'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 "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views.py", line 2172, in EventMassStartCrossMgr
xl = get_crossmgr_excel( eventMassStart )
File "/RaceDB/core/get_crossmgr_excel.py", line 325, in get_crossmgr_excel
add_properties_page( wb, title_format, event_mass_start, raceNumber )
File "/RaceDB/core/get_crossmgr_excel.py", line 251, in add_properties_page
timezone.get_current_timezone().zone,

Exception Type: AttributeError at /RaceDB/Competitions/CompetitionDashboard/185/EventMassStartCrossMgr/615/
Exception Value: 'zoneinfo.ZoneInfo' object has no attribute 'zone'

Issue uploading pre-registration (TypeError '<' not supported)

Hi, I've got a spreadsheet with a ton of columns that I'm trying to import into RaceDB. There's a chance I've messed something up, but I can't seem to find anything to get me in the right direction.

Steps to reproduce:

  1. Create an excel spreadsheet with pre-registration data
  2. Go to the 'Upload Prereg' page
  3. Upload the spreadsheet

I've tried to simplify my environment by removing things that feel potentially problematic, but they haven't helped.

  • Multiple entries for the same rider+category (e.g. line 2: License=123, Category=Endurance C, XC Event=True, ShortTrack=False, line 3: License=123, Category=Endurance C, XC Event=False, ShortTrack=True)
    • I have tried importing only 1 line, and am still having issues
  • Multiple races - I've tried examples with only 1 column for optional events, and it still failed

The full list of columns I'm trying to use:

License
Last Name
First Name
Gender
Date of Birth
Category
Team Name
Preregistered
Paid
License Checked
Email
Phone
City
StateProv
ZipPostal
Emergency Contact
Emergency Phone
Role
XC Wave *
STXC *
Enduro
Downhill

Error thrown by UploadPrereg:

Environment:


Request Method: POST
Request URL: http://localhost:8000/RaceDB/Competitions/CompetitionDashboard/1/UploadPrereg/1/

Django Version: 3.2.7
Python Version: 3.9.7
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django_extensions',
 'crispy_forms',
 '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 "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/RaceDB/core/views_common.py", line 108, in wrap
    response = response or decorated_func( request, *args, **kwargs )
  File "/RaceDB/core/WriteLog.py", line 90, in new_f
    return f( *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/RaceDB/core/views.py", line 1583, in UploadPrereg
    results_str = handle_upload_prereg( competitionId, request.FILES['excel_file'], form.cleaned_data['clear_existing'] )
  File "/RaceDB/core/views.py", line 1566, in handle_upload_prereg
    init_prereg(
  File "/RaceDB/core/init_prereg.py", line 531, in init_prereg
    process_ur_records( ur_records )
  File "/RaceDB/core/init_prereg.py", line 428, in process_ur_records
    '"{}"={}'.format(event.name, included) for event, included in sorted(participant_optional_events.items())

Exception Type: TypeError at /RaceDB/Competitions/CompetitionDashboard/1/UploadPrereg/1/
Exception Value: '<' not supported between instances of 'EventMassStart' and 'EventMassStart'

racedb_app restarts every 2 minutes in Docker Desktop - RaceDB v3.0.86-20230724153441

Created new installation from start (all old RaceDB folders, docker volumes, docker images & containers deleted:

System information:
Microsoft Windows 10 Pro
Version 10.0.19045 Build 19045
Processor i5-5300U CPU 2.30 GHz
12GB RAM
Docker Version: v4.21.1

RaceDB Version: v3.0.86-20230724153441

With racedb_app restarting every 2 minutes not able to open RaceDB application

RaceDB Containerized; Testers wanted.

I don't know about you, I hate having to get RaceDB setup. So, I containerized the application into a Docker container, and created Windows/Linux/Mac controller script to manage it. No command line hacking on WIndows. It's all done in a GUI. This also means, that the container can be deployed anywhere. Currently, I have a test version running in Google Cloud. Updated as a snap by pulling the current version of the container. Additionally, the container uses MySQL ...and because MySQL is also in a container, it does not require the user to install it.

There are a few small changes made to RaceDB. For example, you can now connect to RaceDB by http://localhost without the RaceDB at the end.

I hope to get Ed to move it into his repo, but for the time being you can find that at RACEDB CONTAINER.

Please make comments there.

core_competition.gpx_course_default_id

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

Importing SQlite3 to Postgresql minor issue

I upgraded to the Docker container on my Ubuntu VM tonight and ran across a few simple (but maddening) minor issues when trying to import my sqlite3 db:

  1. DatabaseConfig.py isn't in the RaceDB/RaceDB folder. DatabaseConfig.py.save is, and simply copying the .py.save file to .py fixes it.

  2. There is a minor typo in RaceDB/SqliteToDB.py - seems that Python 3.8 fully dropped support for iter, which is on line 37 as iterkeys. Editing the line to say for f in list(fields.keys()): fixes that and allowed the import to complete.

Thanks for the work on this, the containered version is great!

Highlight active filter boxes

Some users are not able to find a participant when they enter a name because they are not noticing that they also have a filter applied for another field that the combination is yielding zero results.

Maybe the validation highlights could be used to highlight input boxes that are being used to filter the results. By using the validation success class if the filter control has a value, then they would become green and be more noticable that they are being applied?
http://getbootstrap.com/css/#forms-control-validation

Startlist 'Export to Excel' doesn't output Teams

As per title, I cannot seem to get the Teams listed in the Excel export from "RaceDB/Competitions/CompetitionDashboard/1/StartList/2/". When I print them as PDF the teams show fine. Now I have to take it through some xlsx-pdf converter to get the proper table. I hope for the Team to be listed between columns "FirstName | Gender"

Sign-on page not showing signature box

Using RaceDB Version: 1.20.20
Not too sure if related to changes made to #1, but the sign on page was not usable the other weekend with what appears to be the signature box being of zero height.

screenshot_2016-10-10-09-35-14

RaceDB Docker issues

OK, new season coming up and planning to move to containerised version of RaceDB. I've hit some issues... Many of my processes are automated, including initialising and pre-loading events from source files and I'd like to move over to the latest version (particularly as it has the date format change I requested).

Firstly, I have the container up and running successfully and have managed to import an existing database - all is good here.

Following instructions, I run:
bash racedb.sh manage init_oca lcca_2020_Round1_oca_entries.csv
firstly I get No such command: racedb
so I look at racedb.sh and figure I need to add an exec so it now reads as follows:

manage() {
    checkconfig
    $DOCKERCMD exec racedb /RaceDB/manage.py $@
}

This gets me further, but still no dice:

RaceDBVersion=v3.0.35-beta-1aebac7
databaseEngine="django.db.backends.postgresql"
databaseName="racedb"
ServerTimeZone="Europe/London"
python="3.8.3 (default, Jun  9 2020, 17:39:39) 
[GCC 8.3.0]"
logFileName="/racedb-data/RaceDB-log.txt"
Traceback (most recent call last):
  File "/RaceDB/manage.py", line 38, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/RaceDB/core/management/commands/init_oca.py", line 16, in handle
    core.init_oca.init_oca( optione['fname'] )
NameError: name 'optione' is not defined

I also tried init_prereg and got similar:

bash racedb.sh manage init_prereg --competition "race1" --spreadsheet lcca_2020_Round1_excel_entries.xlsx 
RaceDBVersion=v3.0.35-beta-1aebac7
databaseEngine="django.db.backends.postgresql"
databaseName="racedb"
ServerTimeZone="Europe/London"
python="3.8.3 (default, Jun  9 2020, 17:39:39) 
[GCC 8.3.0]"
logFileName="/racedb-data/RaceDB-log.txt"
Traceback (most recent call last):
  File "/RaceDB/manage.py", line 38, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 315, in run_from_argv
    parser = self.create_parser(argv[0], argv[1])
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 289, in create_parser
    self.add_arguments(parser)
  File "/RaceDB/core/management/commands/init_prereg.py", line 11, in add_arguments
    type=string,
NameError: name 'string' is not defined

Not really sure how to progress at this point

Thanks
Chris

responsive Layout error in signature page

When the page snaps to a smaller device, the container with the scriptel link entirely covers the form with the other buttons and the user cannot click OK. I think you need to put the form inside the container, row and column to ensure that it is laid out correctly.

signon layout error

Uni Deprecation Error when printing Frame Labels

I am receiving an error when trying to print frame labels for the timing chips. see attached error messages.

to reproduce open a participant in a competition and click on the print: 2 Fram Nums button.
uni deprecation error message 2
uni deprecation error message1
uni deprecation error message

I am running the most recent version of python.
I Microsoft Windows 10 Pro. version 1030319045 Build 19045
I use Edge version 117.0.2045.60 (Official build) (64-bit)

Chip # 1 & Chip # 2 export / import

Currently it does not seem to be possible to export or import both chip numbers to RaceDB (# 1 chip works normally).. Is there another process that should be followed when importing say double-chipped bib numbers produced by Raceresult or other providers?

"NameError" when trying to upload a new NumberSet from excel

Tried to upload a Number Set with BIB and License headers, but received "NameError" :

name 'ms_write' is not defined

NameError
name 'ms_write' is not defined
/RaceDB/core/init_number_set.py, line 94, in init_number_set
/usr/local/bin/python
3.9.7
['/RaceDB', '/RaceDB', '/usr/local/lib/python39.zip', '/usr/local/lib/python3.9', '/usr/local/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/site-packages', '/RaceDB/src/pyllrp']

Import Competition from File

Tried to import competition file (all its Dependencies) to check if possible to maintain a single "master" Database for when there is no internet connection to complete a competition (registration, results etc) local and then export the file and import to Master database.

No import possible (both .gz & .json file options). Below is error message:

_Environment:

Request Method: POST
Request URL: http://localhost:8000/RaceDB/Competitions/CompetitionImport/

Django Version: 3.2
Python Version: 3.9.6
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django_extensions',
'crispy_forms',
'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 "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/RaceDB/core/views_common.py", line 108, in wrap
response = response or decorated_func( request, *args, **kwargs )
File "/RaceDB/core/WriteLog.py", line 90, in new_f
return f( *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/RaceDB/core/views.py", line 3137, in CompetitionImport
results_str = handle_import_competition(
File "/RaceDB/core/views.py", line 3125, in handle_import_competition
competition_import( pydata=pydata )
File "/RaceDB/core/competition_import_export.py", line 396, in competition_import
competition_deserializer( pydata if pydata else json.load(stream) )
File "/RaceDB/core/competition_import_export.py", line 266, in competition_deserializer
field_value = force_text(
File "/usr/local/lib/python3.9/site-packages/django/utils/encoding.py", line 111, in force_text
warnings.warn(

Exception Type: RemovedInDjango40Warning at /RaceDB/Competitions/CompetitionImport/
Exception Value: force_text() is deprecated in favor of force_str()._

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.