Giter Club home page Giter Club logo

Comments (5)

Magnarks avatar Magnarks commented on May 30, 2024

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 :(

from python-weather.

Fantantonio avatar Fantantonio commented on May 30, 2024

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

from python-weather.

null8626 avatar null8626 commented on May 30, 2024

@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

from python-weather.

Magnarks avatar Magnarks commented on May 30, 2024

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>

from python-weather.

Fantantonio avatar Fantantonio commented on May 30, 2024

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.

from python-weather.

Related Issues (20)

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.