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)