{"action":"created","issue":{"url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler/issues/41","repository_url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler","labels_url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler/issues/41/comments","events_url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler/issues/41/events","html_url":"https://github.com/NYPL-Simplified/metadata_wrangler/issues/41","id":141650552,"number":41,"title":"Exception extracting subject name from OCLC-LD","user":{"login":"leonardr","id":662474,"avatar_url":"https://avatars.githubusercontent.com/u/662474?v=3","gravatar_id":"","url":"https://api.github.com/users/leonardr","html_url":"https://github.com/leonardr","followers_url":"https://api.github.com/users/leonardr/followers","following_url":"https://api.github.com/users/leonardr/following{/other_user}","gists_url":"https://api.github.com/users/leonardr/gists{/gist_id}","starred_url":"https://api.github.com/users/leonardr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonardr/subscriptions","organizations_url":"https://api.github.com/users/leonardr/orgs","repos_url":"https://api.github.com/users/leonardr/repos","events_url":"https://api.github.com/users/leonardr/events{/privacy}","received_events_url":"https://api.github.com/users/leonardr/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler/labels/in%20progress","name":"in progress","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"courte","id":2766324,"avatar_url":"https://avatars.githubusercontent.com/u/2766324?v=3","gravatar_id":"","url":"https://api.github.com/users/courte","html_url":"https://github.com/courte","followers_url":"https://api.github.com/users/courte/followers","following_url":"https://api.github.com/users/courte/following{/other_user}","gists_url":"https://api.github.com/users/courte/gists{/gist_id}","starred_url":"https://api.github.com/users/courte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/courte/subscriptions","organizations_url":"https://api.github.com/users/courte/orgs","repos_url":"https://api.github.com/users/courte/repos","events_url":"https://api.github.com/users/courte/events{/privacy}","received_events_url":"https://api.github.com/users/courte/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-03-17T17:24:48Z","updated_at":"2016-03-21T17:35:51Z","closed_at":null,"body":"While looking at the logs of the metadata wrangler's identifier resolution script I noticed an exception in OCLC's metadata extraction code:\r\n\r\n```\r\n2016-03-17 17:15:25,985:root:INFO:model.py:Cached http://www.worldcat.org/oclc/57657089.jsonld\r\n2016-03-17 17:15:26,355:OCLC Linked Data Client:INFO:oclc.py:Processing edition None: None\r\n2016-03-17 17:15:26,403:Identifier Resolution Manager:ERROR:monitor.py:FAILURE on Gutenberg ID/9536 ID=2421639 wr=267543 (\"The Newcomes\"): Traceback (most recent call last):\r\n  File \"/home/ec2-user/metadata/core/monitor.py\", line 147, in resolve_and_handle_result\r\n    self.resolve(unresolved_identifier)\r\n  File \"/home/ec2-user/metadata/core/monitor.py\", line 183, in resolve\r\n    self.finalize(unresolved_identifier)\r\n  File \"/home/ec2-user/metadata/monitor.py\", line 153, in finalize\r\n    self.resolve_equivalent_oclc_identifiers(identifier)\r\n  File \"/home/ec2-user/metadata/monitor.py\", line 195, in resolve_equivalent_oclc_identifiers\r\n    self.oclc_linked_data.ensure_coverage(oclc_id)\r\n  File \"/home/ec2-user/metadata/core/coverage.py\", line 179, in ensure_coverage\r\n    result = self.process_item(identifier)\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 1283, in process_item\r\n    for metadata in self.api.info_for(identifier):\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 505, in info_for\r\n    info = self.book_info_to_metadata(subgraph, book)\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 531, in book_info_to_metadata\r\n    example_uris) = self.extract_useful_data(subgraph, book_info)\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 457, in extract_useful_data\r\n    [subject_name] = name_value\r\nValueError: too many values to unpack\r\n```\r\nIt doesn't happen every single time but it does happen pretty often. I don't see anything unusual in the OCLC-LD file that supposedly caused the problem, but I haven't looked into it too deeply."},"comment":{"url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler/issues/comments/199393495","html_url":"https://github.com/NYPL-Simplified/metadata_wrangler/issues/41#issuecomment-199393495","issue_url":"https://api.github.com/repos/NYPL-Simplified/metadata_wrangler/issues/41","id":199393495,"user":{"login":"courte","id":2766324,"avatar_url":"https://avatars.githubusercontent.com/u/2766324?v=3","gravatar_id":"","url":"https://api.github.com/users/courte","html_url":"https://github.com/courte","followers_url":"https://api.github.com/users/courte/followers","following_url":"https://api.github.com/users/courte/following{/other_user}","gists_url":"https://api.github.com/users/courte/gists{/gist_id}","starred_url":"https://api.github.com/users/courte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/courte/subscriptions","organizations_url":"https://api.github.com/users/courte/orgs","repos_url":"https://api.github.com/users/courte/repos","events_url":"https://api.github.com/users/courte/events{/privacy}","received_events_url":"https://api.github.com/users/courte/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T17:35:51Z","updated_at":"2016-03-21T17:35:51Z","body":"There's also a recurring issues with `subject_data` not existing:\r\n\r\n```\r\n2016-03-18 17:59:57,996:root:INFO:model.py:Cached http://www.worldcat.org/oclc/799681494.jsonld\r\n2016-03-18 17:59:58,263:OCLC Linked Data Client:INFO:oclc.py:Processing edition None: None\r\n2016-03-18 17:59:58,264:Identifier Resolution Manager:ERROR:monitor.py:FAILURE on Gutenberg ID/8756 ID=2439524 wr=267575 (\"The Monster Men\"): Traceback (most recent call last):\r\n  File \"/home/ec2-user/metadata/core/monitor.py\", line 147, in resolve_and_handle_result\r\n    self.resolve(unresolved_identifier)\r\n  File \"/home/ec2-user/metadata/core/monitor.py\", line 183, in resolve\r\n    self.finalize(unresolved_identifier)\r\n  File \"/home/ec2-user/metadata/monitor.py\", line 153, in finalize\r\n    self.resolve_equivalent_oclc_identifiers(identifier)\r\n  File \"/home/ec2-user/metadata/monitor.py\", line 195, in resolve_equivalent_oclc_identifiers\r\n    self.oclc_linked_data.ensure_coverage(oclc_id)\r\n  File \"/home/ec2-user/metadata/core/coverage.py\", line 179, in ensure_coverage\r\n    result = self.process_item(identifier)\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 1283, in process_item\r\n    for metadata in self.api.info_for(identifier):\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 505, in info_for\r\n    info = self.book_info_to_metadata(subgraph, book)\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 531, in book_info_to_metadata\r\n    example_uris) = self.extract_useful_data(subgraph, book_info)\r\n  File \"/home/ec2-user/metadata/oclc.py\", line 412, in extract_useful_data\r\n    [subject_data] = cls.internal_lookup(subgraph, [uri])\r\nValueError: need more than 0 values to unpack\r\n```"}}