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

fix: cast port to int #6643

Merged
merged 1 commit into from
Jan 12, 2024
Merged

fix: cast port to int #6643

merged 1 commit into from
Jan 12, 2024

Conversation

orarbel
Copy link
Contributor

@orarbel orarbel commented Dec 31, 2023

Background

When executing port = os.getenv("PORT", 8000) if the port is being fetched from a .env file it is fetched as a string.

This causes an error: TypeError: 'str' object cannot be interpreted as an integer

Changes 🏗️

The port is casted to int before passed to uvicorn

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

When executing `port = os.getenv("PORT", 8000)` if the port is being fetched from a `.env` file it is fetched as a string.

This causes an error: `TypeError: 'str' object cannot be interpreted as an integer`
@orarbel orarbel requested a review from Swiftyos as a code owner December 31, 2023 12:51
Copy link

netlify bot commented Dec 31, 2023

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit 99835b0
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/659163e32732390008d255b7
😎 Deploy Preview https://deploy-preview-6643--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@Swiftyos Swiftyos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thank you

@Pwuts Pwuts merged commit 48a2186 into Significant-Gravitas:master Jan 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants