Common Issues
This page covers frequently encountered issues and their solutions.
Upload Issues
File Upload Fails
Error: "File upload failed" or "Invalid file format"
Causes:
- File not in
.xlsxformat - File size exceeds 10MB
- File is password-protected
- Corrupted Excel file
Solutions:
- Save file as
.xlsx(Excel 2007+) - Check file size: Right-click → Properties
- Remove password: File → Info → Protect Workbook → Encrypt with Password
- Try opening and re-saving in Excel
- Split large files into smaller batches
Upload Hangs or Times Out
Symptoms:
- Page stuck on "Processing..."
- No response after 5+ minutes
- Browser shows "Page unresponsive"
Solutions:
- Wait 2-3 minutes (large files take time)
- Check server logs:
./view_logs.sh extraction - Refresh page and check dashboard for session
- Verify server is running:
ps aux | grep runserver - Restart server if needed:
./stop_server.sh && ./start_server.sh
"No Quotations Found" Error
Causes:
- No PII sheet in Excel file
- Sheet names don't match expected patterns
- Header row not detected
- QTI numbers missing
Solutions:
- Verify sheet contains "PII" or "PUNCH" in name
- Check header row has "NO", "ITEM", "KODE ITEM", "QTY"
- Ensure QTI numbers present (e.g., QTI-240102)
- Use template format provided by IT
Processing Issues
SAP HANA Connection Failed
Error: "SAP Connection Error" in logs
Causes:
- SAP HANA server unreachable
- Invalid credentials
- Network/firewall issues
- Schema not accessible
Solutions:
# Test connection
cd /mnt/data/punch_quotation
source venv/bin/activate
python -c "
from hdbcli import dbapi
import os
from dotenv import load_dotenv
load_dotenv()
conn = dbapi.connect(
address=os.getenv('HANA_HOST'),
port=int(os.getenv('HANA_PORT')),
user=os.getenv('HANA_USER'),
password=os.getenv('HANA_PASSWORD')
)
print('Connected!')
conn.close()
"
If connection fails:
- Check
.envfile has correct credentials - Verify network access:
telnet 172.16.25.3 30015 - Contact SAP administrator
- Check firewall rules
PDF Generation Failed
Error: "Failed to generate PDF" or missing PDFs
Causes:
- WeasyPrint not installed
- Missing system fonts
- Invalid quotation data
- Disk space full
Solutions:
# Check WeasyPrint
python -c "import weasyprint; print('OK')"
# Reinstall if needed
pip install weasyprint
# Check disk space
df -h
# Check logs
./view_logs.sh django
Missing Items in Check
Not an error - Some items may not exist in SAP HANA.
Actions:
- Download missing items CSV
- Verify item codes with sales team
- Add new items to SAP HANA (separate process)
- Re-sync inventory on session detail page
Login Issues
Cannot Login
Error: "Invalid username or password"
Solutions:
- Verify credentials with admin
- Try demo accounts:
uploader/upload123processor/process123
- Reset password via admin panel
- Check CAPS LOCK is off
Redirected to Login After Login
Causes:
- Session expired
- Browser cookies disabled
- Server restart
Solutions:
- Clear browser cache and cookies
- Enable cookies in browser settings
- Try different browser
- Check server is running
"Permission Denied" After Login
Error: Cannot access dashboard or upload page
Causes:
- User not in correct group
- Insufficient permissions
Solutions:
- Contact administrator to assign proper role
- Uploader: Can only upload files
- Processor: Full access
- Admin: Use Django admin panel to check user groups
Server Issues
Server Not Starting
Error: "Address already in use" or connection refused
Solutions:
# Check if port 8000 is in use
netstat -tlnp | grep 8000
# Kill existing process
pkill -f "manage.py runserver"
# Start server
./start_server.sh
# Check server status
ps aux | grep runserver
Server Crashes or Restarts
Check logs:
# Server output
cat logs/server.log
# Django logs
tail -50 logs/django.log
# Extraction logs
tail -50 logs/extraction.log
Common causes:
- Out of memory
- Database corruption
- Python errors in code
- Disk full
Solutions:
- Check system resources:
free -h,df -h - Restart server:
./stop_server.sh && ./start_server.sh - Check for errors in logs
- Contact IT if issue persists
Slow Performance
Symptoms:
- Pages load slowly
- Upload processing takes too long
- Dashboard laggy
Solutions:
- Clear old sessions from database
- Check server resources:
top,htop - Restart server during off-peak hours
- Optimize database:
python manage.py vacuum(if PostgreSQL) - Consider hardware upgrade
Database Issues
Database Locked
Error: "database is locked" (SQLite only)
Causes:
- Multiple processes accessing database
- Previous process didn't close properly
Solutions:
# Stop server
./stop_server.sh
# Wait 10 seconds
sleep 10
# Restart
./start_server.sh
Corrupted Database
Symptoms:
- Random errors
- Missing data
- Cannot access dashboard
Solutions:
# Backup current database
cp db.sqlite3 db.sqlite3.backup
# Try to repair
python manage.py migrate --run-syncdb
# If repair fails, restore from backup
# Or recreate database:
rm db.sqlite3
python manage.py migrate
python manage.py setup_users
⚠️ Warning: Recreating database deletes all data.
Format Detection Issues
Wrong Format Detected
Symptoms:
- TMMIN detected as Standard
- Format badges incorrect
- PDF shows wrong template
Causes:
- Sheet name doesn't match format keywords
- Column count mismatch
- Missing format-specific fields
Solutions:
- Rename sheet to include format keyword:
- TMMIN: "TMMIN" or "TOYOTA"
- METINDO: "METINDO"
- MARUICHI: "MARUICHI"
- Verify column count matches format
- Check sample files for correct structure
Date Not Showing
Error: Date shows "N/A" in quotation
Causes:
- Date format doesn't match expected pattern
- Missing comma or space in date
- Date in wrong location
Expected format: Jakarta, DD MMMM YYYY
Examples:
- ✅
Jakarta, 23 Oktober 2025 - ✅
Jakarta,23 Oktober 2025(comma without space) - ❌
23 Oktober 2025(missing location) - ❌
2025-10-23(wrong format)
Solutions:
- Add "Jakarta, " before date
- Use full month name in Indonesian
- Check comma placement
Browser Issues
Page Not Loading
Solutions:
- Hard refresh:
Ctrl + F5(Windows) orCmd + Shift + R(Mac) - Clear browser cache
- Try incognito/private mode
- Try different browser (Chrome, Firefox, Edge)
- Check server is running
JavaScript Errors
Error: Console shows "Uncaught SyntaxError" or similar
Solutions:
- Clear browser cache
- Hard refresh page
- Check browser console (F12) for details
- Report to IT with error message
Styling Issues
Symptoms:
- Page looks broken
- Missing colors or borders
- Layout incorrect
Solutions:
- Clear browser cache
- Hard refresh:
Ctrl + F5 - Check if Tailwind CSS loading
- Disable browser extensions
- Try different browser
Data Issues
Items Not Filtering
Symptoms:
- "11 HARI KERJA" appears in item check
- Dates like "2025-10-23" in item list
- Notes treated as items
This should be fixed in current version.
If still occurring:
- Check system version
- Re-upload file
- Check logs for filtering errors
- Report to IT with file sample
Duplicate Quotations
Symptoms:
- Same QTI number appears multiple times
- Quotations counted twice
Causes:
- QTI number appears on multiple sheets
- Revision quotations not properly marked
Solutions:
- Ensure QTI numbers are unique per file
- Use REV suffix for revisions:
QTI-240102-REV-1 - Remove duplicate quotations from Excel before upload
Quick Diagnostic Commands
# Check server status
ps aux | grep runserver
# Check port 8000
netstat -tlnp | grep 8000
# View recent logs
tail -50 logs/django.log
tail -50 logs/extraction.log
# Test SAP connection
cd /mnt/data/punch_quotation && source venv/bin/activate
python manage.py shell -c "from quotation.utils.sap_utils import test_hana_connection; test_hana_connection()"
# Check disk space
df -h
# Check memory
free -h
# Restart server
./stop_server.sh && sleep 2 && ./start_server.sh
Getting Help
If issue persists after trying solutions:
Collect Information:
- Error message (exact text)
- Screenshot of issue
- Steps to reproduce
- Log files (
logs/directory)
Check Logs:
./view_logs.sh all > issue_logs.txtContact IT:
- Email: it@somagede.co.id
- Include: Error details, logs, screenshots
- Mention: System version, browser used
Prevention Tips
Regular Maintenance:
- Clean up old sessions weekly
- Monitor disk space
- Check logs for warnings
- Backup database monthly
Best Practices:
- Use template formats
- Verify files before upload
- Test with small files first
- Keep browser updated
Monitoring:
- Check dashboard statistics daily
- Review failed uploads
- Monitor SAP connection status
- Watch server logs for errors