Repository navigation
weather.current.sky_text languages #13
Description
Activity
- addedgood first issueGood for newcomersGood for newcomersenhancementNew feature or requestNew feature or request
on Jul 26, 2021 Is it possible to change the
sky_textlanguage output?
I was thinking that maybe is a feature of the API the library is utilizing and could be a great improvement if not yet implemented.As for now I am translating to italian the result with "googletrans":
from googletrans import Translator ... translator = Translator() translator.translate(weather.current.sky_text, dest="it", src="en").textA built in way to get directly the translated words would be much better
Not work for me :(
Not work for me :(
At least explain what the problem is...
If it's something due to googletrans package you should open an issue on that repo@Magnarks that kind of problem should work by reinstalling googletrans with
pip install googletrans==4.0.0-rc1feel free to read this stackoverflow post: https://stackoverflow.com/questions/52455774/googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group
Not work for me :(
At least explain what the problem is...
If it's something due to googletrans package you should open an issue on that repo@Magnarks that kind of problem should work by reinstalling googletrans with
pip install googletrans==4.0.0-rc1feel free to read this stackoverflow post: https://stackoverflow.com/questions/52455774/googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group
Ok i try install again googletrans but i have the same problem, is this
Traceback (most recent call last):
File "c:\Users\diego\Documents\Python\AsistentedeVoz.py", line 188, in
bucle.run_until_complete(Clima())
File "C:\Users\diego\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "c:\Users\diego\Documents\Python\AsistentedeVoz.py", line 100, in Clima
traducir.translate(text=clima.current.sky_text, dest="es", src="en").text
File "C:\Users\diego\AppData\Local\Programs\Python\Python39\lib\site-packages\googletrans\client.py", line 222, in translate
translated_parts = list(map(lambda part: TranslatedPart(part[0], part[1] if len(part) >= 2 else []), parsed[1][0][0][5]))
TypeError: 'NoneType' object is not iterable
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x000001767953A1F0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x0000017678EF0760>, 186910.015)]']
connector: <aiohttp.connector.TCPConnector object at 0x000001767953A460>It may be related to this issue: ssut/py-googletrans#278
This is something you should ask in the relative GitHub repo! You'll have replies from people that work on that package and you would help them to make it better.
Is it possible to change the
sky_textlanguage output?I was thinking that maybe is a feature of the API the library is utilizing and could be a great improvement if not yet implemented.
As for now I am translating to italian the result with "googletrans":
A built in way to get directly the translated words would be much better