safaribooks
safaribooks copied to clipboard
Unhandled Exception: Expecting value: line 1 column 1 (char 0) (type: JSONDecodeError)
getting this error Unhandled Exception: Expecting value: line 1 column 1 (char 0) (type: JSONDecodeError)
[10/Dec/2020 22:30:00] Description: Apply microservices patterns to build resilient and scalable distributed systemsKey FeaturesUnderstand the challenges of building large-scale microservice landscapes Build cloud-native production-ready microservices with this comprehensive guide Discover how to get the best out of Spring Cloud, Kubernetes, and Istio when used togetherBook DescriptionMicroservices architecture allows developers to build and maintain applications with ease, and enterprises are rapidly adopting it to build software...
[10/Dec/2020 22:30:00] Release Date: 2019-09-20
[10/Dec/2020 22:30:00] URL: https://learning.oreilly.com/library/view/handson-microservices-with/9781789613476/
[10/Dec/2020 22:30:00] Retrieving book chapters...
[10/Dec/2020 22:30:15] File "safaribooks.py", line 1112, in
[10/Dec/2020 22:30:15] Unhandled Exception: Expecting value: line 1 column 1 (char 0) (type: JSONDecodeError) [10/Dec/2020 22:30:15] Last request done: URL: https://learning.oreilly.com/api/v1/book/9781789613476/chapter/?page=8 DATA: None OTHERS: {}
500
Connection: keep-alive
Content-Length: 5
server: istio-envoy
content-type: text/html; charset=utf-8
strict-transport-security: max-age=31536000; includeSubDomains
x-envoy-upstream-service-time: 547
etag: W/"5-HNpjNEc7NA6q6c3n6by2sZ4GE1Y"
x-content-type-options: nosniff
x-powered-by: Express
Fastly-Restarts: 1
Accept-Ranges: bytes
Date: Thu, 10 Dec 2020 17:00:15 GMT
Via: 1.1 varnish
X-Client-IP: 122.160.17.110
X-Served-By: cache-del21723-DEL
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1607619607.255622,VS0,VE8504
Vary: Accept, Accept-Encoding, Authorization, Cookie
Oops.
🤷🏻♂️
I'm also running into this error with book 9780134757681 - Refactoring: Improving the Design of Existing Code
This seems like it might be temporary with the API on Oreilly. I was getting this 500 error last night and this morning it worked fine 🤷
@lorenzodifuccia, a possible stopgap for this is to try and specifically catch this error and report that something is up with the Oreilly API and to try again later.