Error map

TypeError operand TypeError: unsupported operand type(s) for +: 'int' and 'str'

Python · layer 4, Application & API

Open the full error page →

Centre: this error. First ring: errors it is linked with (12). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

TypeError operand — TypeError: unsupported operand type(s) for +: 'int' and 'str' (Python)TypeError o…Unable to cast object of type — System.InvalidCastException: Unable to cast object of type 'X' to type 'Y' (.NET)Unable to cast obje…ClassCastException — java.lang.ClassCastException: class A cannot be cast to class B (Java)ClassCastExceptionValueError — ValueError: invalid literal for int() with base 10: 'abc' (Python)ValueErrorERR_INVALID_ARG_TYPE — TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined (Node.js)ERR_INVALID_ARG_TYPEAttributeError — AttributeError: 'X' object has no attribute 'y' (Python)AttributeErrorTypeError concat — TypeError: can only concatenate str (not "int") to str (Python)TypeError concatCannot convert value of type — Swift: Cannot convert value of type 'X' to expected argument type 'Y' (iOS)Cannot convert valu…E0308 — Rust: error[E0308]: mismatched types — expected `X`, found `Y` (Rust)E0308TypeError not callable — TypeError: 'str' object is not callable (Python)TypeError not calla…TS2322 — TS2322: Type 'X' is not assignable to type 'Y' (TypeScript)TS2322TS2564 — TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor (TypeScript)TS2564unhashable type — TypeError: unhashable type: 'list' (Python)unhashable typeIllegalArgumentException — java.lang.IllegalArgumentException (Java)IllegalArgumentExce…IllegalStateException — java.lang.IllegalStateException (Java)IllegalStateExcepti…ArithmeticException — java.lang.ArithmeticException: / by zero (Java)ArithmeticExceptionStringIndexOutOfBoundsException — java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5 (Java)StringIndexOutOfBou…UnsupportedOperationException — java.lang.UnsupportedOperationException (List.of / Arrays.asList is immutable) (Java)UnsupportedOperatio…Stream closed — java.io.IOException: Stream closed (Java)Stream closedNumberFormatException — java.lang.NumberFormatException: For input string: "x" (Java)NumberFormatExcepti…DateTimeParseException — java.time.format.DateTimeParseException: Text '31/12/2024' could not be parsed at index 2 (Java)DateTimeParseExcept…Unparseable date — java.text.ParseException: Unparseable date: "x" (Java)Unparseable dateredirect_uri_mismatch — OAuth Error: redirect_uri_mismatch (Authentication)redirect_uri_mismat…divergent branches — hint: You have divergent branches and need to specify how to reconcile them. (Git)divergent branchesgpg failed to sign — error: gpg failed to sign the data — fatal: failed to write commit object (Git)gpg failed to signTypeError: not a function — TypeError: x is not a function (JavaScript)TypeError: not a fu…ImportError — ImportError: cannot import name 'x' from 'y' (Python)ImportErrorKeyError — KeyError: 'x' (Python)KeyErrorinvalid string length — RangeError: Invalid string length (JavaScript)invalid string leng…TS7016 — TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type. (Node.js)TS7016TS2304 — TS2304: Cannot find name 'x'. (Node.js)TS2304TS2339 — TS2339: Property 'x' does not exist on type 'Y'. (Node.js)TS2339TS2345 — TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. (Node.js)TS2345TypeError — Fatal error: Uncaught TypeError: foo(): Argument #1 ($x) must be of type int, string given (PHP)TypeErrorArray to string conversion — Warning: Array to string conversion (PHP)Array to string con…BucketAlreadyExists — BucketAlreadyExists: The requested bucket name is not available (AWS)BucketAlreadyExistsalready exists in stack — CloudFormation: Resource ... already exists (AlreadyExists / already exists in stack) (AWS)already exists in s…StorageAccountAlreadyTaken — StorageAccountAlreadyTaken: The storage account named x is already taken (Azure)StorageAccountAlrea…TS2532 / TS18048 — TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.) (Node.js)TS2532 / TS18048Cannot use object as array — Fatal error: Uncaught Error: Cannot use object of type stdClass as array (PHP)Cannot use object a…Unsupported operand types — Fatal error: Uncaught TypeError: Unsupported operand types: string + int (PHP)Unsupported operand…not a constructor — TypeError: x is not a constructor (JavaScript)not a constructorImplicit float to int — Deprecated: Implicit conversion from float 2.5 to int loses precision (PHP)Implicit float to i…TypeError arguments — TypeError: f() takes 1 positional argument but 2 were given (Python)TypeError argumentsConcurrentModificationException — java.util.ConcurrentModificationException (Java)ConcurrentModificat…RuntimeError dict — RuntimeError: dictionary changed size during iteration (Python)RuntimeError dictCollection was modified — InvalidOperationException: Collection was modified; enumeration operation may not execute (.NET)Collection was modi…

