{"id":21082,"date":"2020-08-12T11:04:44","date_gmt":"2020-08-12T18:04:44","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=21082"},"modified":"2023-12-01T03:57:45","modified_gmt":"2023-12-01T11:57:45","slug":"python-typeerror-str-object-is-not-callable","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/","title":{"rendered":"Python typeerror: \u2018str\u2019 object is not callable Solution"},"content":{"rendered":"\n<p>Mistakes are easily made when you are naming variables. One of the more common mistakes is calling a variable \u201cstr\u201d. If you try to use the <a href=\"https:\/\/careerkarma.com\/blog\/python-vs-java\/\">Python<\/a> method with the same name in your program,&nbsp; \u201ctypeerror: \u2018str\u2019 object is not callable\u201d is returned.<br><\/p>\n\n\n\n<p>In this guide, we talk about what the Python error means and why it is raised. We walk through two examples of this error in action so you learn how to solve it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem: typeerror: \u2018str\u2019 object is not callable<\/h2>\n\n\n\n<p>Our error message is a TypeError. This tells us we&#8217;re trying to execute an operation on a value whose data type does not support that specific operation.<br><\/p>\n\n\n\n<p>Take a look at the rest of our error message:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>typeerror: 'str' object is not callable<\/pre><\/div>\n\n\n\n<p>When you try to call a <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">string<\/a> like you would a function, an error is returned. This is because strings are not functions. To call a function, you add () to the end of a function name.<br><\/p>\n\n\n\n<p>This error commonly occurs when you assign a variable called \u201cstr\u201d and then try to use the <code>str()<\/code> function. Python interprets \u201cstr\u201d as a string and you cannot use the <code>str()<\/code> function in your program.<br><\/p>\n\n\n\n<p>Let\u2019s take a look at two example scenarios where this error has occurred.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example Scenario: Declaring a Variable Called \u201cstr\u201d<\/h2>\n\n\n\n<p>We write a program that calculates how many years a child has until they turn 18. We then print this value to the console.<br><\/p>\n\n\n\n<p>Let\u2019s start by collecting the current age of the young person by using an <a href=\"https:\/\/careerkarma.com\/blog\/python-input\/\">input() statement<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>str = input(&quot;What is your age? &quot;)<\/pre><\/div>\n\n\n\n<p>Next, we calculate how many years a young person has left until they turn 18. We do this by subtracting the value a user has given our program from 18:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>years_left = 18 - int(str) <\/pre><\/div>\n\n\n\n<p>We use the <code>int()<\/code> method to convert the age integer. This allows us to subtract the user&#8217;s age from 18.<br><\/p>\n\n\n\n<p>Next, we convert this value to a string and print it to the console. We convert the value to a string because we need to concatenate it into a string. To do so, all values must be formatted as a string.<br><\/p>\n\n\n\n<p>Let\u2019s convert the value of \u201cyears_left\u201d and print it to the console:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>years_left = str(years_left)\nprint(&quot;You have &quot; + years_left + &quot; years left until you turn 18.&quot;)<\/pre><\/div>\n\n\n\n<p>This code prints out a message informing us of how many years a user has left until they turn 18. Run our code and see what happens:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>What is your age? 7\nTraceback (most recent call last):\n  File &quot;main.py&quot;, line 5, in &lt;module&gt;\n\tyears_left = str(years_left)\nTypeError: 'str' object is not callable<\/pre><\/div>\n\n\n\n<p>Our code returns an error. We have tried to use the <code>str()<\/code> method to convert the value of \u201cyears_left\u201d. Earlier in our program, we declared a <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">variable<\/a> called \u201cstr\u201d. Python thinks \u201cstr\u201d is a string in our program, not a function.<br><\/p>\n\n\n\n<p>To solve this error, we rename the variable \u201cstr\u201d to \u201cage\u201d:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>age = input(&quot;What is your age? &quot;)\nyears_left = 18 - int(age) \nyears_left = str(years_left)\nprint(&quot;You have &quot; + years_left + &quot; years left until you turn 18.&quot;)<\/pre><\/div>\n\n\n\n<p>As we have renamed our variable, Python will use the <code>str()<\/code> function when we call it. There is no longer a variable occupying that name. Let\u2019s run our code again:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>What is your age? 7\nYou have 11 years left until you turn 18.<\/pre><\/div>\n\n\n\n<p>Our code successfully calculates how many years a young person has left until they turn 18.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example Scenario: String Formatting Using %<\/h2>\n\n\n\n<p>This error is also caused by a mistake in <a href=\"https:\/\/careerkarma.com\/blog\/python-f-string\/\">string formatting<\/a>.<br><\/p>\n\n\n\n<p>Let&#8217;s add a few new features to our last program. First, we ask a user for their name. Second, we\u2019re going to craft the message that tells a user how many years they have left until they turn 18 using the % formatting syntax.<br><\/p>\n\n\n\n<p>Begin by asking a user for their name:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>name = input(&quot;What is your name? &quot;)<\/pre><\/div>\n\n\n\n<p>Next, we revise our <code>print()<\/code> statement to use the % string formatting syntax. We do this because the % syntax is easier to read when formatting multiple values into a string. Here is the code we use to format the message we will show a user:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;%s, you have %s years left until you turn 18.&quot;(name, age))<\/pre><\/div>\n\n\n\n<p>Our final program looks like this:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>name = input(&quot;What is your name? &quot;)\nage = input(&quot;What is your age? &quot;)\n\nyears_left = 18 - int(age) \nyears_left = str(years_left)\n\nprint(&quot;%s, you have %s years left until you turn 18.&quot;(name, age))<\/pre><\/div>\n\n\n\n<p>Our code replaces the string type %s symbol with the values \u201cname\u201d and \u201cage\u201d, respectively. Let\u2019s run our code and see what happens:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Traceback (most recent call last):\n  File &quot;main.py&quot;, line 7, in &lt;module&gt;\n\tprint(&quot;%s, you have %s years left until you turn 18.&quot;(name, age))\nTypeError: 'str' object is not callable<\/pre><\/div>\n\n\n\n<p>Our code returns an error because we have forgotten to use the % operator to separate our string and the values we want to add to our string.<br><\/p>\n\n\n\n<p>Our code thinks we are trying to call \u201c%s, you have %s years left until you turn 18.\u201d as a function because the string is followed by parenthesis.<br><\/p>\n\n\n\n<p>To solve this error, we add a percentage sign between \u201c%s, you have %s years left until you turn 18.\u201d and (name, age) in our code:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>print(&quot;%s, you have %s years left until you turn 18.&quot; % (name, age))\n\nThis revision fixes the error:\nWhat is your name? Alex\nWhat is your age? 7\nAlex, you have 11 years left until you turn 18.<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><\/h2>\n\n\n\n<iframe loading=\"lazy\" frameborder=\"0\" width=\"100%\" height=\"400px\" src=\"https:\/\/repl.it\/@careerkarma\/str-object-is-not-callable?lite=true\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The \u201ctypeerror: \u2018str\u2019 object is not callable\u201d error is raised when you try to call a string as a function. To solve this error, make sure you do not use \u201cstr\u201d as a variable name.<br><\/p>\n\n\n\n<p>If this does not solve the problem, check if you use the % operator to format strings. A % sign should appear between a string and the values into which you want to add to a string.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to solve this common Python error like a pro!<\/p>\n","protected":false},"excerpt":{"rendered":"Mistakes are easily made when you are naming variables. One of the more common mistakes is calling a variable \u201cstr\u201d. If you try to use the Python method with the same name in your program,&nbsp; \u201ctypeerror: \u2018str\u2019 object is not callable\u201d is returned. In this guide, we talk about what the Python error means and&hellip;","protected":false},"author":240,"featured_media":18099,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-21082","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Python","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python typeerror: \u2018str\u2019 object is not callable Solution | Career Karma<\/title>\n<meta name=\"description\" content=\"On Career Karma, learn about the Python typeerror: \u2018str\u2019 object is not callable error, how the error works, and how to solve the error.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python typeerror: \u2018str\u2019 object is not callable Solution\" \/>\n<meta property=\"og:description\" content=\"On Career Karma, learn about the Python typeerror: \u2018str\u2019 object is not callable error, how the error works, and how to solve the error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-12T18:04:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:57:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"681\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python typeerror: \u2018str\u2019 object is not callable Solution\",\"datePublished\":\"2020-08-12T18:04:44+00:00\",\"dateModified\":\"2023-12-01T11:57:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/\"},\"wordCount\":790,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/\",\"name\":\"Python typeerror: \u2018str\u2019 object is not callable Solution | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg\",\"datePublished\":\"2020-08-12T18:04:44+00:00\",\"dateModified\":\"2023-12-01T11:57:45+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"On Career Karma, learn about the Python typeerror: \u2018str\u2019 object is not callable error, how the error works, and how to solve the error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg\",\"width\":1020,\"height\":681},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/careerkarma.com\/blog\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python typeerror: \u2018str\u2019 object is not callable Solution\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python typeerror: \u2018str\u2019 object is not callable Solution | Career Karma","description":"On Career Karma, learn about the Python typeerror: \u2018str\u2019 object is not callable error, how the error works, and how to solve the error.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/","og_locale":"en_US","og_type":"article","og_title":"Python typeerror: \u2018str\u2019 object is not callable Solution","og_description":"On Career Karma, learn about the Python typeerror: \u2018str\u2019 object is not callable error, how the error works, and how to solve the error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-08-12T18:04:44+00:00","article_modified_time":"2023-12-01T11:57:45+00:00","og_image":[{"width":1020,"height":681,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python typeerror: \u2018str\u2019 object is not callable Solution","datePublished":"2020-08-12T18:04:44+00:00","dateModified":"2023-12-01T11:57:45+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/"},"wordCount":790,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/","name":"Python typeerror: \u2018str\u2019 object is not callable Solution | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg","datePublished":"2020-08-12T18:04:44+00:00","dateModified":"2023-12-01T11:57:45+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"On Career Karma, learn about the Python typeerror: \u2018str\u2019 object is not callable error, how the error works, and how to solve the error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/ilya-pavlov-OqtafYT5kTw-unsplash.jpg","width":1020,"height":681},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-str-object-is-not-callable\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/careerkarma.com\/blog\/python\/"},{"@type":"ListItem","position":3,"name":"Python typeerror: \u2018str\u2019 object is not callable Solution"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=21082"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/21082\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/18099"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=21082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=21082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=21082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}