{"id":20576,"date":"2020-07-30T23:08:52","date_gmt":"2020-07-31T06:08:52","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=20576"},"modified":"2023-12-01T03:57:11","modified_gmt":"2023-12-01T11:57:11","slug":"python-typeerror-a-bytes-like-object-is-required","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/","title":{"rendered":"Python typeerror: a bytes-like object is required, not \u2018str\u2019 Solution"},"content":{"rendered":"\n<p>TypeErrors happen all of the time in <a href=\"https:\/\/careerkarma.com\/blog\/python-projects-beginners\/\">Python<\/a>. This type of error is raised when you try to apply a function to a value that does not support that function. For example, trying to iterate over a number raises a TypeError because you cannot iterate over a number.<br><\/p>\n\n\n\n<p>In this guide, we\u2019re going to talk about how to solve the \u201ctypeerror: a bytes-like object is required, not \u2018str\u2019\u201d error. We\u2019ll walk through what this error means and why it is raised. We\u2019ll also go through a solution to help you overcome this error. Let\u2019s begin!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Problem: typeerror: a bytes-like object is required, not \u2018str\u2019<\/h2>\n\n\n\n<p>Let\u2019s start by analyzing our error message:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>typeerror: a bytes-like object is required, not 'str'<\/pre><\/div>\n\n\n\n<p>This error message gives us two vital pieces of information. TypeError tells us that we\u2019re applying a function to a value of the wrong type.<br><\/p>\n\n\n\n<p>The error message tells us that we\u2019re treating a value like a <a href=\"https:\/\/careerkarma.com\/blog\/python-string-methods\/\">string<\/a> rather than a bytes-like object. Bytes-like objects are objects that are stored using the bytes data type. Bytes-like objects are not strings and so they cannot be manipulated like a string.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Practice Scenario<\/h2>\n\n\n\n<p>This error is commonly raised when you open a file as a binary file instead of as a <a href=\"https:\/\/careerkarma.com\/blog\/python-read-file\/\">text file<\/a>.<br><\/p>\n\n\n\n<p>There\u2019s no better way to solve an error than to walk through an example of a code snippet with that error. Below is a program that replicates this error:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>with open(&quot;recipes.txt&quot;, &quot;rb&quot;) as file:\n\trecipes = file.readlines()\n\nfor r in recipes:\n\tif &quot;Chocolate&quot; in r:\n\t\tprint(r)<\/pre><\/div>\n\n\n\n<p>This code snippet opens up the file \u201crecipes.txt\u201d and reads its contents into a <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">variable<\/a> called \u201crecipes\u201d.<br><\/p>\n\n\n\n<p>The \u201crecipes\u201d variable stores an iterable object consisting of each line that is in the \u201crecipes.txt\u201d file. Next, we use a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">for loop<\/a> to iterate over each recipe in the list.<br><\/p>\n\n\n\n<p>In the for loop, we check if each line contains \u201cChocolate\u201d. If a line contains the word \u201cChocolate\u201d, that line is printed to the console. Otherwise, nothing happens.<br><\/p>\n\n\n\n<p>Let\u2019s run our code and see what happens:<\/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\tif &quot;Chocolate&quot; in r:\nTypeError: a bytes-like object is required, not 'str'<\/pre><\/div>\n\n\n\n<p>An error has been raised!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>The error \u201ca bytes-like object is required, not \u2018str\u2019\u201d tells us that we\u2019ve tried to access an object as if it were a string when we should be accessing it as if it were a list of bytes.<br><\/p>\n\n\n\n<p>The cause of this error is that we\u2019ve opened our file \u201crecipes.txt\u201d as a binary:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>with open(&quot;recipes.txt&quot;, &quot;rb&quot;) as file:<\/pre><\/div>\n\n\n\n<p>Binary files are not treated as lines of text. Instead, they are treated as a series of bytes. This means that when we try to check if \u201cChocolate\u201d is in each line in the file, an error is raised. Python doesn&#8217;t know how to check for a string in a bytes object.<br><\/p>\n\n\n\n<p>We can solve this error by opening our file in read mode instead of binary read mode:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>with open(&quot;recipes.txt&quot;, &quot;r&quot;) as file:<\/pre><\/div>\n\n\n\n<p>Read mode is used to read text files. Binary read mode is used to read binary files. We\u2019ve removed the \u201cb\u201d from the mode parameter to read our file in read mode. Let\u2019s try to run our code again:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Chocolate Fudge Cake\nChocolate Chip Cookie\nChocolate Square<\/pre><\/div>\n\n\n\n<p>Our code works! Now that our file is read using read mode, our code can perform an \u201cif&#8230;in\u201d comparison to check if \u201cChocolate\u201d is in each line in the \u201crecipes.txt\u201d file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bytes-Like Object Similar Error<\/h2>\n\n\n\n<p>The error we have been discussing is similar to the error \u201cTypeError: X first arg must be bytes or a tuple of bytes, not str\u201d.<br><\/p>\n\n\n\n<p>You may encounter this error if you try to use a string method on a list of bytes. To solve this error, you can use the same approach that we used to solve the last error. Make sure that you open up any text files in text read mode instead of binary read mode.<\/p>\n\n\n\n<iframe loading=\"lazy\" frameborder=\"0\" width=\"100%\" height=\"400px\" src=\"https:\/\/repl.it\/@careerkarma\/a-bytes-like-object-is-required-not-str?lite=true\"><\/iframe>\n<br>\n<br>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The error \u201ctypeerror: a bytes-like object is required, not \u2018str\u2019\u201d is raised when you treat an object as a string instead of as a series of bytes. A common scenario in which this error is raised is when you read a text file as a binary.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to solve the bytes-like object error like a Python pro!<\/p>\n","protected":false},"excerpt":{"rendered":"TypeErrors happen all of the time in Python. This type of error is raised when you try to apply a function to a value that does not support that function. For example, trying to iterate over a number raises a TypeError because you cannot iterate over a number. In this guide, we\u2019re going to talk&hellip;","protected":false},"author":240,"featured_media":18674,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-20576","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: a bytes-like object is required, not \u2018str\u2019 | Career Karma<\/title>\n<meta name=\"description\" content=\"The Python typeerror: a bytes-like object is required, not \u2018str\u2019 error is raised when you perform a string operation on a bytes object. On Career Karma, learn how to fix this 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-a-bytes-like-object-is-required\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python typeerror: a bytes-like object is required, not \u2018str\u2019 Solution\" \/>\n<meta property=\"og:description\" content=\"The Python typeerror: a bytes-like object is required, not \u2018str\u2019 error is raised when you perform a string operation on a bytes object. On Career Karma, learn how to fix this error.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/\" \/>\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-07-31T06:08:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:57:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"679\" \/>\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=\"4 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-a-bytes-like-object-is-required\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python typeerror: a bytes-like object is required, not \u2018str\u2019 Solution\",\"datePublished\":\"2020-07-31T06:08:52+00:00\",\"dateModified\":\"2023-12-01T11:57:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/\"},\"wordCount\":689,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/\",\"name\":\"Python typeerror: a bytes-like object is required, not \u2018str\u2019 | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg\",\"datePublished\":\"2020-07-31T06:08:52+00:00\",\"dateModified\":\"2023-12-01T11:57:11+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The Python typeerror: a bytes-like object is required, not \u2018str\u2019 error is raised when you perform a string operation on a bytes object. On Career Karma, learn how to fix this error.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg\",\"width\":1020,\"height\":679},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#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: a bytes-like object is required, not \u2018str\u2019 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: a bytes-like object is required, not \u2018str\u2019 | Career Karma","description":"The Python typeerror: a bytes-like object is required, not \u2018str\u2019 error is raised when you perform a string operation on a bytes object. On Career Karma, learn how to fix this 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-a-bytes-like-object-is-required\/","og_locale":"en_US","og_type":"article","og_title":"Python typeerror: a bytes-like object is required, not \u2018str\u2019 Solution","og_description":"The Python typeerror: a bytes-like object is required, not \u2018str\u2019 error is raised when you perform a string operation on a bytes object. On Career Karma, learn how to fix this error.","og_url":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-31T06:08:52+00:00","article_modified_time":"2023-12-01T11:57:11+00:00","og_image":[{"width":1020,"height":679,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-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":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python typeerror: a bytes-like object is required, not \u2018str\u2019 Solution","datePublished":"2020-07-31T06:08:52+00:00","dateModified":"2023-12-01T11:57:11+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/"},"wordCount":689,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/","url":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/","name":"Python typeerror: a bytes-like object is required, not \u2018str\u2019 | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg","datePublished":"2020-07-31T06:08:52+00:00","dateModified":"2023-12-01T11:57:11+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The Python typeerror: a bytes-like object is required, not \u2018str\u2019 error is raised when you perform a string operation on a bytes object. On Career Karma, learn how to fix this error.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/06\/mark-s-TkEPQPWr2sY-unsplash.jpg","width":1020,"height":679},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-typeerror-a-bytes-like-object-is-required\/#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: a bytes-like object is required, not \u2018str\u2019 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\/20576","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=20576"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20576\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/18674"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=20576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=20576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=20576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}