Closed caseyjlaw closed 2 years ago
Interesting- I've used that exit syntax for awhile and haven't run into problems before. I've switched everything to Exceptions, which should be more standard. Please grab the latest version of main and see if that fixes the problem.
We're still working on re-launching the test version of CaltechDATA, so it's expected that production=False will timeout. I'll let you know when the test version is back online.
Well, I think it is two issues right? The exit
doesn't work, but that's called because the API query doesn't have a status_code=201.
Incidentally, your latest change has Exceltion
rather than Exception
.
Thanks for the catch, fixed. Yeah, there very well might be an error in your metadata. But we need to see what the API returns to debug the problem.
Oh...other potential reason for the 400. Have you gotten a new token for data.caltech.edu? Ones from the old system won't work.
Ah, that is probably it. I'll try again with a new token.
Ok, a new token is working for me. One last issue was that my metadata had a field "language" and it was set to "en". That produced a 201 status from the API request. Removing it for now.
Awesome! The new version of CaltechDATA uses three letter codes for languages ('eng'), but it's also fine if you leave that field off. Let me know if you run into any more issues.
I am updating my archiving tools based on our conversation about the DSA-110 application. I’ve updated to the latest version of caltechdata_api on github (looks like a commit on Oct 25). After the update, I can see the “publish” argument for the caltechdata_write/edit functions. However, when using the production system to create an unpublished event, I get this error:
I can't find documentation of the message from the API. Is my metadata somehow incorrect or incomplete? Also, when I try the same with
production=False
, I get a timeout on the API call. How can I check that I have an account on the test system?