GithubHelp home page GithubHelp logo

Comments (1)

hwonyo avatar hwonyo commented on June 23, 2024

일단 attributeError가 발생한다는 것은 어플리케이션이 5000 포트로 잘 열려있다는 뜻이네요

flask-clova 모듈은 지정된 형식의 json 값이 올 것을 기대합니다.
따라서 형식에 맞지 않은 json 값이 들어올 경우 500 에러가 발생하죠.
아래 post 보낼 형식을 첨부하겠습니다.
클로바 앱을 처음 호출할때 넘어오는 json 값입니다.
Basics를 따라하셨다면 "시작했습니다"라는 값이 포함된 json 데이터를 결과로 받으실거에요.

{
  "version": "0.1.0",
  "session": {
    "new": True,
    "sessionAttributes": {},
    "sessionId": "a29cfead-c5ba-474d-8745-6c1a6625f0c5",
    "user": {
      "userId": "V0qe",
      "accessToken": "XHapQasdfsdfFsdfasdflQQ7"
    }
  },
  "context": {
    "System": {
      "application": {
        "applicationId": "com.yourdomain.extension.fakebot"
      },
      "user": {
        "userId": "V0qe",
        "accessToken": "XHapQasdfsdfFsdfasdflQQ7"
      },
      "device": {
        "deviceId": "096e6b27-1717-33e9-b0a7-510a48658a9b",
        "display": {
          "size": "l100",
          "orientation": "landscape",
          "dpi": 96,
          "contentLayer": {
            "width": 640,
            "height": 360
          }
        }
      }
    }
  },
  "request": {
    "type": "LaunchRequest"
  }
}

json 데이터 형식에 대한 설명은 CEK API 레버런스를 참고하면 더 자세히 알 수 있습니다.
혹은 flask-clova 모듈의 tests/test_sample.py 에 있는 테스트 코드를 참고하셔도 도움이 될거에요 :)

from flask-clova.

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.