Skip to content

fix: remove raise inside except in gguf_inference#130

Open
Bindkushal wants to merge 1 commit intosugarlabs:mainfrom
Bindkushal:fix/gguf-graceful-fallback
Open

fix: remove raise inside except in gguf_inference#130
Bindkushal wants to merge 1 commit intosugarlabs:mainfrom
Bindkushal:fix/gguf-graceful-fallback

Conversation

@Bindkushal
Copy link
Copy Markdown

@Bindkushal Bindkushal commented Apr 22, 2026

The except ImportError block sets GGUF_AVAILABLE = False to signal graceful degradation,, that was nice exception handling block but then immediately raises the same exception — making the flag pointless. Any code that checks GGUF_AVAILABLE never gets a chance to run because the activity crashes first. Removing the raise lets the flag do its job — TTS works normally and LLM is simply disabled when llama-cpp-python is not installed. and (llma-cpp-python needs whole c compiler or precompiled weheel, to protect the crash)

Test Video Link

https://drive.google.com/file/d/1MWZA1dKCkh0B5uCK3pYlXkdRjPfhBD0n/view?usp=sharing

try/except was supposed to degrade gracefully when llama-cpp-python
isn't installed. but the raise inside except just re-threw the error
and crashed the whole activity on startup, even if you only wanted TTS.

removed the raise. GGUF_AVAILABLE = False does the job.
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.

1 participant