Issue during Abstract submission, possibly regarding adding authors
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 551
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 21
Description
Hello,
i am fairly new to being a wemaster for my company. I didn't set up the system but just overtook it from the person who set it up. Since today we seem to have an issue, when people try to submit an abstract, and i can't figure out how to solve it. This is the errorcode i receive:
```
2018-11-23 14:51:04,611 12d1ea65142d47ac indico.flask – ERROR errors.py:107 — No row was found for one()
Traceback (most recent call last):
File "/opt/indico/.venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/flask/util.py", line 114, in wrapper
return obj().process()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/rh.py", line 270, in process
res = self._do_process()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/controllers/base.py", line 63, in _do_process
return RHEventBase._do_process(self)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/rh.py", line 249, in _do_process
return self._process()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/abstracts/controllers/display.py", line 72, in _process
form = abstract_form_class(event=self.event)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/forms/base.py", line 71, in __call__
return super(IndicoFormMeta, cls).__call__(*args, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/wtforms/form.py", line 212, in __call__
return type.__call__(cls, *args, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/abstracts/forms.py", line 533, in __init__
super(SingleTrackMixin, self).__init__(*args, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/abstracts/forms.py", line 476, in __init__
super(AbstractForm, self).__init__(*args, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/web/forms/base.py", line 126, in __init__
super(IndicoForm, self).__init__(*args, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/flask_wtf/form.py", line 88, in __init__
super(FlaskForm, self).__init__(formdata=formdata, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/wtforms/form.py", line 278, in __init__
self.process(formdata, obj, data=data, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/wtforms/form.py", line 132, in process
field.process(formdata)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/wtforms/fields/core.py", line 287, in process
self.process_formdata(self.raw_data)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/fields.py", line 162, in process_formdata
self.data = self._convert_data(self.data)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/abstracts/fields.py", line 123, in _convert_data
return list({self._get_person_link(x) for x in data})
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/abstracts/fields.py", line 123, in
return list({self._get_person_link(x) for x in data})
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/core/db/sqlalchemy/util/session.py", line 29, in wrapper
return fn(*args, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/abstracts/fields.py", line 129, in _get_person_link
return super(AbstractPersonLinkListField, self)._get_person_link(data, extra_data)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/core/db/sqlalchemy/util/session.py", line 29, in wrapper
return fn(*args, **kwargs)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/fields.py", line 185, in _get_person_link
person = self._get_event_person(data)
File "/opt/indico/.venv/local/lib/python2.7/site-packages/indico/modules/events/fields.py", line 136, in _get_event_person
return self.event.persons.filter_by(id=data['id']).one()
File "/opt/indico/.venv/local/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2820, in one
raise orm_exc.NoResultFound("No row was found for one()")
NoResultFound: No row was found for one()
```
Contributor guide
Research direction
Start with indico/modules/events/abstracts/controllers/display.py and trace the form initialization into indico/modules/events/abstracts/fields.py and indico/modules/events/fields.py, especially the event-person lookup shown in the traceback. Reproduce abstract submission with the affected author data and determine why the lookup finds no row. Done means submission no longer raises NoResultFound for valid input, with the relevant behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python, sqlalchemy
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100