-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internet Archive imports often missing language #10141
Comments
hello @cdrini I would like to work on this issue. Thank you! |
@NickDevi thank you for offering! I think first we'll have @scottbarnes investigate and provide next steps if necessary |
@NickDevi, sorry for the inexcusable delay. If you are still interested in this, I think this is what's going on.
What this probably means is that:
I don't think any of this is necessarily hard in and of itself, but imports are a bit of a quagmire. If you are interested in this, and I'm more than happy to do this if you think this is will involve too much wandering in the wilderness, you'd want to read:
And then test this all locally. This would get you started testing your code using $ curl -c cookies.txt -X POST "http://localhost:8080/account/login" -d "[email protected]&password=admin123"
$ curl -L -v -X POST "http://localhost:8080/api/import/ia" \
-b ./cookies.txt \
-d "identifier=isbn_9781849353946&require_marc=false&force_import=true"
...
{"authors": [{"key": "/authors/OL5A", "name": "Leslie Kaplan", "status": "created"}], "success": true, "edition": {"key": "/books/OL11M", "status": "created"}, "work": {"key": "/works/OL1W", "status": "created"}}% That should import. If you remove the language (possibly using http://localhost:8080/books/OL11M.yml?m=edit, where From there, the fun begins editing the Python code. Again, please let me know if you're still interested. I would say because of the various parts here, this isn't a great first issue. Edit: fix file names. |
Hello, my name is Alex Bae. I was wondering if I could contribute to this issue? |
@NickDevi, is this still of interest to you? |
@qotkdrn why don't you give it a shot if you'd like |
@qotkdrn, just to follow up, if you have not noticed, you should have a Slack invite in your email (possibly in a spam folder). |
I got it! |
I’m currently experiencing an issue with connecting to the Open Library server running on my local machine. When I attempt to make a POST request to http://localhost:8080/account/login using curl, I get the following error: curl: (7) Failed to connect to localhost port 8080 after 8 ms: Couldn't connect to server It was working when I ran it earlier |
Hmmm, I can't speak to the error, but ideally once the cookie is set, it need not be set again. Does the process work without that step? |
Never mind, sorry about that. It works now. I don't know why I couldn't
connect to the server earlier despite having run the same commands.
After importing the sample book, this is what my output looks like, but
what should the output be?
(base) ***@***.*** openlibrary % curl -L -v -X POST "
http://localhost:8080/api/import/ia" \
-b ./cookies.txt \
-d "identifier=isbn_9781849353946&require_marc=false&force_import=true"
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
POST /api/import/ia HTTP/1.1
Host: localhost:8080
User-Agent: curl/8.1.2
Accept: */*
Cookie:
session=/people/openlibrary%2C2024-12-27T01%3A19%3A37%2Ca1ee5%24184e3f54fdecebe424fd176a4f2e1a26;
pd=
Content-Length: 66
Content-Type: application/x-www-form-urlencoded
< HTTP/1.1 200 OK
< Server: gunicorn
< Date: Fri, 27 Dec 2024 01:20:16 GMT
< Connection: close
< Transfer-Encoding: chunked
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Method: GET, OPTIONS
< Access-Control-Max-Age: 86400
< Content-type: application/json
< Content-Type: application/json
< X-OL-Stats: "IB 13 0.168 MC 10 0.007 OT 1 0.284 TT 0 2.069"
<
* Closing connection 0
{"success": true, "edition": {"key": "/books/OL5M", "status": "matched"},
"work": {"key": "/works/OL1W", "status": "matched"}}%
…On Thu, Dec 26, 2024 at 5:15 PM Scott Barnes ***@***.***> wrote:
Hmmm, I can't speak to the error, but ideally once the cookie is set, it
need not be set again. Does the process work without that step?
—
Reply to this email directly, view it on GitHub
<#10141 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWFGWLHY2QEVGNKZW4EHNVD2HSS3RAVCNFSM6AAAAABTLXSGE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRTGIYTCMZSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
That looks correct. If you go to http://localhost:8080/books/OL5M.yml?m=edit and remove the language, and import it again, what will happen (I imagine) is it will The goal is that if the edition already exists, as |
I made some changes and I think it works now? How do I proceed?
…On Thu, Dec 26, 2024 at 8:11 PM Scott Barnes ***@***.***> wrote:
That looks correct. /books/OL5M is the edition, so if you go to
http://localhost:8080/books/OL5M you should see it there. If you try to
import it again at this point, the results should mention success and the
result should once again match, as it did in the example you shared, as the
edition and work had already been created.
If you go to http://localhost:8080/books/OL5M.yml?m=edit and remove the
language, and import it again, what will happen (I imagine) is it will
match again, and yet the language will continue to be absent. That is the
thing we're trying to solve. The goal is to that if the edition already
exists, as OL5M does here, then if there is no language present, and the
import record has one (as it does in this case), then the language should
be added.
—
Reply to this email directly, view it on GitHub
<#10141 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWFGWLF6RV5ABEKN7A22UP32HTHO7AVCNFSM6AAAAABTLXSGE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRTGI4TIMBQHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Just open up a pull request and I will try to look at it tonight or over the weekend. Please also include how you tested the pull request/fix, including before and after examples demonstrating it broken, and showing it fixed. |
I couldn't find my pr under pull requests and I noticed that my pr failed
one of the python tests? Not quite sure what went wrong.
…On Fri, Dec 27, 2024 at 3:51 PM Scott Barnes ***@***.***> wrote:
Just open up a pull request
<https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request>
and I will try to look at it tonight or over the weekend.
Please also include how you tested the pull request/fix, including before
and after examples demonstrating it broken, and showing it fixed.
—
Reply to this email directly, view it on GitHub
<#10141 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWFGWLAE75IITRHKXLASST32HXRWLAVCNFSM6AAAAABTLXSGE6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRUGA4TMOJVGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@cdrini Please note that page counts are also missing.
|
Problem
Eg:
Reproducing the bug
Context
Instructions for Contributors
The text was updated successfully, but these errors were encountered: