Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnboundLocalError: local variable 'button' referenced before assignment #126

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

akjava
Copy link
Contributor

@akjava akjava commented Mar 5, 2025

without additional_input_components like below

stream = Stream(
    handler=generation,
    modality="video",
    mode="receive"
)

cause an error

  File "/usr/local/lib/python3.10/site-packages/fastrtc/stream.py", line 79, in __init__
    self._ui = self._generate_default_ui(ui_args)
  File "/usr/local/lib/python3.10/site-packages/fastrtc/stream.py", line 215, in _generate_default_ui
    trigger=button.click,
UnboundLocalError: local variable 'button' referenced before assignment

button should be added without additional_input_components .

thanks for sharing project.

Copy link
Owner

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thank you @akjava !

@freddyaboulton freddyaboulton merged commit a0b46f4 into freddyaboulton:main Mar 6, 2025
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.

2 participants