Directly related (12)

Unable to cast object of type.NET

System.InvalidCastException: Unable to cast object of type 'X' to type 'Y'

An explicit cast failed because the object’s runtime type isn’t the target type.

ClassCastExceptionJava

java.lang.ClassCastException: class A cannot be cast to class B

An object was cast to a type it isn’t.

ValueErrorPython

ValueError: invalid literal for int() with base 10: 'abc'

int() received a string that isn’t a whole number — empty, decimal, whitespace or text.

ERR_INVALID_ARG_TYPENode.js

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

A Node API got an argument of the wrong type — usually undefined because an env var or config value is missing.

AttributeErrorPython

AttributeError: 'X' object has no attribute 'y'

You accessed an attribute or method that doesn’t exist on that object type.

TypeError concatPython

TypeError: can only concatenate str (not "int") to str

You joined a string and a non-string with +.

Cannot convert value of typeiOS

Swift: Cannot convert value of type 'X' to expected argument type 'Y'

The value’s type doesn’t match what the function or property expects.

E0308Rust

Rust: error[E0308]: mismatched types — expected `X`, found `Y`

A value’s type doesn’t match what the context expects — common with &str vs String, Option/Result vs plain values, and integer ty…

TypeError not callablePython

TypeError: 'str' object is not callable

You used parentheses on something that isn’t a function — often a variable shadowing a built-in.

TS2322TypeScript

TS2322: Type 'X' is not assignable to type 'Y'

You assigned a value whose type doesn’t match the declared type of the variable, property or return value.

TS2564TypeScript

TS2564: Property 'x' has no initializer and is not definitely assigned in the constructor

With strictPropertyInitialization on, a class property declared without ? or a default isn’t set in the constructor.

unhashable typePython

TypeError: unhashable type: 'list'

A mutable object (list, dict, set) was used as a dict key or set member.

Two steps away (34)

IllegalArgumentExceptionJava

java.lang.IllegalArgumentException

A method rejected an argument value as invalid.

IllegalStateExceptionJava

java.lang.IllegalStateException

A method was called when the object wasn’t in the right state for it.

ArithmeticExceptionJava

java.lang.ArithmeticException: / by zero

Integer division or modulo by zero.

StringIndexOutOfBoundsExceptionJava

java.lang.StringIndexOutOfBoundsException: begin 0, end 10, length 5

substring()/charAt() used an index outside the string.

UnsupportedOperationExceptionJava

java.lang.UnsupportedOperationException (List.of / Arrays.asList is immutable)

Code tried to modify an immutable or fixed-size collection.

Stream closedJava

java.io.IOException: Stream closed

Code read or wrote a stream after it was closed — often by a try-with-resources block or a wrapper closing the underlying stream.

NumberFormatExceptionJava

java.lang.NumberFormatException: For input string: "x"

A string couldn’t be parsed as a number — it’s empty, has spaces/commas, is too large, or isn’t numeric.

DateTimeParseExceptionJava

java.time.format.DateTimeParseException: Text '31/12/2024' could not be parsed at index 2

A java.time parse call got text that doesn’t match the expected format.

Unparseable dateJava

java.text.ParseException: Unparseable date: "x"

SimpleDateFormat couldn’t parse the string with its pattern.

