Python errors
High-intent troubleshooting for parsing and validation errors in Python. Use the exact error message and fix the first real issue.
Jump to section
Top tools (local-only)
- JSON Validator
- JSON Repair
- YAML Validator
- CSV Validator
- XML to JSON
- Base64 Encode/Decode
- URL Encode/Decode
- JWT Decoder
JSON parse / deserialize errors
Most issues are not “bad JSON” but wrong content (HTML), truncation, extra characters, invalid escapes, or encoding.
- json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 2 (char 1)
- json.decoder.JSONDecodeError: Expecting ':' delimiter: line 1 column 10 (char 9)
- json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
- json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
- json.decoder.JSONDecodeError: Invalid \escape: line 1 column 10 (char 9)
- json.decoder.JSONDecodeError: Invalid \uXXXX escape: line 1 column 10 (char 9)
- json.decoder.JSONDecodeError: Invalid control character at: line 1 column 10 (char 9)
- json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 10 (char 9)
- JSONDecodeError: Expecting ',' delimiter: line 1 column 2 (char 1)
- JSONDecodeError: Expecting ':' delimiter: line 1 column 10 (char 9)
- JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
- JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- JSONDecodeError: Extra data: line 1 column 2 (char 1)
- JSONDecodeError: Invalid \escape: line 1 column 10 (char 9)
- JSONDecodeError: Invalid \uXXXX escape: line 1 column 10 (char 9)
- JSONDecodeError: Invalid control character at: line 1 column 10 (char 9)
- JSONDecodeError: Unterminated string starting at: line 1 column 10 (char 9)
- simplejson.errors.JSONDecodeError: Expecting ',' delimiter: line 1 column 2 (char 1)
- simplejson.errors.JSONDecodeError: Expecting ':' delimiter: line 1 column 10 (char 9)
- simplejson.errors.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1)
- simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- simplejson.errors.JSONDecodeError: Extra data: line 1 column 2 (char 1)
- simplejson.errors.JSONDecodeError: Invalid \escape: line 1 column 10 (char 9)
- simplejson.errors.JSONDecodeError: Invalid \uXXXX escape: line 1 column 10 (char 9)
- simplejson.errors.JSONDecodeError: Invalid control character at: line 1 column 10 (char 9)
- simplejson.errors.JSONDecodeError: Unterminated string starting at: line 1 column 10 (char 9)
- TypeError: the JSON object must be str, bytes or bytearray, not bool
- TypeError: the JSON object must be str, bytes or bytearray, not dict
- TypeError: the JSON object must be str, bytes or bytearray, not float
- TypeError: the JSON object must be str, bytes or bytearray, not int
- TypeError: the JSON object must be str, bytes or bytearray, not list
- TypeError: the JSON object must be str, bytes or bytearray, not NoneType
YAML parse errors
YAML is indentation-sensitive. Fix the first reported line/column, then validate again before converting.
- yaml.composer.ComposerError: found duplicate key
- yaml.constructor.ConstructorError: could not determine a constructor for the tag
- yaml.parser.ParserError: expected <block end>, but found '<block mapping start>'
- yaml.parser.ParserError: while parsing a block mapping
- yaml.reader.ReaderError: unacceptable character #x0000
- yaml.scanner.ScannerError: found character '\t' that cannot start any token
- yaml.scanner.ScannerError: mapping values are not allowed here
- yaml.scanner.ScannerError: while scanning a simple key
CSV parser errors
CSV issues are usually delimiter + quoting rules. Find the first broken row and fix it.
- _csv.Error: field larger than field limit (131072)
- _csv.Error: line contains NUL
- _csv.Error: newline inside string
- EmptyDataError: No columns to parse from file
- Error tokenizing data. C error: Expected 5 fields in line 10, saw 7
- Error: iterator should return strings, not bytes (did you open the file in text mode?)
- ParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file.
- ParserError: Error tokenizing data. C error: Calling read(nbytes) on source failed. Try engine='python'.
- ParserError: Error tokenizing data. C error: EOF inside string starting at row 5
- ParserError: Error tokenizing data. C error: Expected 1 fields in line 2, saw 2
- ParserError: Error tokenizing data. C error: Expected 3 fields in line 10, saw 5
XML parsing errors
XML is strict: a single invalid character or unescaped ampersand can break parsing. Fix the first error and re-validate.
- xml.etree.ElementTree.ParseError: EntityRef: expecting ';'
- xml.etree.ElementTree.ParseError: mismatched tag: line 1, column 2
- xml.etree.ElementTree.ParseError: no element found: line 1, column 0
- xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0
- xml.etree.ElementTree.ParseError: unclosed token: line 1, column 0
- xml.etree.ElementTree.ParseError: undefined entity: line 1, column 10
- xml.parsers.expat.ExpatError: undefined entity: line 1, column 10
Encoding / token errors (Base64, URL, JWT)
Encoded strings may contain secrets. Decode locally and normalize Base64URL/percent-encoding safely.
- binascii.Error: Incorrect padding
- binascii.Error: Incorrect padding (urlsafe base64 decode)
- binascii.Error: Invalid base64-encoded string: number of data characters cannot be 1 more than a multiple of 4
- binascii.Error: Non-base64 digit found
- jwt.exceptions.DecodeError: Not enough segments
- jwt.exceptions.ExpiredSignatureError: Signature has expired
- jwt.exceptions.InvalidAudienceError: Invalid audience
- jwt.exceptions.InvalidIssuerError: Invalid issuer
- jwt.exceptions.InvalidSignatureError: Signature verification failed
- UnicodeDecodeError: 'charmap' codec can't decode byte
- UnicodeDecodeError: 'utf-8' codec can't decode byte
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe2 in position 10: invalid continuation byte
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
- UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: unexpected end of data
- UnicodeEncodeError: 'ascii' codec can't encode character
- ValueError: invalid % escape
Related hubs
FAQ (quick)
Start here: Errors hub (runs locally, no upload).
Can I fix Python errors without uploading my data? Yes. no-upload.ru tools run locally in your browser (NO UPLOAD). Start with Errors hub and keep samples redacted if you must share them.
What is the fastest safe workflow? Validate first, fix the smallest broken part, then validate again before converting/exporting. This prevents silent downstream issues.
Why does Python errors happen? Most issues come from copy/paste truncation, wrong encoding, non-strict syntax (comments/trailing commas), or a shape mismatch (array vs object).
Which tool should I start with for Python errors? Start with Errors hub. If you still see errors, follow the related playbook/trend report on this page.