Git Product home page Git Product logo

pypapago's Issues

KeyError: 'translatedText'

I have this problem:
Traceback (most recent call last):
File "sub.py", line 1624, in
result = translator.translate(i.content, source='en', target='vi',)
File "C:\Python38\lib\site-packages\pypapago\translator.py", line 60, in translate
return response.json()['translatedText']
KeyError: 'translatedText'

How to fix it?

base64 λ””μ½”λ”©

μ•ˆλ…•ν•˜μ„Έμš”?

파파고 dataλ₯Ό λΆ„μ„ν•˜λŠ” 글을 λ³΄μ•˜λŠ”λ°μš”, μ œκ°€ ν•΄λ³΄λ‹ˆ μ§€κΈˆ 파파고 μ‚¬μ΄νŠΈμ—μ„œμ˜ μš”μ²­ dataκ°€ λ³€κ²½λœ 것 κ°™μ•„μš”.
ν˜Ήμ‹œ 확인 κ°€λŠ₯ν•˜μ‹ κ°€μš”?

KeyError Issue

νŒŒνŒŒκ³ μ—μ„œ μž…λ ₯λ˜μ§€ μ•Šμ€ 단어λ₯Ό μ“°λ©΄ KeyErrorκ°€ λ‚˜μ˜€λŠ”λ°μš”.
translator.py에 μžˆλŠ” μ½”λ“œλ₯Ό λ³΄λ‹ˆ 살짝 λ¬Έμ œκ°€ μžˆλŠ” 것 κ°™μ•„μ„œ 말씀 λ“œλ¦½λ‹ˆλ‹€.

59쀄뢀터 μ΄λ ‡κ²Œ μ“°μ‹œλ©΄ 될 것 κ°™μŠ΅λ‹ˆλ‹€.

 if not verbose:
            if 'translatedText' in response.json():
                return response.json()['translatedText']
            else:
                return ''

invalid access issue

Hi,
When using the module today, this response message came out (after switching to verbose mode):

{'code': '00001', 'message': 'μ˜¬λ°”λ₯Έ 접근이 μ•„λ‹™λ‹ˆλ‹€.', 'displayMessage': 'μΌμ‹œμ μΈ 였λ₯˜λ‘œ μ„œλΉ„μŠ€λ₯Ό μ΄μš©ν•  수 μ—†μŠ΅λ‹ˆλ‹€.\nμž μ‹œ ν›„ λ‹€μ‹œ μ‹œλ„ν•΄μ£Όμ„Έμš”.'}

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.