# File extension for OCR

**URL:** https://community.thunkable.com/t/file-extension-for-ocr/1131730
**Category:** Questions about Thunkable X
**Tags:** beginner, aia, help
**Created:** [February 28, 2021, 11:25am UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730 "2021-02-28T11:25:49Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [February 28, 2021, 11:25am UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/1 "2021-02-28T11:25:49Z")

</div>

I have been trying to make an OCR, so my app can read text and put the output in a list or label. When I try to do it, it tells me that it is unable to recognize the file type and the file extension. How do I solve that? Btw I made the OCR with the help of [Barcode Scanner - Round About Way using OCR](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962)  
I did not really understand what the stored object was and what it does either.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [February 28, 2021, 4:44pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/2 "2021-02-28T16:44:40Z")

</div>

Can you post a link to your project?

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 1, 2021, 9:14am UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/3 "2021-03-01T09:14:08Z")

</div>

here are the blocks I used:)  
i did the same thing as [Barcode Scanner - Round About Way using OCR](https://community.thunkable.com/t/barcode-scanner-round-about-way-using-ocr/60962)  
maybe the mistake is in the stored variable, i didn’t really understand that part

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/3/63ac394b247fa31d77dc66aaf2ffcc4a70b227e6.jpeg)

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 2, 2021, 12:04pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/4 "2021-03-02T12:04:04Z")

</div>

soo, were you able to find anything wrong with my blocks? I don’t think I can send the link for my project, because it contains the web API key and other information that I shouldn’t disclose.

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [March 3, 2021, 10:23pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/5 "2021-03-03T22:23:40Z")

</div>

Can you post the error message you’re getting?

Also, when you use a block with a green “error” block result, you should check the value of that block. When you preview your project, what are the values of the two green “error” blocks?

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 5, 2021, 5:40pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/6 "2021-03-05T17:40:51Z")

</div>

I changed the last part of my blocks and this is the error message that I’m getting.

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/6/16ae2fa4a37b974e0a938554e6c1b912dfab0f6e.jpeg)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/6/8649ae749936ccf7a44681829f5b8b313a4b4f4f.jpeg)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [March 5, 2021, 5:48pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/7 "2021-03-05T17:48:34Z")

</div>

~~I haven’t used that API but I’m guessing it might need the photo block, not the url. You may need to check the documentation for that.~~

Have you tested this with a mobile device?

@codeswept might have a better idea since they have worked on an OCR app

And just an aside since I changed the size of the image you posted to make it a bit smaller, you can do that with any image you paste/upload in the forums by adding a comma followed by a percentage after the resolution. For example, I added “,40%” to yours:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/8/a827b08937b976f4a7a3721ecafea0dc9c19c879.png)

See [this](https://community.thunkable.com/t/how-to-resize-images-on-the-forums/907937) for more info.

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 6, 2021, 2:27pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/8 "2021-03-06T14:27:47Z")

</div>

Yes, I have tested this on a mobile device. I got the error message after testing it on a mobile device. I have also messaged @codeswept and I am patiently waiting for an answer 🙂

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 6, 2021, 4:26pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/9 "2021-03-06T16:26:11Z")

</div>

In your block Web API URL you are adding the green block URL to the end of your URL.

Try adding the green block photo instead. It should work with the photo not the URL of the photo.

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 6, 2021, 6:41pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/10 "2021-03-06T18:41:38Z")

</div>

I have tried replacing the “url” block with the “photo” block from the “photo from camera” part, but it still does not seem to be working. I am getting the same error.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 6, 2021, 8:27pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/11 "2021-03-06T20:27:08Z")

</div>

Select a photo file from the gallery with different extension to use it as the input for the API. It could be the API is not recognising all image extensions.

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 7, 2021, 8:21pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/12 "2021-03-07T20:21:12Z")

</div>

Okay, I will try doing that! But how do I let it know that I want the words that it scanned to be outputted in a list or label?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 7, 2021, 8:29pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/13 "2021-03-07T20:29:51Z")

</div>

I tried this [Example API](https://api.ocr.space/parse/imageurl?apikey=helloworld&url=http://i.imgur.com/fwxooMv.png) and it is working fine and I got the following response

```
{"ParsedResults":[{"TextOverlay":{"Lines":[],"HasOverlay":false,"Message":"Text overlay is not provided as it is not requested"},"TextOrientation":"0","FileParseExitCode":1,"ParsedText":"GAVE AWAY MY BOOK\r\nFREE ON\r\nREACHED TOP OF AMAZON\r\nBESTSELLER\r\n","ErrorMessage":"","ErrorDetails":""}],"OCRExitCode":1,"IsErroredOnProcessing":false,"ProcessingTimeInMilliseconds":"359","SearchablePDFURL":"Searchable PDF not generated as it was not requested."}

```

Can you make sure you have the correct url in your blocks

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 7, 2021, 8:41pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/14 "2021-03-07T20:41:43Z")

</div>

Are you talking about the web API url?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 7, 2021, 8:52pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/15 "2021-03-07T20:52:38Z")

</div>

I am talking about the free version of the same API you are using.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 7, 2021, 8:56pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/16 "2021-03-07T20:56:50Z")

</div>

Just to explain more. This is the image I’m using [test image](https://i.imgur.com/fwxooMv.png) and in the response of the API you can see the following text `GAVE AWAY MY BOOK\r\nFREE ON\r\nREACHED TOP OF AMAZON\r\nBESTSELLER\r\n` which means that it is working fine

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 11, 2021, 5:12pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/18 "2021-03-11T17:12:43Z")

</div>

I think it’s kind of working, but this is the error message that I am getting now:  
“{“OCRExitCode”:3,“IsErroredOnProcessing”:true,“ErrorMessage”:[“File failed validation. File size exceeds the maximum size limit. Maximum size limit 1024 KB”],“ErrorDetails”:”",“ProcessingTimeInMilliseconds”:“31”}"

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 11, 2021, 5:28pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/19 "2021-03-11T17:28:28Z")

</div>

I have also checked the size of my image and it says that it is 926KB, which is less than 1024KB. So I don’t really know what the problem is.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [March 11, 2021, 6:10pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/20 "2021-03-11T18:10:17Z")

</div>

I can’t really provide any comments without testing the URL and image that you are using resulting in this error.

---

<div class="post-metadata">

### Author: ![aishat.yatarovarxr](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@aishat.yatarovarxr](https://community.thunkable.com/u/aishat.yatarovarxr)
#### Post date: [March 11, 2021, 6:22pm UTC](https://community.thunkable.com/t/file-extension-for-ocr/1131730/21 "2021-03-11T18:22:46Z")

</div>

Unfortunately, if I share the url, I would have to share my API key. Is there anything you think might be the problem? Maybe you could check your blocks with mine?

[Next page](https://community.thunkable.com/t/file-extension-for-ocr/1131730.md?page=2)
