Skip to content

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed #46

@mfaas89

Description

@mfaas89

Hey, I am creating a project with ionic and vuejs and I get the following error with strict mode:

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them
at get arguments ()
at errorHandler.invokeGetter (:3:28)

Any idea on how to fix this?

import scribe from 'scribe.js-ocr';

const recognizeText = async (event: Event) => {
    const file = event.target?.files[0];

    (async () => {
        scribe.extractText(['https://tesseract.projectnaptha.com/img/eng_bw.png'])
            .then((res) => console.log(res));

        await scribe.terminate();
    })();
};
Image
opentype.js:211 Uncaught (in promise) Error: Unsupported OpenType signature <!DO
    at Object.Bn [as parse] (opentype.js:211:15)
    at loadOpentype (fontContainer.js:47:86)
    at fontContainer.js:202:5
    at new Promise (<anonymous>)
    at loadType (fontContainer.js:196:37)
    at loadFontContainerFamily (fontContainer.js:208:23)
    at loadFontsFromSource (fontContainer.js:222:30)
    at loadBuiltInFontsRaw (fontContainerMain.js:168:72)
    at async Promise.all (index 3)
    at async init (scribe.js:78:3)

Even when turning strict mode off it throws the error.

const signature = parse.getTag(data, 0); returns an html error I can' t see.

I just used a simple png file and your example.

When I remove the font: true option I get "No PDF or image data found to recognize." .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions