Troubleshooting Guide
Common issues and solutions for FilterMate.
Installation Issues
Plugin Not Visible in QGIS
Symptoms:
- FilterMate not in Plugin menu
- Not listed in Plugin Manager
Solutions:
-
Check installation:
# Linux
ls ~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/filter_mate
# Windows
dir %APPDATA%\QGIS\QGIS3\profiles\default\python\plugins\filter_mate -
Verify metadata.txt exists
-
Enable in Plugin Manager:
- Plugins → Manage and Install Plugins
- Installed tab
- Check "FilterMate"
-
Restart QGIS
Import Errors on Startup
Error:
ModuleNotFoundError: No module named 'psycopg2'
Solution: psycopg2 is optional. If you don't use PostgreSQL:
- Open
config/config.json - Set
"POSTGRESQL_AVAILABLE": false - Restart QGIS
To install psycopg2:
pip install psycopg2-binary
Connection Issues
PostgreSQL Connection Failed
Symptoms:
- "Cannot connect to database"
- "Connection refused"
Solutions:
-
Check PostgreSQL is running:
sudo systemctl status postgresql -
Verify connection parameters:
- Host: correct address
- Port: default 5432
- Database: exists
- User: has permissions
-
Test connection in QGIS:
- Layer → Add Layer → Add PostGIS Layer
- Try connecting directly
-
Check psycopg2 installation:
# In QGIS Python Console
import psycopg2
print(psycopg2.__version__)
Spatialite Database Locked
Error:
sqlite3.OperationalError: database is locked
Causes:
- Another process using database
- QGIS project auto-save
- Incomplete previous operation
Solutions:
-
Automatic retry (built-in):
- FilterMate retries 5 times automatically
- Wait a few seconds
-
Close other connections:
- Close other QGIS projects using same database
- Check DB Browser for SQLite
-
Restart QGIS:
- Save project
- Restart QGIS
- Reopen project
Project Loading Issues
Layers Not Loading After Project Change
Symptoms:
- Plugin dockwidget empty after switching projects
- Layers present in project but not showing in FilterMate
- "No layers available" message
Solutions:
-
Force Reload Layers (F5): ⭐ NEW in v2.3.7
- Press F5 while FilterMate dockwidget is focused
- Wait for reload indicator ("⟳") to complete
- All project layers will be reloaded
- This is the fastest solution
-
Reload plugin:
- Plugins → Plugin Manager
- Find FilterMate
- Click "Reload Plugin"
-
Close and reopen dockwidget:
- Click FilterMate toolbar icon to close
- Click again to reopen
-
Restart QGIS (last resort):
- Save your project first
- Restart QGIS
- Reopen project
Why This Happens:
- QGIS signal timing can vary between systems
- PostgreSQL layers may need extra initialization time
- Project state cleanup may be incomplete
Technical Details: The F5 reload feature (v2.3.7) forces a complete state reset:
- Clears all cached layer references
- Cancels pending tasks
- Resets all state flags
- Reinitializes database connections
- Reloads all vector layers from current project
Filtering Issues
Filter Not Applied
Symptoms:
- Layer still shows all features
- No visible change
Check:
-
Expression syntax:
# Correct
population > 10000
# Wrong
population > 10,000 # No commas in numbers -
Field names:
- Case-sensitive
- Use quotes for special characters:
"Field Name"
-
Layer provider:
- PostgreSQL: Server-side filtering
- Others: QGIS expression engine
-
Backend warnings:
- Check message bar for warnings
- May indicate performance issues
Geometric Filter Returns No Features
Possible Causes:
-
CRS mismatch:
# Check CRS
Source CRS: EPSG:4326 (WGS84)
Target CRS: EPSG:3857 (Web Mercator)
# FilterMate automatically reprojects -
Buffer too small/large:
- Units in layer CRS
- Check unit (meters vs degrees)
-
Invalid geometries:
- FilterMate attempts automatic repair
- Check QGIS message bar
Solutions:
-
Verify CRS:
- Layer Properties → Information
- Ensure both layers have valid CRS
-
Test without buffer:
- Set buffer to 0
- Test predicate alone
-
Repair geometries:
- Vector → Geometry Tools → Fix Geometries
Expression Conversion Failed
Error:
Cannot convert expression to backend SQL
Cause:
- QGIS expression not supported by backend
Solutions:
-
Use simpler expressions:
# Instead of
to_string($area) LIKE '1000%'
# Use
$area >= 1000 AND $area < 2000 -
Check backend compatibility:
- PostgreSQL: Full PostGIS functions
- Spatialite: ~90% PostGIS compatible
- OGR: Limited expressions
Performance Issues
Filtering Very Slow
Symptoms:
- Operation takes > 30 seconds
- UI freezes
Solutions:
-
Check dataset size:
layer.featureCount()
# > 50,000: Consider PostgreSQL -
Use PostgreSQL backend:
pip install psycopg2-binary- Convert data to PostGIS
- 10-100× faster for large datasets
-
Optimize expression:
# Slow: Complex expression
to_string($area) LIKE '%000'
# Fast: Simple comparison
$area > 1000 -
Reduce buffer distance:
- Smaller buffers = faster processing
-
Filter in stages:
- Apply attribute filter first
- Then geometric filter
UI Not Responsive
Cause:
- Heavy operation running
Check:
-
Task progress:
- Look for progress bar in QGIS
- Bottom-right corner
-
Cancel if needed:
- Click "X" on progress bar
- Or wait for completion
Prevention:
- Use PostgreSQL for large datasets
- Test on subset first
Export Issues
Export Failed
Error:
Cannot write to output file
Causes:
-
File permissions:
# Check write permissions
touch /path/to/output.gpkg -
File already open:
- Close in QGIS
- Close in external applications
-
Disk space:
df -h # Check available space -
Invalid path:
- Use absolute paths
- Avoid special characters
Export Incomplete
Symptoms:
- Fewer features than expected
- Missing attributes
Check:
-
Active filter:
- Export exports filtered features
- Clear filter to export all
-
Field selection:
- Verify all fields selected
- Check "Select All"
-
CRS transformation:
- Some features may be outside target CRS bounds
Styles Not Exported
Check:
-
Style export enabled:
- Configuration → STYLES_TO_EXPORT
- Set to "QML" or "SLD"
-
Format supports styles:
- GeoPackage: Yes
- Shapefile: Yes (.qml/.sld file)
- GeoJSON: No (no style support)
UI Issues
Interface Too Large/Small
Solution:
-
Change UI profile:
- Configuration tab
- UI_PROFILE → "compact" or "normal"
-
Auto mode:
- Set to "auto"
- Adapts to screen resolution
Theme Not Applied
Check:
-
Theme setting:
- Configuration → ACTIVE_THEME
- Options: auto, default, dark, light
-
Theme source:
- THEME_SOURCE → "qgis" to match QGIS
-
Restart may be needed:
- Close and reopen FilterMate panel
Configuration Changes Not Saved
Check:
-
Auto-save enabled (v2.2.2+):
- Changes save automatically
- No manual save needed
-
File permissions:
# Check config file writable
ls -l config/config.json -
Valid JSON:
- Syntax errors prevent saving
- Check QGIS message bar
Geometry Issues
Invalid Geometry Warning
Message:
Invalid geometry detected. Attempting repair...
FilterMate Action:
- Automatic repair with 5 strategies
- Usually succeeds
If Fails:
-
Manual repair:
- Vector → Geometry Tools → Fix Geometries
-
Check geometry:
# In QGIS Python Console
layer = iface.activeLayer()
for f in layer.getFeatures():
if not f.geometry().isGeosValid():
print(f"Invalid: {f.id()}") -
Simplify geometry:
- Vector → Geometry Tools → Simplify
Buffer Operation Failed
Causes:
-
Invalid source geometry
- See "Invalid Geometry Warning" above
-
Negative buffer:
- Use positive values only
-
Buffer too large:
- May exceed system memory
- Reduce buffer distance
Debug Mode
Enable Debug Logging
-
Set in configuration:
{
"ENABLE_DEBUG_LOGGING": true
} -
Restart FilterMate
-
View logs:
- QGIS Python Console
- Or check log file (if configured)
Log Locations
Linux:
~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/filter_mate/logs/
Windows:
%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins\filter_mate\logs\
macOS:
~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/filter_mate/logs/
Getting Help
Before Reporting Issues
- Check this guide
- Enable debug logging
- Try with test data
- Check QGIS version compatibility
Reporting Issues
Include:
- FilterMate version
- QGIS version
- Operating system
- Backend type (PostgreSQL/Spatialite/OGR)
- Error message (from QGIS console)
- Steps to reproduce
- Debug logs (if enabled)
Where to Get Help
- GitHub Issues: https://github.com/sducournau/filter_mate/issues
- QGIS Forum: Tag with "filtermate"
- Email: simon.ducournau+filter_mate@gmail.com