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

when passing in to the function different locations nothing returns. #22

Closed
1 task
kroboo opened this issue Jul 18, 2022 · 5 comments
Closed
1 task
Labels
duplicate This issue or pull request already exists

Comments

@kroboo
Copy link

kroboo commented Jul 18, 2022

i ve been trying to make a weather function for my discord application using python weather but every time i pass a different city other than : "Bucharest" or "Washington DC" . The following comes up.
image
i ve tried looking up the errors and nothing seems to work really. i dont know if this is an actual bug or me just being dump.
for reference this is the script i wrote:

import python_weather
import asyncio
class WeatherFunc:
    def __init__(self,location):
        self.client = python_weather.Client(format=python_weather.METRIC)
        self.location = location


    async def on_call(self):
        weather = await self.client.find(self.location)
        print(weather.current.temperature)



        await self.client.close()
object1  = WeatherFunc("Sofia")
if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(object1.on_call())

if by any chance i am wrong sorry for addressing my issue and please tell me what i should change.

@kroboo
Copy link
Author

kroboo commented Jul 18, 2022

@null8626

@null8626
Copy link
Owner

I'll look into it in a while! Thanks for the report.

@null8626 null8626 added the bug Something isn't working label Jul 19, 2022
@kroboo
Copy link
Author

kroboo commented Jul 19, 2022

@null8626 Thank you as well for responding ! notify me when you resolve the bug.All the best regards!

@null8626
Copy link
Owner

<3

@null8626
Copy link
Owner

This issue seems to be related to #25. Closing, sorry!

@null8626 null8626 added duplicate This issue or pull request already exists and removed bug Something isn't working labels Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants