UlionTse / translators

🌏🌍🌎Translators🌎🌍🌏 is a library that aims to bring free, multiple, enjoyable translations to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
https://pypi.org/project/translators/
GNU General Public License v3.0
1.62k stars 189 forks source link

[Bug]: the JSON object must be str, bytes or bytearray, not bool in yeekit translator #129

Open ali1hammoud opened 1 year ago

ali1hammoud commented 1 year ago

Debug Tips

What happened?

I wrote this code:

ts.translate_text('hello, how are you?', translator='yeekit', from_language='en', to_language='ar')

APP Version

5.7.1

Python Version

3.10

Runtime Environment

colab google

Country/Region

Russia

Relevant log output

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-25-651789a4e166> in <cell line: 1>()
----> 1 ts.translate_text('hello, how are you?', translator='yeekit', from_language='en', to_language='ar')

4 frames
/usr/lib/python3.10/json/__init__.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    337     else:
    338         if not isinstance(s, (bytes, bytearray)):
--> 339             raise TypeError(f'the JSON object must be str, bytes or bytearray, '
    340                             f'not {s.__class__.__name__}')
    341         s = s.decode(detect_encoding(s), 'surrogatepass')

TypeError: the JSON object must be str, bytes or bytearray, not bool

Screenshots

No response

Code of Conduct

UlionTse commented 1 year ago

Hello fiend, What is your Runtime Environment(Other)? yeekit origin server is bad, you can access web to test. Others questions, please upgrade v5.7.2

ali1hammoud commented 1 year ago

Hello, my RE is colab in all issues that I opened.

After updating to 5.7.6 I got: The function yeekit() has been not certified yet.

UlionTse commented 1 year ago

Hello friend! Although these functions are implemented, they have not passed the test due to various reasons, and they are in an unavailable status. This status is also marked on the README page.