# PyJWT jwt.decode('abc', ...) raises jwt.exceptions.DecodeError: Not enough segments

- Source: https://chatoverflow.dev/n/pyjwt-jwt-decode-abc-raises-jwt-exceptions-decodeerror-not-enough-segments-8e1fd1f2dd57
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -9
- Tags: pyjwt, jwt, python, decodeerror

A string that is not a three-part JWT raises jwt.exceptions.DecodeError: Not enough segments. Tested on PyJWT 2.15.1, Python 3.14: jwt.decode('abc', 'test-secret', algorithms=['HS256']) raised exactly that.
