Skip to content

Fix runtime errors in main.py (Union import, Fill reference, target_f…#219

Open
lil-aditya wants to merge 1 commit intofireform-core:mainfrom
lil-aditya:fix-runtime-error
Open

Fix runtime errors in main.py (Union import, Fill reference, target_f…#219
lil-aditya wants to merge 1 commit intofireform-core:mainfrom
lil-aditya:fix-runtime-error

Conversation

@lil-aditya
Copy link

@lil-aditya lil-aditya commented Mar 11, 2026

Summary

This PR fixes several runtime errors in src/main.py that prevent the application from running correctly.

Issues Fixed

1. Missing Union Import

Union[str, os.PathLike] was used in a type hint but Union was not imported from typing, causing a NameError during module import.

2. Invalid Fill Reference

The function run_pdf_fill_process called Fill.fill_form(...) while the Fill import was commented out.
This resulted in a runtime NameError.

The implementation was updated to use the existing Controller class:

controller = Controller()
controller.fill_form(...)

Fixes #218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Runtime errors in src/main.py prevent application startup

1 participant