inspirehep / inspire-next

The INSPIRE repo.
https://inspirehep.net
GNU General Public License v3.0
59 stars 69 forks source link

Error in submitting paper #2400

Closed annetteholtkamp closed 7 years ago

annetteholtkamp commented 7 years ago

Current Behavior

If I click Submit it says "Saved, but with errors" The POST request indeed receives as JSON response:

{"messages":{"abstract":{},"additional_url":{},"arxiv_id":{},"authors":{"messages":["Got unexpected value type","Got unexpected value type","Got unexpected value type","Got unexpected value type","Got unexpected value type","Got unexpected value type","Got unexpected value type"],"state":"error"},"categories_arXiv":{},"collaboration":{},"conf_name":{},"conference_id":{},"defense_date":{},"degree_type":{},"doi":{},"experiment":{},"extra_comments":{},"institution":{},"issue":{},"journal_title":{},"language":{},"license_url":{},"note":{},"other_language":{},"page_range_article_id":{},"preprint_created":{},"references":{},"report_numbers":{},"subject":{},"supervisors":{},"thesis_date":{},"title":{},"title_arXiv":{},"title_crossref":{},"title_translation":{},"type_of_doc":{},"url":{},"volume":{},"year":{}}}

Steps to Reproduce (for bugs)

  1. Submit new record
  2. Enter 10.1063/1.4953647 and import
  3. complete the affiliations with CERN & Keio U.
  4. Click on submit
annetteholtkamp commented 7 years ago

cc: @jmartinm, @david-caro, @jacquerie

jacquerie commented 7 years ago

The bad news is that I tested this live in production, but the good news is that it went through: https://labs.inspirehep.net/holdingpen/649833

BTW I added the Theory-Nucl category, but I'm not really sure it's correct...

david-caro commented 7 years ago

Might it be related to this error from the web nodes? It's related to the references.


2017-06-01 13:45:54,805 ERROR: TransportError(400, u'action_request_validation_exception', u'Validation Failed: 1: no documents to g│··········································································································
et;') [in /opt/inspire/src/inspire/inspirehep/modules/search/api.py:95]                                                             │··········································································································
Traceback (most recent call last):                                                                                                  │··········································································································
  File "/opt/inspire/src/inspire/inspirehep/modules/search/api.py", line 91, in mget                                                │··········································································································
    **kwargs                                                                                                                        │··········································································································
  File "/opt/inspire/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped                               │··········································································································
    return func(*args, params=params, **kwargs)                                                                                     │··········································································································
  File "/opt/inspire/lib/python2.7/site-packages/elasticsearch/client/__init__.py", line 408, in mget                               │··········································································································
    doc_type, '_mget'), params=params, body=body)                                                                                   │··········································································································
  File "/opt/inspire/lib/python2.7/site-packages/elasticsearch/transport.py", line 327, in perform_request                          │··········································································································
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)                   │··········································································································
  File "/opt/inspire/lib/python2.7/site-packages/elasticsearch/connection/http_requests.py", line 84, in perform_request            │··········································································································
    self._raise_error(response.status_code, raw_data)                                                                               │··········································································································
  File "/opt/inspire/lib/python2.7/site-packages/elasticsearch/connection/base.py", line 114, in _raise_error                       │··········································································································
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)                             │··········································································································
RequestError: TransportError(400, u'action_request_validation_exception', u'Validation Failed: 1: no documents to get;')    ```
jacquerie commented 7 years ago

I doubt it... that exception stacktrace is generated here: https://github.com/inspirehep/inspire-next/blob/f2e42539c409f9ece36338bb5df03ba47437d7a1/inspirehep/modules/search/api.py#L95

Note that it is actually preventing the exception, printing the stacktrace and returning an empty list.

jacquerie commented 7 years ago

BTW I added the Theory-Nucl category, but I'm not really sure it's correct...

In fact, before adding a category I was getting the same error... could it be that this was the problem, @annetteholtkamp ?

jmartinm commented 7 years ago

Closing since cannot be reproduced