Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entering an agenda through the UI after uploading an html file does not work #7703

Closed
1 task done
jennifer-richards opened this issue Jul 17, 2024 · 1 comment · Fixed by #7721
Closed
1 task done
Assignees
Labels

Comments

@jennifer-richards
Copy link
Member

Describe the issue

If the previous revision of a session's agenda was an uploaded HTML file, trying to revise it through the "Enter agenda" option at /meeting//session/<session_id>agenda fails like

[17/Jul/2024 08:13:55] "GET /meeting/120/session/33286/agenda HTTP/1.0" 200 23940
ERROR: django.request:241: Internal Server Error: /meeting/120/session/33286/agenda
Traceback (most recent call last):
  File "/home/dev/.local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/dev/.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 "/workspace/ietf/meeting/views.py", line 2900, in upload_session_agenda
    save_error = handle_upload_file(file, filename, session.meeting, 'agenda', request=request, encoding=encoding)
  File "/workspace/ietf/meeting/utils.py", line 752, in handle_upload_file
    file.open()
AttributeError: '_io.BufferedReader' object has no attribute 'open'
ERROR: django.request:241: Internal Server Error: /meeting/120/session/33286/agenda
Traceback (most recent call last):
  File "/home/dev/.local/lib/python3.9/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/home/dev/.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 "/workspace/ietf/meeting/views.py", line 2900, in upload_session_agenda
    save_error = handle_upload_file(file, filename, session.meeting, 'agenda', request=request, encoding=encoding)
  File "/workspace/ietf/meeting/utils.py", line 752, in handle_upload_file
    file.open()

As a workaround, writing the new agenda to a txt or md file and uploading it rather than entering it through the form allows the new version to post.

Code of Conduct

@jennifer-richards
Copy link
Member Author

@flynnliz

@jennifer-richards jennifer-richards self-assigned this Jul 20, 2024
@jennifer-richards jennifer-richards moved this to In Progress in Codesprint 120 Jul 20, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in Codesprint 120 Aug 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant