Troubleshooting
Common issues and solutions when using gummyworm.
Installation Issues
"command not found: gummyworm"
Cause: gummyworm is not in your PATH.
Solutions:
-
If installed via Homebrew:
brew link gummyworm
# Or reinstall
brew reinstall gummyworm -
If installed manually:
# Add to PATH in ~/.bashrc or ~/.zshrc
export PATH="$PATH:/path/to/gummyworm/bin"
source ~/.bashrc -
Run with full path:
/path/to/gummyworm/bin/gummyworm --version
"ImageMagick not found" / "convert: command not found"
Cause: ImageMagick is not installed or not in PATH.
Solutions:
# macOS
brew install imagemagick
# Ubuntu/Debian
sudo apt install imagemagick
# Fedora
sudo dnf install ImageMagick
# Verify installation
convert --version
"bash: ./gummyworm: Permission denied"
Cause: Script is not executable.
Solution:
chmod +x gummyworm bin/gummyworm
"bash: ./gummyworm: /bin/bash: bad interpreter"
Cause: Wrong line endings (Windows CRLF instead of Unix LF).
Solution:
# Convert to Unix line endings
sed -i 's/\r$//' gummyworm bin/gummyworm lib/*.sh
# Or using dos2unix
dos2unix gummyworm bin/gummyworm lib/*.sh
Shell version too old
Cause: gummyworm requires Bash 3.2+ or zsh 5.0+.
Check your version:
# Check Bash version
bash --version
# Check zsh version
zsh --version
Solution for very old systems:
# Install newer Bash (macOS)
brew install bash
# Or use zsh (macOS default shell since Catalina)
zsh /path/to/gummyworm photo.jpg
Image Processing Issues
"Not a valid image file"
Cause: The file is not a supported image format or is corrupted.
Solutions:
-
Check file type:
file photo.jpg
# Should show: JPEG image data, ... -
Verify ImageMagick can read it:
identify photo.jpg -
Supported formats: JPEG, PNG, GIF, BMP, TIFF, WebP, and most formats ImageMagick supports.
"Failed to download image from URL"
Cause: Network issues, invalid URL, or server blocking requests.
Solutions:
-
Check URL is accessible:
curl -I "https://example.com/image.jpg" -
Download manually first:
curl -o image.jpg "https://example.com/image.jpg"
gummyworm image.jpg -
Check for URL encoding issues:
# Quote URLs with special characters
gummyworm "https://example.com/path/image%20name.jpg"
Output looks distorted or wrong aspect ratio
Cause: Terminal font isn't truly monospace, or aspect calculation is off.
Solutions:
-
Use a proper monospace font: Consolas, Fira Code, JetBrains Mono, etc.
-
Try
--no-aspect:gummyworm --no-aspect -w 80 -h 40 photo.jpg -
Adjust dimensions manually:
# Terminal characters are typically ~2:1 height:width
gummyworm -w 80 -h 40 photo.jpg
Image is too dark or too light
Solutions:
-
Try inverting:
gummyworm -i photo.jpg -
Use a higher contrast palette:
gummyworm -p blocks photo.jpg
gummyworm -p binary photo.jpg -
Pre-process the image:
# Increase contrast with ImageMagick
convert photo.jpg -contrast-stretch 2%x2% enhanced.jpg
gummyworm enhanced.jpg
Display Issues
Unicode/emoji characters showing as boxes or ?
Cause: Terminal or font doesn't support the characters.
Solutions:
-
Use ASCII-only palette:
gummyworm -p standard photo.jpg
gummyworm -p detailed photo.jpg -
Install emoji font:
- macOS: Apple Color Emoji (built-in)
- Linux:
sudo apt install fonts-noto-color-emoji - Windows: Segoe UI Emoji (built-in)
-
Use a modern terminal:
- macOS: iTerm2, Kitty
- Linux: GNOME Terminal, Konsole, Kitty
- Windows: Windows Terminal
-
Check terminal encoding:
echo $LANG
# Should include UTF-8, e.g., en_US.UTF-8
Colors not showing in terminal
Cause: Terminal doesn't support 256 colors, or colors are disabled.
Solutions:
-
Check terminal color support:
echo $TERM
# Should be xterm-256color or similar
# Test 256 colors
for i in {0..255}; do printf "\e[38;5;${i}m%3d " $i; done; echo -
Set correct TERM:
export TERM=xterm-256color -
Ensure
-cflag is used:gummyworm -c photo.jpg
ANSI codes visible as text (e.g., [38;5;196m)
Cause: Viewing ANSI output in a context that doesn't interpret escape codes.
Solutions:
-
View in terminal:
cat output.ans
less -R output.ans -
Export to HTML instead:
gummyworm -c -f html -o output.html photo.jpg
Emoji output misaligned
Cause: Emoji are typically double-width characters.
Solutions:
-
Use smaller width:
gummyworm -p emoji -w 40 photo.jpg -
Use a terminal with good emoji support: iTerm2, Windows Terminal
Export Issues
HTML/SVG looks wrong in browser
Solutions:
-
Check the file was saved completely:
head -20 output.html # Should show DOCTYPE
tail -5 output.html # Should show closing tags -
Ensure color mode was enabled:
gummyworm -c -f html -o output.html photo.jpg
PNG export fails
Cause: ImageMagick SVG support missing.
Solutions:
-
Check ImageMagick has SVG support:
convert -list format | grep SVG -
Reinstall ImageMagick with SVG:
# macOS
brew reinstall imagemagick
# Ubuntu
sudo apt install imagemagick librsvg2-bin -
Export to SVG and convert separately:
gummyworm -c -f svg -o art.svg photo.jpg
convert art.svg art.png
Output file is empty
Cause: Error during processing, or wrong output path.
Solutions:
-
Check for errors (remove quiet mode):
gummyworm photo.jpg # Look for error messages -
Verify image is valid:
identify photo.jpg -
Check output path is writable:
touch /path/to/output.txt # Test write permission
Performance Issues
Processing is very slow
Cause: Very large images or complex processing.
Solutions:
-
Reduce output dimensions:
gummyworm -w 60 huge-image.jpg -
Pre-resize the image:
convert huge.jpg -resize 800x800 smaller.jpg
gummyworm smaller.jpg -
Skip color processing:
gummyworm photo.jpg # Without -c flag
High memory usage with batch processing
Solutions:
-
Process files one at a time:
for f in photos/*.jpg; do
gummyworm -o "output/$(basename "$f" .jpg).txt" "$f"
done -
Use
--continue-on-errorto avoid stopping on failures:gummyworm --continue-on-error -d ./output/ photos/*.jpg
Getting Help
Debug Mode
Get more verbose output for troubleshooting:
# Check dependencies
gummyworm --version
which convert
convert --version
# Test with a simple image
gummyworm -w 20 -p simple test.jpg
Reporting Issues
When reporting a bug, include:
- gummyworm version:
gummyworm --version - OS and version:
uname -a - Bash version:
bash --version - ImageMagick version:
convert --version - The exact command that failed
- The full error message
- A sample image (if possible)
File issues at: https://github.com/oddurs/gummyworm/issues