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]: Expecting value: line 1 column 1 (char 0) in tilde, sysTran and volcEngine translators #128

Open ali1hammoud opened 1 year ago

ali1hammoud commented 1 year ago

Debug Tips

What happened?

I wrote these code: ts.translate_text('hello, how are you?', translator='sysTran', from_language='en', to_language='ar')

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

ts.translate_text('hello, how are you?', translator='volcEngine', 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

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/requests/models.py in json(self, **kwargs)
    970         try:
--> 971             return complexjson.loads(self.text, **kwargs)
    972         except JSONDecodeError as e:

8 frames
JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

JSONDecodeError                           Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/requests/models.py in json(self, **kwargs)
    973             # Catch JSON-related errors and raise as requests.JSONDecodeError
    974             # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 975             raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
    976 
    977     @property

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Screenshots

No response

Code of Conduct

UlionTse commented 1 year ago

Hello fiend, What is your Runtime Environment(Other)? Others questions, please upgrade v5.7.2

translators_issues125
ali1hammoud commented 1 year ago

After updating to 5.7.6 translator='sysTran' is working now.

but the another translators: The function tilde() has been not certified yet. The function volcEngine() 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.