Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weather.current.sky_text languages #13

Open
Fantantonio opened this issue Jul 20, 2021 · 5 comments
Open

weather.current.sky_text languages #13

Fantantonio opened this issue Jul 20, 2021 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Fantantonio
Copy link

Is it possible to change the sky_text language 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").text

A built in way to get directly the translated words would be much better

@null8626 null8626 added good first issue Good for newcomers enhancement New feature or request labels Jul 26, 2021
@Magnarks
Copy link

Is it possible to change the sky_text language 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").text

A built in way to get directly the translated words would be much better

Not work for me :(

@Fantantonio
Copy link
Author

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

@null8626
Copy link
Owner

@Magnarks that kind of problem should work by reinstalling googletrans with pip install googletrans==4.0.0-rc1

feel free to read this stackoverflow post: https://stackoverflow.com/questions/52455774/googletrans-stopped-working-with-error-nonetype-object-has-no-attribute-group

@Magnarks
Copy link

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-rc1

feel 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>

@Fantantonio
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants