Giter VIP home page Giter VIP logo

gpyts's People

Contributors

ripeey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gpyts's Issues

aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL

A few days ago I already reported a bug and it was fixed. However I found a new bug at await gpyts.tts function.

aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://translate.google.com/translate_tts?q=Detected:+id%0ATranslated:+id%0ADetected:+en%0ATranslated:+id%0A%E2%96%88%E2%96%80%E2%96%80+%E2%96%88%E2%96%80%E2%96%80+%E2%96%80%E2%96%88%E2%96%80+%E2%96%80%E2%96%88%E2%96%80+%E2%96%88%E2%96%80%E2%96%80+%E2%96%88%E2%96%80%E2%96%88+%E2%96%88%E2%96%80%E2%96%88%0A%E2%96%88%E2%96%84%E2%96%88+%E2%96%88%E2%96%88%E2%96%84+%E2%96%91%E2%96%88%E2%96%91+%E2%96%91%E2%96%88%E2%96%91+%E2%96%88%E2%96%88%E2%96%84+%E2%96%88%E2%96%80%E2%96%84+%E2%96%88%E2%96%80%E2%96%84%0A%E2%94%8F%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81.%0A%E2%94%A3+pengguna+-+%E3%85%A4%0A%E2%94%A3+Id+-+5215824623%0A%E2%94%A3+Aplikasi+Heroku+-+znave%0A%E2%94%A3+Tumpukan+Heroku+-+Wadah%0A%E2%94%A3+Versi+Getter+-+0,8.7%0A%E2%94%A3+Versi+python+-+3.9.2%0A%E2%94%A3+Versi+Telethon+-+1.25.5%0A%E2%94%A3+Telegram+Layer+-+144%0A%E2%94%A3+Uptime+-+2m,+44s%0A%E2%94%A3+penangan+-.%0A%E2%94%A3+plugin+-+19%0A%E2%94%A3+perintah+-+145%0A%E2%94%A3+Penggunaan+-+.Help+%3Cplugin+name%3E%0A%E2%94%97%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81%E2%94%81.%0A~+Semua+plugin+dan+perintah+mereka:%0APercantik+%E2%80%A2+Obrolan+%E2%80%A2+Inti%0ADeepFry+%E2%80%A2+Dev+%E2%80%A2+Downloader%0AFakeaction+%E2%80%A2+Fun+%E2%80%A2+Global%0ABantuan+%E2%80%A2+Info+%E2%80%A2+sebutkan%0ATangkapan+layar+%E2%80%A2+Teks+%E2%80%A2+Terjemahkan%0APembaruan+%E2%80%A2+Penggunaan+%E2%80%A2+Utilitas%0AVctools%0AContoh:+Ketik.+Teks+Help+untuk+penggunaan.%0A(c)+@Kastaid&ie=UTF-8&hl=en&tl=id&client=dict-chrome-ex&ttsspeed=1.0&total=1&idx=0')

Details exception:

File "/data/data/com.termux/files/home/project/np/getter/getter/plugins/translate.py", line 134, in _
    voice = await gpyts.tts(text, lang = lang, slow = False, download = file,)
                  │     │   │            │                              └ 'downloads/voice.mp3'
                  │     │   │            └ 'id'
                  │     │   └ 'Detected: id\nTranslated: id\nDetected: en\nTranslated: id\n█▀▀ █▀▀ ▀█▀ ▀█▀ █▀▀ █▀█ █▀█\n█▄█ ██▄ ░█░ ░█░ ██▄ █▀▄ █▀▄\n┏━━━━━...
                  │     └ <function Gpyts.tts at 0x6fd8004d30>
                  └ <gpyts.asyncGpyts.Gpyts object at 0x6fd82c8c70>

  File "/root/.virtualenvs/venv/lib/python3.9/site-packages/gpyts/asyncGpyts/__init__.py", line 119, in tts
    result = await self.__request('https://{endpoint}{tld}/{method}'.format(
                   └ <gpyts.asyncGpyts.Gpyts object at 0x6fd82c8c70>
  File "/root/.virtualenvs/venv/lib/python3.9/site-packages/gpyts/asyncGpyts/__init__.py", line 220, in __request
    raise response.raise_for_status()

By the way I think you need to choose "he or iw" because the language code must without whitespace.

"Hebrew": "he or iw",

RuntimeError: There is no current event loop in thread 'MainThread'. Unclosed client session

Exception ignored in: <function Gpyts.del at 0x7f22e7ad9820>
Traceback (most recent call last):
File ".local/lib/python3.9/site-packages/gpyts/asyncGpyts/init.py", line 223, in del
File "/usr/lib/python3.9/asyncio/events.py", line 642, in get_event_loop
RuntimeError: There is no current event loop in thread 'MainThread'.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f22e7ad6be0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f22e795c100>, 43206.186707312)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f22e7ad6c40>

AttributeError: 'NoneType' object has no attribute 'close'

aiohttp 3.8.1

Exception ignored in: <function Gpyts.__del__ at 0x7cec195160>  
Traceback (most recent call last):
  File "/root/.virtualenvs/venv/lib/python3.9/site-packages/gpyts/
asyncGpyts/__init__.py", line 226, in __del__                     
loop.create_task(self.__aioses.close())                     
AttributeError: 'NoneType' object has no attribute 'close'

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.