adsabs / ADSImportPipeline

Data ingest pipeline for ADS classic->ADS+
GNU General Public License v3.0
1 stars 12 forks source link

multiple data types isbn #174

Closed romanchyla closed 6 years ago

romanchyla commented 6 years ago
     args=[{u'modtime': u'2017-10-27T00:45:59.324111Z', u'bibcode': u'2003oiai.conf.....C', u'text': {u'acknowledgement': []}, u'JSON_fingerprint': u'{"abs":[{"p":"/proj/ads/abstracts/ast/text/J13/J13-45467.abs","primary":1,"t":"1298500238"}],"links":{"library":[{"u":"http://www.worldcat.org/isbn/8598138010"}]},"prop":["bibgroup: ESO/Lib"]}', u'entry_date': u'2004-02-12', u'metadata': [{u'comment': [], u'doi': [], u'publication': {u'origin': u'AUTHOR', u'dates': [{u'content': u'2003-12-00', u'type': u'date-published'}, {u'content': u'2003', u'type': u'publication_year'}], u'name': {u'raw': u'Optical and Infrared Astronomical Instrumentation for Modern Telescopes - Brazilian Workshop Editors - Bruno V. Castilho & Clemens D. Gneiding Location - Angra dos Reis, Rio de Janeiro, Brazil Date - November 16-20, 2003 Publisher - Laboratorio Nacional de Astrofisica Proceedings - published on CD-ROM ISBN - 85-98138-01-0', u'canonical': u'Optical and Infrared Astronomical Instrumentation for Modern Telescopes - Brazilian Workshop Editors - Bruno V. Castilho & Clemens D. Gneiding Location - Angra dos Reis'}, u'page_count': u'0', u'page_last': None, u'volume': None, u'page_range': None, u'electronic_id': None, u'altbibcode': u'2003oiai.conf.....C', u'issue': None, u'page': None}, u'language': u'', u'tempdata': {u'origin': u'AUTHOR', u'modtime': u'2011-02-23T22:30:38Z', u'type': u'general', u'primary': True, u'alternate_journal': False}, u'issns': [], u'conf_metadata': {u'origin': u'AUTHOR', u'content': None}, u'titles': [{u'lang': u'en', u'text': u'Optical and Infrared Astronomical Instrumentation for Modern Telescopes - Brazilian Workshop'}], u'isbns': [{u'origin': u'AUTHOR', u'content': [None, u'8598138010']}], u'authors': [{u'name': {u'western': u'Castilho, B. V.', u'normalized': u'Castilho, B', u'native': None}, u'number': u'1', u'affiliations': [], u'orcid': None, u'type': u'regular', u'emails': []}, {u'name': {u'western': u'Gneiding, C. D.', u'normalized': u'Gneiding, C', u'native': None}, u'number': u'2', u'affiliations': [], u'orcid': None, u'type': u'regular', u'emails': []}], u'keywords': [], u'arxivcategories': [], u'pubnote': [], u'copyright': [], u'abstracts': [{u'lang': u'en', u'text': u'The workshop was focused on optical and infrared instruments for large and medium class telescopes, with special attention on the projects that the Brazilian community is involved. Together with the instrumentation presentations the workshop had contributions about the science that these telescopes and new generation instruments will provide. This allowed the participants (instrumentation groups and the astronomers) interact and set the direction for the new developments needed to achieve the high quality data necessary to answer important open questions in many astronomy fields. Main Topics - Optical & Infrared Instruments - Software & Electronics - Science with New Generation Instruments', u'origin': u'AUTHOR'}]}, {u'refereed': False, u'openaccess': False, u'eprint_openaccess': False, u'data_sources': [], u'pub_openaccess': False, u'tempdata': {u'origin': u'ADS metadata', u'modtime': None, u'type': u'properties', u'primary': False, u'alternate_journal': False}, u'doctype': {u'origin': u'ADS metadata', u'content': u'proceedings'}, u'private': False, u'ocrabstract': False, u'associates': [], u'ads_openaccess': False, u'databases': [{u'origin': u'ADS metadata', u'content': u'AST'}], u'vizier_tables': [], u'bibgroups': [{u'origin': u'ADS metadata', u'content': u'ESO/Lib'}]}, {u'tempdata': {u'modtime': None, u'origin': u'ADS metadata', u'type': u'relations', u'primary': False, u'alternate_journal': False}, u'links': [{u'origin': None, u'count': None, u'title': None, u'url': u'http://www.worldcat.org/isbn/8598138010', u'access': None, u'type': u'library'}], u'preprints': [], u'alternates': []}]}]
     kwargs={}
     trace=Traceback (most recent call last):
       File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 374, in trace_task
         R = retval = fun(*args, **kwargs)
       File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 629, in __protected_call__
         return self.run(*args, **kwargs)
       File "/app/aip/tasks.py", line 93, in task_merge_metadata
         solr_adapter.SolrAdapter.validate(r)  # Raises AssertionError if not validated
       File "/app/aip/libs/solr_adapter.py", line 572, in validate
         assert len(set([type(i) for i in v])) == 1, "{0}: multiple data-types in list: {1}".format(k, v)
     AssertionError: isbn: multiple data-types in list: [u'8598138010', None]