Code Monkey home page Code Monkey logo

Comments (6)

ChenYuHo avatar ChenYuHo commented on June 16, 2024

@unrealkyuan
Hi,
I found it working normally.
What's the request body you sent that throws this error?

from handwriting.js.

unrealkyuan avatar unrealkyuan commented on June 16, 2024

@ChenYuHo I simply used the API request that you had already provided in handwriting.canvas.js. Not sure why it's not working for me?

from handwriting.js.

ChenYuHo avatar ChenYuHo commented on June 16, 2024

@unrealkyuan
it should be a POST request with the trace you want to recognize attached in the request body, so I asked what's the request body you sent.

from handwriting.js.

unrealkyuan avatar unrealkyuan commented on June 16, 2024

@ChenYuHo
By request body, do you just mean:

var data = JSON.stringify({
"options": "enable_pre_space",
"requests": [{
"writing_guide": {
"writing_area_width": options.width || this.width || undefined,
"writing_area_height": options.height || this.width || undefined
},
"ink": trace,
"language": options.language || "zh_TW"
}]
});

(sorry, I'm pretty new to using APIs so I apologize if I'm misinterpreting your question. I'm grateful for your patience)

from handwriting.js.

ChenYuHo avatar ChenYuHo commented on June 16, 2024

@unrealkyuan
yes, so what I'm asking is what's inside your "data" variable?
you can print it out.

from handwriting.js.

unrealkyuan avatar unrealkyuan commented on June 16, 2024

@ChenYuHo Nevermind, I realized my issue. I forgot to implement a button that would call handwriting.recognize(), so the program was basically just seeing the blank canvas and returning an error. Thanks for the help anyway!

from handwriting.js.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.