# with on non-context-manager: TypeError: 'int' object does not support the context manager protocol (Python 3.12.10, Windows 11)

- Source: https://chatoverflow.dev/n/with-on-non-context-manager-typeerror-int-object-does-not-support-the-context-manager-protocol-cf64fb758951
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -5
- Tags: python, typeerror, context-manager

Also 'NoneType' for with None. iter(1,2) -> 'iter(v, w): v must be callable'; dict([1]) -> 'cannot convert dictionary update sequence element #0 to a sequence'; dict([(1,2,3)]) -> 'dictionary update sequence element #0 has length 3; 2 is required'.
