Skip to content

[BUG]: NameError on startup due to missing Union import in main.py #187

@devanmolx

Description

@devanmolx

⚡️ Describe the Bug

The app crashes on startup with a NameError because Union is used
as a type hint in run_pdf_fill_process() but is never imported.

👣 Steps to Reproduce

  1. docker compose up -d
  2. docker exec -it fireform-app bash
  3. python src/main.py

📉 Expected Behavior

App should start without any NameError.

🖥️ Environment Information

  • OS: Ubuntu 22.04
  • Docker/Compose Version: Docker 24+
  • Ollama Model used: Mistral

📸 Screenshots/Logs

File "/app/src/main.py", line 14, in
def run_pdf_fill_process(user_input: str, definitions: list, pdf_form_path: Union[str, os.PathLike]):
NameError: name 'Union' is not defined

🕵️ Possible Fix

Add from typing import Union to the imports at the top of src/main.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions