Skip to content

[BUG]: Make exec fails because Union is not imported in src/main.py #274

@qngu0461

Description

@qngu0461

name: 🐛 make exec fail
about: Create a report to help us improve FireForm.
title: "[BUG]: Make exec fails because Union is not imported in src/main.py"
labels: bug
assignees: ''


⚡️ Describe the Bug

Running the Dockerized app fails immediately because Union is used in src/main.py but is not imported.

👣 Steps to Reproduce

  1. Build and start the containers
  2. Run:
    make exec
    
  3. See error NameError: name 'Union' is not defined

📉 Expected Behavior

The app should start normally without crashing on a missing import.

🖥️ Environment Information

OS: macOS
Docker/Compose Version: Docker 29.2.1
Ollama Model used: mistral:latest

📸 Screenshots/Logs

Traceback (most recent call last):
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
make: *** [exec] Error 1

🕵️ Possible Fix

Add in the top of the /src/main.py:
from typing import Union

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions