internetarchive / internetarchive/openlibrary

IA import fails due to missing publisher

Open
#10,756 7 comments 0 reactions 0 assignees View on GitHub
Lead: @mekarpeles Module: Import Priority: 3 Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

### Problem

### Reproducing the bug

Run the following (requires import permissions):

```js
await fetch("https://openlibrary.org/api/import/ia?identifier=richestmaninbaby0000geor_q8e2&require_marc=false", {
"credentials": "include",
"method": "POST",
"mode": "cors"
});
```

* Expected behavior: It imports the book
* Actual behavior: Errors with:

```json
{"success": false, "error_code": "not-differentiable", "error": "1 validation error for CompleteBook\npublishers\n Field required [type=missing, input_value={'title': 'the richest ma...aninbaby0000geor_q8e2']}, input_type=dict]\n For further information visit https://errors.pydantic.dev/2.4/v/missing"}
```

### Context

- Browser (Chrome, Safari, Firefox, etc):
- OS (Windows, Mac, etc):
- Logged in (Y/N):
- Environment (prod, dev, local): prod

### Breakdown

#### Requirements Checklist
* [ ]

#### Related files

*

#### Stakeholders

*


#### Instructions for Contributors

- Please [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date **before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) to work on this issue and **each time after** pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the documented POST request to /api/import/ia using the supplied identifier. Search the import endpoint and the CompleteBook validation shown in the error to find why publishers is absent. Done means the identifier imports successfully without the not-differentiable validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.