tabbycat icon indicating copy to clipboard operation
tabbycat copied to clipboard

xml import - export not working properly

Open andreesc15 opened this issue 2 years ago • 1 comments

Need XML import - export to work properly -- currently is buggy and not importing / exporting the tournament properly.

  • can we have public message / organizing team part imported in XML as well?

andreesc15 avatar Sep 23 '22 07:09 andreesc15

Might you have stacktraces of the problem(s) you were facing? We'd be better suited to pinpoint those problems if so.

For including public message and organising team, a ticket should be created in the https://github.com/TabbycatDebate/DebateXML repo as it would be modifying the schema.

tienne-B avatar Sep 28 '22 03:09 tienne-B

On export, the exporter fails to set the "style" tag of the tournament, which means that for British Parliamentary, various errors pop up on import because of there being four teams. When I manually add the tag and then try to import, I get this error:

Environment:

Request Method: POST Request URL: **url**/archive/import/

Django Version: 4.0.4 Python Version: 3.9.15 Installed Applications: ('jet', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'channels', 'django.contrib.staticfiles', 'django.contrib.humanize', 'django_summernote', 'django.contrib.messages', 'actionlog', 'adjallocation', 'adjfeedback', 'api', 'availability', 'breakqual', 'checkins', 'divisions', 'draw', 'motions', 'options', 'participants', 'printing', 'privateurls', 'results', 'tournaments', 'venues', 'utils', 'users', 'standings', 'notifications', 'importer', 'dynamic_preferences', 'django_extensions', 'gfklookupwidget', 'formtools', 'statici18n', 'polymorphic', 'corsheaders', 'rest_framework', 'rest_framework.authtoken', 'django_better_admin_arrayfield') Installed Middleware: ['django.middleware.gzip.GZipMiddleware', 'django.middleware.security.SecurityMiddleware', 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'corsheaders.middleware.CorsMiddleware', 'django.middleware.http.ConditionalGetMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'utils.middleware.DebateMiddleware']

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 84, in view return self.dispatch(request, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/django/contrib/auth/mixins.py", line 135, in dispatch return super().dispatch(request, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 119, in dispatch return handler(request, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/django/views/generic/edit.py", line 153, in post return self.form_valid(form) File "/tcd/tabbycat/importer/views.py", line 262, in form_valid self.importer.import_tournament() File "/tcd/tabbycat/importer/archive.py", line 351, in import_tournament self.import_results() File "/tcd/tabbycat/importer/archive.py", line 652, in import_results dr.add_winner(side_code) File "/tcd/tabbycat/results/result.py", line 822, in add_winner self.scoresheet.add_declared_winner(winner)

Exception Type: AttributeError at /archive/import/ Exception Value: 'BPScoresheet' object has no attribute 'add_declared_winner'

ilgazer avatar Nov 08 '22 14:11 ilgazer

I'm closing this as the two recent commits 1681c04875d0462bac34f25432a986a878e5c1d7 and 509c11f63e52ada63bb7d54b39faffbde52db076 do fix some problems encountered when importing DebateXML, and this ticket seems to be becoming a "catch-all" as there's little detail on what specifically is/was broken.

tienne-B avatar Feb 26 '23 23:02 tienne-B