The following error is happening sometimes when accessing the Holding Pen table and also when accessing the submission form in qa
branch.
* 2015-06-16 13:52:18 -> UndefinedError: 'score' is undefined (filters.py:657:do_round)
** User details
agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36
email: inspirelabs-admins@cern.ch
family_name:
given_names:
group: []
guest: 0
id: 1
login_method: Local
nickname: admin
note: 1
precached_allowed_deposition_types: set(['literature'])
precached_canseehiddenmarctags: True
precached_permitted_restricted_collections: []
precached_sendcomments: False
precached_useadmin: True
precached_usealerts: True
precached_useapprove: True
precached_usebaskets: True
precached_usegroups: True
precached_useloans: True
precached_usemessages: True
precached_usepaperattribution: True
precached_usepaperclaim: True
precached_usestats: True
precached_usesuperadmin: True
precached_viewclaimlink: False
precached_viewsubmissions: False
referer: <https://qa.inspirehep.net/>
remote_host:
remote_ip: 188.184.151.228
session: None
settings: {'login_method': 'Local'}
uid: 1
uri: </submit/literature/14208>
** Traceback details
Traceback (most recent call last):
File "/opt/inspire/src/invenio/invenio/ext/legacy/__init__.py", line 119, in __call__
response = self.app.full_dispatch_request()
File "/opt/inspire/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/inspire/lib/python2.7/site-packages/flask_restful/__init__.py", line 265, in error_router
return original_handler(e)
File "/opt/inspire/src/invenio/invenio/base/wrappers.py", line 133, in handle_user_exception
return super(Flask, self).handle_user_exception(e)
File "/opt/inspire/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/opt/inspire/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/inspire/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/opt/inspire/lib/python2.7/site-packages/flask_login.py", line 758, in decorated_view
return func(*args, **kwargs)
File "/opt/inspire/src/invenio/invenio/modules/deposit/views/deposit.py", line 75, in inner
return f(*args, **kwargs)
File "/opt/inspire/lib/python2.7/site-packages/flask_principal.py", line 199, in _decorated
rv = f(*args, **kw)
File "/opt/inspire/src/invenio/invenio/modules/deposit/views/deposit.py", line 313, in run
return deposition.run_workflow()
File "/opt/inspire/src/invenio/invenio/modules/deposit/models.py", line 1161, in run_workflow
self.engine = self.type.run_workflow(self)
File "/opt/inspire/src/invenio/invenio/modules/deposit/models.py", line 480, in run_workflow
module_name="webdeposit"
File "/opt/inspire/src/invenio/invenio/modules/workflows/models.py", line 629, in start_workflow
return start_func(workflow_name, data=[self], **kwargs)
File "/opt/inspire/src/invenio/invenio/modules/workflows/api.py", line 99, in start
return run_worker(workflow_name, data, **kwargs)
File "/opt/inspire/src/invenio/invenio/modules/workflows/worker_engine.py", line 45, in run_worker
run_workflow(wfe=engine, data=objects, **kwargs)
File "/opt/inspire/src/invenio/invenio/modules/workflows/client.py", line 75, in run_workflow
workflow_halted.send(current_obj)
File "/opt/inspire/lib/python2.7/site-packages/blinker/base.py", line 267, in send
for receiver in self.receivers_for(sender)]
File "/opt/inspire/src/inspire/inspire/modules/workflows/receivers.py", line 39, in precache_holdingpen_row
get_formatted_holdingpen_object(sender)
File "/opt/inspire/src/invenio/invenio/modules/workflows/utils.py", line 278, in get_formatted_holdingpen_object
results = generate_formatted_holdingpen_object(bwo)
File "/opt/inspire/src/invenio/invenio/modules/workflows/utils.py", line 312, in generate_formatted_holdingpen_object
"additional": workflow_definition.get_additional(bwo),
File "/opt/inspire/src/inspire/inspire/modules/deposit/workflows/literature.py", line 245, in get_additional
overall_score=core_guessing.get("overall_score"))
File "/opt/inspire/lib/python2.7/site-packages/flask/templating.py", line 128, in render_template
context, ctx.app)
File "/opt/inspire/lib/python2.7/site-packages/flask/templating.py", line 110, in _render
rv = template.render(context)
File "/opt/inspire/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
return self.environment.handle_exception(exc_info, True)
File "/opt/inspire/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
reraise(exc_type, exc_value, tb)
File "/opt/inspire/src/inspire/inspire/modules/workflows/views/../templates/workflows/styles/harvesting_record_additional.html", line 35, in top-level template code
{{decision}} ({{ score|round(2) }})
File "/opt/inspire/lib/python2.7/site-packages/jinja2/filters.py", line 657, in do_round
return round(value, precision)
UndefinedError: 'score' is undefined
** Stack frame details
Frame do_round in /opt/inspire/lib/python2.7/site-packages/jinja2/filters.py at line 657
-------------------------------------------------------------------------------
654 if not method in ('common', 'ceil', 'floor'):
655 raise FilterArgumentError('method must be common, ceil or floor')
656 if method == 'common':
----> 657 return round(value, precision)
658 func = getattr(math, method)
659 return func(value * (10 ** precision)) / (10 ** precision)
660
-------------------------------------------------------------------------------
method = "'common'"
value = 'Undefined'
precision = '2'
Frame top-level template code in /opt/inspire/src/inspire/inspire/modules/workflows/views/../templates/workflows/styles/harvesting_record_additional.html at line 35
alternate_urls = "{u'en': u'http://qa.inspirehep.net/submit/literature/14208?ln=en'}"
object = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
easy_search_form = '<invenio.modules.search.forms.EasySearchForm object at 0x7fd146b86ed0>'
current_menu = '<flask_menu.MenuEntryMixin object at 0x7fd17d289e90>'
searchbar_enable = 'True'
lipsum = '<function generate_lorem_ipsum at 0x7fd17643d050>'
ngettext = '<function ngettext at 0x7fd176f83d70>'
get_record = "<bound method StorageEngine.get_record of <class 'invenio.modules.records.api.Record'>>"
session = "<Session {'websearch-last-query': '/search?cc=HEP', 'inspire-last-search-params': MultiDict([('cc', u'HEP')]), 'csrf_token': 'aae5894c8f2b4c08a9dbde3d6b084cbe0773b314', 'user_id': 1L, u'oauth_token_orcid_next_url': u'https://qa.inspirehep.net', 'author_new_referrer': None, 'identity.id': 1L, '_fresh': True, '_uid': 1L, 'inspire-current-collection': u'HEP', 'uid': 1L, '_id': '76362c3f7c76c65e8bc8f2164b688b9c', 'identity.auth_type': None, 'websearch-last-query-hits': intbitset([]), '_permanent': [...]
top_words = 'None'
get_flashed_messages = '<function get_flashed_messages at 0x7fd17666e410>'
keywords = 'None'
core = 'None'
canonical_url = "u'http://qa.inspirehep.net/submit/literature/14208'"
_ = '<function _gettext_alias at 0x7fd176ca6140>'
url_for = '<function invenio_url_for at 0x7fd1468917d0>'
g = "<flask.g of 'invenio.base'>"
macros = "<TemplateModule 'workflows/macros.html'>"
breadcrumbs = '[<flask_menu.MenuEntryMixin object at 0x7fd146201a90>, <flask_menu.MenuEntryMixin object at 0x7fd146245110>]'
decision = 'Undefined'
request = "<LegacyRequest 'https://qa.inspirehep.net/submit/literature/14208' [GET]>"
core_words = 'Undefined'
gettext = '<function gettext at 0x7fd176f83cf8>'
overall_score = 'None'
get_bundle = '<function get_bundle at 0x7fd1746e5668>'
range = "<type 'xrange'>"
score = 'Undefined'
dict = '<function <lambda> at 0x7fd1764b2578>'
current_user = "UserInfo([{'referer': 'https://qa.inspirehep.net/', 'remote_host': '', 'uri': '/submit/literature/14208', 'agent': u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36', 'remote_ip': '188.184.151.228'}, <CallbackDict {'uid': 1L, 'given_names': '', 'agent': u'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.124 Safari/537.36', 'referer': 'https://qa.inspirehep.net/youracc [...]
collection = 'Collection <id: 1, name: HEP, dbquery: SELECT collection.id AS collection_id, collection.name AS collection_name, collection.dbquery AS collection_dbquery \nFROM collection, nbrecs: 0>'
is_language_rtl = '<function is_language_rtl at 0x7fd178371410>'
cycler = "<class 'jinja2.utils.Cycler'>"
joiner = "<class 'jinja2.utils.Joiner'>"
config = '<Config {\'ARXIV_API_URL\': u\'http://export.arxiv.org/oai2\', \'CFG_BIBINDEX_MIN_WORD_LENGTH\': 0, \'CFG_WEBAUTHORPROFILE_CFG_HEPNAMES_EMAIL\': u\'[email protected]\', \'INSPIRE_URL_REGEX\': u\'^(?:http(?:s)?:\\\\/\\\\/)?(?:www\\\\.)?(?:[\\\\w-]*)\\\\.\\\\w{2,}$\', \'WORKFLOWS_HOLDING_PEN_CACHE_TIMEOUT\': 2629743, \'CFG_WEBTAG_DEFAULT_USER_SETTINGS\': {u\'display_tags_public\': True, u\'display_tags_group\': True, u\'display_tags\': True}, \'CFG_SITE_EMERGENCY_EMAIL_ADDRESSES\': {}, \'CFG [...]
filtered_core = 'Undefined'
Frame handle_exception in /opt/inspire/lib/python2.7/site-packages/jinja2/environment.py at line 742
-------------------------------------------------------------------------------
739 if self.exception_handler is not None:
740 self.exception_handler(traceback)
741 exc_type, exc_value, tb = traceback.standard_exc_info
----> 742 reraise(exc_type, exc_value, tb)
743
744 def join_path(self, template, parent):
745 """Join a template with the parent. By default all the lookups are
-------------------------------------------------------------------------------
source_hint = 'None'
rendered = 'True'
self = '<flask.templating.Environment object at 0x7fd176f81e90>'
traceback = '<jinja2.debug.ProcessedTraceback object at 0x7fd146d59b10>'
exc_type = "<class 'jinja2.exceptions.UndefinedError'>"
exc_info = '(<class \'jinja2.exceptions.UndefinedError\'>, UndefinedError("\'score\' is undefined",), <traceback object at 0x7fd146b5db48>)'
tb = '<traceback object at 0x7fd146d503f8>'
exc_value = 'UndefinedError("\'score\' is undefined",)'
Frame render in /opt/inspire/lib/python2.7/site-packages/jinja2/environment.py at line 969
exc_info = '(<class \'jinja2.exceptions.UndefinedError\'>, UndefinedError("\'score\' is undefined",), <traceback object at 0x7fd146b5db48>)'
self = "<Template 'workflows/styles/harvesting_record_additional.html'>"
args = '({\'core\': None, \'object\': <BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been complete [...]
vars = '{\'core\': None, \'searchbar_enable\': True, \'easy_search_form\': <invenio.modules.search.forms.EasySearchForm object at 0x7fd146b86ed0>, \'alternate_urls\': {u\'en\': u\'http://qa.inspirehep.net/submit/literature/14208?ln=en\'}, \'object\': <BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-021 [...]
kwargs = '{}'
Frame _render in /opt/inspire/lib/python2.7/site-packages/flask/templating.py at line 110
app = "<Flask 'invenio.base'>"
template = "<Template 'workflows/styles/harvesting_record_additional.html'>"
context = '{\'core\': None, \'object\': <BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed [...]
Frame render_template in /opt/inspire/lib/python2.7/site-packages/flask/templating.py at line 128
ctx = '<flask.ctx.AppContext object at 0x7fd146890390>'
template_name_or_list = "'workflows/styles/harvesting_record_additional.html'"
context = '{\'core\': None, \'object\': <BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed [...]
Frame get_additional in /opt/inspire/src/inspire/inspire/modules/deposit/workflows/literature.py at line 245
-------------------------------------------------------------------------------
242 keywords=keywords,
243 top_words=core_guessing.get("top_words"),
244 core=core_guessing.get("core"),
----> 245 overall_score=core_guessing.get("overall_score"))
246
247 @staticmethod
248 def formatter(bwo, **kwargs):
-------------------------------------------------------------------------------
results = '{}'
core_guessing = '{}'
kwargs = '{}'
keywords = 'None'
get_classification_from_task_results = '<function get_classification_from_task_results at 0x7fd146adced8>'
bwo = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
Frame generate_formatted_holdingpen_object in /opt/inspire/src/invenio/invenio/modules/workflows/utils.py at line 312
-------------------------------------------------------------------------------
309 "description": workflow_definition.get_description(bwo),
310 "title": workflow_definition.get_title(bwo),
311 "date": bwo.modified.strftime(date_format),
----> 312 "additional": workflow_definition.get_additional(bwo),
313 "action": mini_action
314 }
315 return results
-------------------------------------------------------------------------------
date_format = "'%Y-%m-%d %H:%M:%S.%f'"
mini_action = "''"
workflows_name = "u'literature'"
WorkflowBase = "<class 'invenio.modules.workflows.definitions.WorkflowBase'>"
action_name = "''"
workflow_definition = "<class 'inspire.modules.deposit.workflows.literature.literature'>"
action = 'None'
bwo = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
Frame get_formatted_holdingpen_object in /opt/inspire/src/invenio/invenio/modules/workflows/utils.py at line 278
-------------------------------------------------------------------------------
275 results = msgpack.loads(cache.get("workflows_holdingpen_{0}".format(bwo.id)))
276 if results["date"] == bwo.modified.strftime(date_format):
277 return results
----> 278 results = generate_formatted_holdingpen_object(bwo)
279 if results:
280 cache.set("workflows_holdingpen_{0}".format(bwo.id),
281 msgpack.dumps(results),
-------------------------------------------------------------------------------
date_format = "'%Y-%m-%d %H:%M:%S.%f'"
results = 'None'
bwo = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
Frame precache_holdingpen_row in /opt/inspire/src/inspire/inspire/modules/workflows/receivers.py at line 39
-------------------------------------------------------------------------------
36 """Precache a Holding Pen row."""
37 from invenio.modules.workflows.utils import get_formatted_holdingpen_object
38 # Call it to cache it
----> 39 get_formatted_holdingpen_object(sender)
40
41
42 workflow_halted.connect(precache_holdingpen_row)
-------------------------------------------------------------------------------
kwargs = '{}'
sender = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
get_formatted_holdingpen_object = '<function get_formatted_holdingpen_object at 0x7fd17c2fa050>'
Frame send in /opt/inspire/lib/python2.7/site-packages/blinker/base.py at line 267
-------------------------------------------------------------------------------
264 return []
265 else:
266 return [(receiver, receiver(sender, **kwargs))
----> 267 for receiver in self.receivers_for(sender)]
268
269 def has_receivers_for(self, sender):
270 """True if there is probably a receiver for *sender*.
-------------------------------------------------------------------------------
self = "<blinker.base.NamedSignal object at 0x7fd1784c98d0; 'workflow_halted'>"
kwargs = '{}'
sender = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
receiver = '<function precache_holdingpen_row at 0x7fd1784cab90>'
Frame run_workflow in /opt/inspire/src/invenio/invenio/modules/workflows/client.py at line 75
-------------------------------------------------------------------------------
72 wfe.get_current_taskname() or "Unknown",
73 workflowhalt_triggered.message)
74 wfe.log.warning(message)
----> 75 workflow_halted.send(current_obj)
76 if stop_on_halt:
77 break
78 except Exception as exception_triggered:
-------------------------------------------------------------------------------
current_obj = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
workflowhalt_triggered = 'WorkflowHalt()'
stop_on_error = 'True'
wfe = '<BibWorkflow_engine(literature)>'
initial_run = 'False'
kwargs = "{'module_name': 'webdeposit', 'id_user': 1L}"
message = 'u"Workflow \'literature\' halted at task render_form with message: Wait for form submission."'
data = '[<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: [...]
stop_on_halt = 'False'
Frame run_worker in /opt/inspire/src/invenio/invenio/modules/workflows/worker_engine.py at line 45
-------------------------------------------------------------------------------
42 engine = BibWorkflowEngine(wname, **kwargs)
43 engine.save()
44 objects = get_workflow_object_instances(data, engine)
----> 45 run_workflow(wfe=engine, data=objects, **kwargs)
46 return engine
47
48
-------------------------------------------------------------------------------
engine = '<BibWorkflow_engine(literature)>'
wname = "'literature'"
objects = '[<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: [...]
data = '[<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: [...]
kwargs = "{'module_name': 'webdeposit', 'id_user': 1L}"
Frame start in /opt/inspire/src/invenio/invenio/modules/workflows/api.py at line 99
-------------------------------------------------------------------------------
96 if not isinstance(data, list):
97 data = [data]
98
----> 99 return run_worker(workflow_name, data, **kwargs)
100
101
102 def start_delayed(workflow_name, data, **kwargs):
-------------------------------------------------------------------------------
run_worker = '<function run_worker at 0x7fd14677fed8>'
data = '[<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: [...]
workflow_name = "'literature'"
kwargs = "{'module_name': 'webdeposit', 'id_user': 1L}"
Frame start_workflow in /opt/inspire/src/invenio/invenio/modules/workflows/models.py at line 629
-------------------------------------------------------------------------------
626 else:
627 from .api import start as start_func
628 self.save()
----> 629 return start_func(workflow_name, data=[self], **kwargs)
630
631 def continue_workflow(self, start_point="continue_next",
632 delayed=False, **kwargs):
-------------------------------------------------------------------------------
self = '<BibWorkflowObject(id = 14208, data = {\'files\': [], \'title\': \'\', \'type\': \'literature\', \'drafts\': {\'default\': {\'values\': {}, \'validate\': False, \'flags\': {}, \'completed\': False}}, \'sips\': []}, id_workflow = 1ee9a28c-141e-11e5-9dd8-02163e00cb72, version = 4, id_parent = None, created = 2015-06-16 13:52:10, extra_data = {\'latest_object\': -1, \'_task_history\': [{\'doc\': u"Render a form if the draft associated with it has not yet been completed.\\n\\n :param draft_id: T [...]
workflow_name = "'literature'"
start_func = '<function start at 0x7fd17e2b15f0>'
delayed = 'False'
kwargs = "{'module_name': 'webdeposit', 'id_user': 1L}"
Frame run_workflow in /opt/inspire/src/invenio/invenio/modules/deposit/models.py at line 480
-------------------------------------------------------------------------------
477 return deposition.workflow_object.start_workflow(
478 workflow_name=cls.get_identifier(),
479 id_user=deposition.workflow_object.id_user,
----> 480 module_name="webdeposit"
481 )
482 else:
483 return deposition.workflow_object.continue_workflow(
-------------------------------------------------------------------------------
deposition = '<invenio.modules.deposit.models.Deposition object at 0x7fd146a0c590>'
cls = "<class 'inspire.modules.deposit.workflows.literature.literature'>"
Frame run_workflow in /opt/inspire/src/invenio/invenio/modules/deposit/models.py at line 1161
-------------------------------------------------------------------------------
1158 else self.type.render_final(self)
1159
1160 self.update()
----> 1161 self.engine = self.type.run_workflow(self)
1162 self.reload()
1163 status = self.engine.status
1164
-------------------------------------------------------------------------------
headless = 'False'
self = '<invenio.modules.deposit.models.Deposition object at 0x7fd146a0c590>'
Frame run in /opt/inspire/src/invenio/invenio/modules/deposit/views/deposit.py at line 313
-------------------------------------------------------------------------------
310 """Run the workflow and show the current output of the workflow."""
311 deposition = Deposition.get(uuid, current_user, type=deposition_type)
312
----> 313 return deposition.run_workflow()
314
315
316 @blueprint.route('/<depositions:deposition_type>/<int:uuid>/edit/',
-------------------------------------------------------------------------------
deposition_type = "u'literature'"
deposition = '<invenio.modules.deposit.models.Deposition object at 0x7fd146a0c590>'
uuid = '14208'
Frame _decorated in /opt/inspire/lib/python2.7/site-packages/flask_principal.py at line 199
-------------------------------------------------------------------------------
196 @wraps(f)
197 def _decorated(*args, **kw):
198 with self:
----> 199 rv = f(*args, **kw)
200 return rv
201 return _decorated
202
-------------------------------------------------------------------------------
self = '<flask_principal.IdentityContext object at 0x7fd17d7ef2d0>'
args = '()'
kw = "{'deposition_type': u'literature', 'uuid': 14208}"
f = '<function run at 0x7fd17d7eea28>'
Frame inner in /opt/inspire/src/invenio/invenio/modules/deposit/views/deposit.py at line 100
-------------------------------------------------------------------------------
97 flash(_("Not allowed."), 'danger')
98 return redirect(url_for(endpoint))
99 except (UploadError,):
----> 100 abort(400)
101 return inner
102 return decorator
103
-------------------------------------------------------------------------------
args = '()'
endpoint = "'.index'"
f = '<function run at 0x7fd17d7eeaa0>'
kwargs = "{'deposition_type': u'literature', 'uuid': 14208}"
Frame decorated_view in /opt/inspire/lib/python2.7/site-packages/flask_login.py at line 758
-------------------------------------------------------------------------------
755 return func(*args, **kwargs)
756 elif not current_user.is_authenticated():
757 return current_app.login_manager.unauthorized()
----> 758 return func(*args, **kwargs)
759 return decorated_view
760
761
-------------------------------------------------------------------------------
args = '()'
func = '<function run at 0x7fd17d7eeb18>'
kwargs = "{'deposition_type': u'literature', 'uuid': 14208}"
Frame dispatch_request in /opt/inspire/lib/python2.7/site-packages/flask/app.py at line 1461
-------------------------------------------------------------------------------
1458 and req.method == 'OPTIONS':
1459 return self.make_default_options_response()
1460 # otherwise dispatch to the handler for that endpoint
----> 1461 return self.view_functions[rule.endpoint](**req.view_args)
1462
1463 def full_dispatch_request(self):
1464 """Dispatches the request and on top of that performs request
-------------------------------------------------------------------------------
self = "<Flask 'invenio.base'>"
req = "<LegacyRequest 'https://qa.inspirehep.net/submit/literature/14208' [GET]>"
rule = "<Rule '/submit/<deposition_type>/<uuid>' (HEAD, POST, OPTIONS, GET) -> webdeposit.run>"
Frame full_dispatch_request in /opt/inspire/lib/python2.7/site-packages/flask/app.py at line 1477
-------------------------------------------------------------------------------
1474 if rv is None:
1475 rv = self.dispatch_request()
1476 except Exception as e:
----> 1477 rv = self.handle_user_exception(e)
1478 response = self.make_response(rv)
1479 response = self.process_response(response)
1480 request_finished.send(self, response=response)
-------------------------------------------------------------------------------
rv = 'None'
e = 'UndefinedError("\'score\' is undefined",)'
self = "<Flask 'invenio.base'>"
Frame handle_user_exception in /opt/inspire/lib/python2.7/site-packages/flask/app.py at line 1381
-------------------------------------------------------------------------------
1378 if isinstance(e, typecheck):
1379 return handler(e)
1380
----> 1381 reraise(exc_type, exc_value, tb)
1382
1383 def handle_exception(self, e):
1384 """Default exception handling that kicks in when an exception
-------------------------------------------------------------------------------
e = 'UndefinedError("\'score\' is undefined",)'
handlers = 'None'
self = "<Flask 'invenio.base'>"
exc_value = 'UndefinedError("\'score\' is undefined",)'
blueprint_handlers = '()'
app_handlers = '()'
tb = '<traceback object at 0x7fd146d50638>'
exc_type = "<class 'jinja2.exceptions.UndefinedError'>"
Frame handle_user_exception in /opt/inspire/src/invenio/invenio/base/wrappers.py at line 133
-------------------------------------------------------------------------------
130 Hook a before handle to it.
131 """
132 before_handle_user_exception.send(e)
----> 133 return super(Flask, self).handle_user_exception(e)
134
135
136 def lazy_import(name):
-------------------------------------------------------------------------------
self = "<Flask 'invenio.base'>"
e = 'UndefinedError("\'score\' is undefined",)'
Frame error_router in /opt/inspire/lib/python2.7/site-packages/flask_restful/__init__.py at line 265
-------------------------------------------------------------------------------
262 return self.handle_error(e)
263 except Exception:
264 pass # Fall through to original handler
----> 265 return original_handler(e)
266
267 def handle_error(self, e):
268 """Error handler for the API transforms a raised exception into a Flask
-------------------------------------------------------------------------------
original_handler = "<bound method Flask.handle_user_exception of <Flask 'invenio.base'>>"
self = '<flask_restful.Api object at 0x7fd17c0ab190>'
e = 'UndefinedError("\'score\' is undefined",)'
Frame full_dispatch_request in /opt/inspire/lib/python2.7/site-packages/flask/app.py at line 1477
-------------------------------------------------------------------------------
1474 if rv is None:
1475 rv = self.dispatch_request()
1476 except Exception as e:
----> 1477 rv = self.handle_user_exception(e)
1478 response = self.make_response(rv)
1479 response = self.process_response(response)
1480 request_finished.send(self, response=response)
-------------------------------------------------------------------------------
rv = 'None'
e = 'UndefinedError("\'score\' is undefined",)'
self = "<Flask 'invenio.base'>"
Frame __call__ in /opt/inspire/src/invenio/invenio/ext/legacy/__init__.py at line 122
-------------------------------------------------------------------------------
119 response = self.app.full_dispatch_request()
120 except Exception as e:
121 from invenio.ext.logging import register_exception
----> 122 register_exception(req=request, alert_admin=True)
123 response = self.app.handle_exception(e)
124
125 return response(environ, start_response)
-------------------------------------------------------------------------------
start_response = '<built-in method start_response of mod_wsgi.Adapter object at 0x7fd17d0be120>'
environ = "{'wsgi.version': (1, 0), 'mod_wsgi.listener_port': '443', 'HTTP_COOKIE': '_pk_id.11.386a=122e12ee9a8c3737.1434369296.3.1434455484.1434453857.; _pk_ses.11.386a=*; session=2a54565a4352412689f4dae4b61a7243.CGGfag.DFW-jMeRJS75siVcgAAYqUzcubM; sessionstub=HTTPS', 'mod_wsgi.listener_host': '', 'CONTEXT_DOCUMENT_ROOT': '/opt/inspire/var/invenio.base-instance/static', 'SERVER_SOFTWARE': 'Apache', 'SCRIPT_NAME': '', 'mod_wsgi.enable_sendfile': '0', 'mod_wsgi.handler_script': '', 'SERVER_SIGNATURE': '', [...]
self = '<invenio.ext.legacy.LegacyAppMiddleware object at 0x7fd178186bd0>'
register_exception = '<function register_exception at 0x7fd17b7d9320>'
e = 'UndefinedError("\'score\' is undefined",)'