I am trying to run my code on the bash console, but when I enter "python3 main.py" on the first line, I press enter and nothing happens. I also tried to run it and the console closes.
I am trying to run my code on the bash console, but when I enter "python3 main.py" on the first line, I press enter and nothing happens. I also tried to run it and the console closes.
Could you show the exact command that you execute in the console? What is your script doing? Is it printing anything? If not, you may not see anything in the output.
I am trying to run my code on the bash console, but when I enter "python3 main.py" on the first line, I press enter and nothing happens. It's look like
06:37 ~ $ python3 main.py
06:38 ~ $
I also tried to run it and the console closes and shows something
>>>
What is your script doing? Is it printing anything?
I am having the same issue, nothing runs. 00:25 ~ $ python3 main.py 00:25 ~ $ Is there a different way to run?
@andrealimon07 What is your script doing? Is it printing anything? It looks like it's running happy, just there is no output there.
same issue in my case as well
import requests import datetime from twilio.rest import Client
LAT = 28.705410 LONG = -100.514618 api_key = "f7ca9b7793d73c1663b03f0eddbc3f16" account_sid = "AC6f7683e80b8777a68f2a31fb09e3610e" auth_token = "0266a2b6a13d3fc6f7f3745228adee9c"
parameters = { "lat": LAT, "lon": LONG, "appid": api_key, "exclude": "current,minutely,daily" } response = requests.get("https://api.openweathermap.org/data/3.0/onecall", params=parameters) response.raise_for_status() data = response.json()
now = datetime.datetime.now() now_hour = now.hour
will_rain = False
now_plus_1 = [now_hour + element for element in range(13)] next_12_hours = [] for each in now_plus_1: if each >= 24: each -= 24 next_12_hours.append(each)
for each_hour in next_12_hours: if data["hourly"][each_hour]["weather"][0]["id"] < 700: will_rain = True
if will_rain: client = Client(account_sid, auth_token) message = client.messages.create( body="It's going to rain today. Remember to bring an ☔ ", from_='+18669819036', to='+16465772724' ) print(message.sid)
@aryskeldi What is the error you get?