redirect_uri_mismatchAuthentication

OAuth Error: redirect_uri_mismatch

The redirect URI in your OAuth request doesn’t exactly match one registered for the client in the provider’s console.

divergent branchesGit

hint: You have divergent branches and need to specify how to reconcile them.

Git 2.27+ asks you to choose merge, rebase or fast-forward-only when local and remote both have new commits.

gpg failed to signGit

error: gpg failed to sign the data — fatal: failed to write commit object

Commit signing is enabled but GPG couldn’t sign — no TTY for the passphrase, wrong key, or agent not running.

TypeError: not a functionJavaScript

TypeError: x is not a function

You called something as a function, but its value is not a function (it’s undefined, a string, an object…).

ImportErrorPython

ImportError: cannot import name 'x' from 'y'

The module was found, but the name you’re importing from it doesn’t exist — usually a version change or a circular import.

KeyErrorPython

KeyError: 'x'

You accessed a dictionary key that doesn’t exist.

invalid string lengthJavaScript

RangeError: Invalid string length

A string grew beyond the engine’s maximum length — usually runaway concatenation or huge JSON.stringify output.

TS7016Node.js

TS7016: Could not find a declaration file for module 'x'. 'x.js' implicitly has an 'any' type.

The JavaScript package has no TypeScript types bundled and no @types package installed.

TS2304Node.js

TS2304: Cannot find name 'x'.

TypeScript doesn’t know an identifier — a missing import, missing type definitions (e.g. for Node or Jest globals), or a typo.

TS2339Node.js

TS2339: Property 'x' does not exist on type 'Y'.

TypeScript’s type for the object doesn’t include that property.

TS2345Node.js

TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'.

A value’s type doesn’t match the function parameter — commonly a possibly-undefined value passed where a definite one is required.

TypeErrorPHP

Fatal error: Uncaught TypeError: foo(): Argument #1 ($x) must be of type int, string given

A function received a value of the wrong type for a typed parameter.

Array to string conversionPHP

Warning: Array to string conversion

An array was used where a string is expected — echoing it, concatenating it, or passing it to a string function.

BucketAlreadyExistsAWS

BucketAlreadyExists: The requested bucket name is not available

S3 bucket names are global across all AWS accounts, and someone else already uses this one.

already exists in stackAWS

CloudFormation: Resource ... already exists (AlreadyExists / already exists in stack)

The template tries to create a resource with a fixed name that already exists — created manually, by another stack, or left over…

StorageAccountAlreadyTakenAzure

StorageAccountAlreadyTaken: The storage account named x is already taken

Storage account names are globally unique across Azure; another customer (or you elsewhere) already uses the name.

TS2532 / TS18048Node.js

TS18048: 'x' is possibly 'undefined'. (TS2532: Object is possibly 'undefined'.)

TypeScript requires you to handle the case where a value may be undefined before using it.

Cannot use object as arrayPHP

Fatal error: Uncaught Error: Cannot use object of type stdClass as array

Code used array syntax (`$x['key']`) on an object.

Unsupported operand typesPHP

Fatal error: Uncaught TypeError: Unsupported operand types: string + int

An arithmetic or array operator was used with incompatible types (PHP 8 is stricter than PHP 7).

not a constructorJavaScript

TypeError: x is not a constructor

new was used with something that isn’t a class/constructor — usually a wrong import.

Implicit float to intPHP

Deprecated: Implicit conversion from float 2.5 to int loses precision

PHP 8.1+ warns when a float with a fractional part is silently converted to int (array keys, % operator, int parameters).

TypeError argumentsPython

TypeError: f() takes 1 positional argument but 2 were given

A function was called with more positional arguments than it accepts — very often a method missing `self`.

ConcurrentModificationExceptionJava

java.util.ConcurrentModificationException

A collection was modified while being iterated (even in a single thread).

RuntimeError dictPython

RuntimeError: dictionary changed size during iteration

A dict (or set) was modified while being looped over.

Collection was modified.NET

InvalidOperationException: Collection was modified; enumeration operation may not execute

A list/dictionary was changed while a foreach loop was iterating it.