You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added the instructions for invoking the Github Action to my workflow, which is triggered by a workflow_dispatch. When I run the workflow it fails an error from main.py saying it can't find the key "name" in api_data_json. There is a line right above that error saying 401 Client Error: Unauthorized for url: https://api.openweathermap.org/data/2.5/weather?id=5506956&units=imperial&mod=json&appid=***%20 What this looks like to me is that a space is being appended to my api key which makes the api key incorrect and so the data being sent back isn't what the Action is expecting.
- name: Get Weather using OpenWeather
uses: bumb7ebee/[email protected]
with:
# OpenWeather API key
weather-api-key: ${{ secrets.WEATHER_API_KEY }}
# City ID obtained from OpenWeather
city-id: ${{ github.event.inputs.city-id }}
# Centigrade (c) or Fahrenheit (f)
units: f
# Country code obtained from https://flagicons.lipis.dev/
country-code: um
# README.md file path
readme-path: ./weather_report.md
This is how I invoke your Action in my workflow.
Attached is the logs associated with the error.
Steps to reproduce
Obtain a secret key form Open Weather and add it to your repository secrets in the Actions tab.
Create a workflow in .github/workflows giving it a name. Make sure the workflow is triggered by workflow_dispatch and give it an input with the name "city-id"
name: Get Weather Data
on:
workflow_dispatch:
inputs:
city-id:
required: true
description: Enter id of a U.S city (found on openweathermap.org)
Add the instructions for invoking the workflow
weather-action:
name: Get Weather Data
runs-on: ubuntu-latest
- name: Get Weather using OpenWeather
uses: bumb7ebee/[email protected]
with:
# OpenWeather API key
weather-api-key: ${{ secrets.WEATHER_API_KEY }}
# City ID obtained from OpenWeather
city-id: ${{ github.event.inputs.city-id }}
# Centigrade (c) or Fahrenheit (f)
units: f
# Country code obtained from https://flagicons.lipis.dev/
country-code: um
# README.md file path
readme-path: ./weather_report.md
Push the code to Github and then go to the Actions tab, select the new workflow, then click the Run workflow drop down.
Enter a city id and then click "run workflow"
The text was updated successfully, but these errors were encountered:
I added the instructions for invoking the Github Action to my workflow, which is triggered by a workflow_dispatch. When I run the workflow it fails an error from main.py saying it can't find the key "name" in api_data_json. There is a line right above that error saying
401 Client Error: Unauthorized for url: https://api.openweathermap.org/data/2.5/weather?id=5506956&units=imperial&mod=json&appid=***%20
What this looks like to me is that a space is being appended to my api key which makes the api key incorrect and so the data being sent back isn't what the Action is expecting.This is how I invoke your Action in my workflow.
Attached is the logs associated with the error.
![Screenshot 2024-09-09 090208](https://private-user-images.githubusercontent.com/37911691/365750910-324247b8-06dc-4ae6-a5c4-eec82b682269.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1MzE0MTgsIm5iZiI6MTczOTUzMTExOCwicGF0aCI6Ii8zNzkxMTY5MS8zNjU3NTA5MTAtMzI0MjQ3YjgtMDZkYy00YWU2LWE1YzQtZWVjODJiNjgyMjY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDExMDUxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJlZTJkZGZjM2RiZjI2NDdjZTY2OTQzZWMxNzM1ZjE1NTFiYTkyYjk5ODZmNjMwMzFlOWE3NmJkNzRmZDVjN2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.WhW2P_VgCI1M1PQqfTqPCXAoG-p4Q_JiTlNPQRssJHk)
Steps to reproduce
Obtain a secret key form Open Weather and add it to your repository secrets in the Actions tab.
Create a workflow in .github/workflows giving it a name. Make sure the workflow is triggered by workflow_dispatch and give it an input with the name "city-id"
Push the code to Github and then go to the Actions tab, select the new workflow, then click the Run workflow drop down.
Enter a city id and then click "run workflow"
The text was updated successfully, but these errors were encountered: