Skip to content

fix: raise ValueError when use_fov_head=False and f_px not provided#105

Open
McVyp wants to merge 1 commit into
apple:mainfrom
McVyp:fix/fov-head-none-guard
Open

fix: raise ValueError when use_fov_head=False and f_px not provided#105
McVyp wants to merge 1 commit into
apple:mainfrom
McVyp:fix/fov-head-none-guard

Conversation

@McVyp

@McVyp McVyp commented Jun 2, 2026

Copy link
Copy Markdown

Summary

When use_fov_head=False, forward() returns fov_deg=None. If the caller
also omits f_px, line 283 crashes with:

AttributeError: 'NoneType' object has no attribute 'to'

This PR adds a guard that raises a clear ValueError instead.

Change

Added a None check for fov_deg inside the if f_px is None block in infer().

Related

Fixes #104
Related to #100 (separate AttributeError fix in the same block)

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: AttributeError in infer() when use_fov_head=False and f_px not provided

1 participant