Skip to content

[BUG] #26

@Yashwant00CR7

Description

@Yashwant00CR7

Checklist

  • The error occurs when using our provided Docker image.
  • I can consistently reproduce the bug across multiple trials or random seeds. (Marked as yes assuming this happens every time you run the command)
  • If the error causes experiment abortion, I've verified that this error is the root cause, not a secondary error caused by peer workers.

Detailed Information

Describe the bug

When running the aenv init command to scaffold a new project, the process fails with a NewConnectionError and Max retries exceeded exception. The CLI appears to be attempting to connect to a local registry/server at https://localhost:8080/env/my-env/1.0.0/exists.

The tool retries the connection 3 times before crashing with an unhandled exception stack trace. This suggests the CLI expects a local backend service to be running on port 8080 but does not handle the "Connection Refused" state gracefully or explain to the user that a prerequisite service is missing.

Expected behavior

  1. If the local server is required: The CLI should check for the server's presence and output a user-friendly error message (e.g., "Cannot connect to AEnv registry at localhost:8080. Please ensure the server is running before initializing.") rather than a raw Python stack trace.
  2. If the local server is NOT required: The CLI should not default to localhost:8080 and should instead point to the correct remote registry or configuration.

Full logs

(test) D:\Downloads\Projects\My College Projects\Legacy Project Maintainer\Aenvironment>aenv init my-env
╭───────────────────── AEnv Scaffolding ──────────────────────╮
│ 🚀 Initializing AEnv Project: my-env                        │
╰───────────────────── Environment Setup ─────────────────────╯
⠋ Checking environment registry...2025-12-19 19:45:11,154 - urllib3.connectionpool - WARNING - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError("HTTPSConnection(host='localhost', port=8080): Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it")': /env/my-env/1.0.0/exists
⠦ Checking environment registry...2025-12-19 19:45:17,235 - urllib3.connectionpool - WARNING - Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError("HTTPSConnection(host='localhost', port=8080): Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it")': /env/my-env/1.0.0/exists
⠦ Checking environment registry...2025-12-19 19:45:25,335 - urllib3.connectionpool - WARNING - Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError("HTTPSConnection(host='localhost', port=8080): Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it")': /env/my-env/1.0.0/exists
❌ Error: Unexpected error: Connection error: HTTPSConnectionPool(host='localhost', port=8080): Max retries exceeded with url: /env/my-env/1.0.0/exists (Caused by NewConnectionError("HTTPSConnection(host='localhost', port=8080): Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it"))


Image

Environment

  • OS: Windows (deduced from WinError 10061 and file paths)
  • Python Virtual Environment: Active (indicated by (test) prompt)
  • Tool: Aenvironment (Legacy Project Maintainer)
  • Hardware: [Please insert CPU/RAM specs if relevant, otherwise leave blank]

Script

# Run inside the Aenvironment project root
aenv init my-env

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions