mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(forge): cast port to int (#6643)
When executing `port = os.getenv("PORT", 8000)` if the port is being fetched from a `.env` file it is fetched as a string.
This caused an error: `TypeError: 'str' object cannot be interpreted as an integer`
This commit is contained in:
@@ -41,5 +41,5 @@ if __name__ == "__main__":
|
||||
forge.sdk.forge_log.setup_logger()
|
||||
|
||||
uvicorn.run(
|
||||
"forge.app:app", host="localhost", port=port, log_level="error", reload=True
|
||||
"forge.app:app", host="localhost", port=int(port), log_level="error", reload=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user