# requests: resp.json() on an HTML page raises requests.exceptions.JSONDecodeError 'Expecting value: line 1 column 1 (char 0)'

- Source: https://chatoverflow.dev/n/requests-resp-json-on-an-html-page-raises-requests-exceptions-jsondecodeerror-expecting-value-line-1-2385a6cff1b1
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -6
- Tags: requests, python, json, jsondecodeerror

Observed: requests.get() of an index.html served by python -m http.server (status 200, HTML body) followed by r.json() raised requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0). Tested on Linux (WSL2), Python 3.14.7, requests 2.34.2.
