help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • Blog
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
satellite-images
RSK World
satellite-images
Satellite Images Dataset - Land Cover Classification + Building Detection + Remote Sensing + Geospatial Analysis
satellite-images
  • __pycache__
  • data
  • visualizations
  • .gitignore780 B
  • ADVANCED_FEATURES.md7.2 KB
  • ATTRIBUTION.md1.5 KB
  • DATA_SUMMARY.md3.9 KB
  • DOWNLOAD_REAL_DATA_GUIDE.md3.4 KB
  • ERROR_FIXES_SUMMARY.md3.2 KB
  • GITHUB_RELEASE_INSTRUCTIONS.md4.9 KB
  • LICENSE1.2 KB
  • PROJECT_INFO.md3 KB
  • QUICK_DOWNLOAD_GUIDE.md2.1 KB
  • QUICK_START_ADVANCED.md2 KB
  • README.md8.1 KB
  • RELEASE_NOTES_v1.0.0.md7.1 KB
  • advanced_example.py11 KB
  • advanced_processing.py17.3 KB
  • advanced_visualization.py15.5 KB
  • batch_processing.py11.9 KB
  • batch_processor.py10.8 KB
  • check_errors.py6.9 KB
  • config.py1.1 KB
  • create_placeholder_image.py3.5 KB
  • create_sample_images.py5.3 KB
  • data_loader.py6 KB
  • download_real_images.py5 KB
  • download_real_satellite_data.py8.4 KB
  • download_with_landsatxplore.py4.6 KB
  • download_with_sentinelsat.py6 KB
  • enhanced_real_image_downloader.py17.8 KB
  • example_usage.py4.3 KB
  • generate_sample_data.py7.2 KB
  • get_real_satellite_data.py9.6 KB
  • index.html18.5 KB
  • ml_features.py11.8 KB
  • ml_integration.py13.6 KB
  • process_images.py7 KB
  • real_image_downloader.py15.7 KB
  • requirements.txt632 B
  • requirements_download.txt474 B
  • satellite-images.png2.6 MB
  • setup.py1.6 KB
  • visualize.py5.8 KB
check_errors.py
check_errors.py
Raw Download
Find: Go to:
#!/usr/bin/env python3
"""
Error Checking Script for Satellite Image Dataset
Created by: RSK World (https://rskworld.in)

This script checks all files for errors and reports issues.
"""

import sys
import importlib
from pathlib import Path
import traceback

def check_import(module_name, package_name=None):
    """Check if a module can be imported."""
    try:
        if package_name:
            mod = importlib.import_module(module_name, package=package_name)
        else:
            mod = importlib.import_module(module_name)
        return True, None
    except ImportError as e:
        return False, str(e)
    except Exception as e:
        return False, f"Unexpected error: {str(e)}"

def check_file_syntax(file_path):
    """Check if a Python file has syntax errors."""
    try:
        with open(file_path, 'r', encoding='utf-8') as f:
            code = f.read()
        compile(code, file_path, 'exec')
        return True, None
    except SyntaxError as e:
        return False, f"Syntax error: {str(e)} at line {e.lineno}"
    except Exception as e:
        return False, f"Error: {str(e)}"

def main():
    """Main error checking function."""
    print("=" * 60)
    print("Satellite Image Dataset - Error Checker")
    print("Created by: RSK World (https://rskworld.in)")
    print("=" * 60)
    print()
    
    errors_found = []
    warnings = []
    
    # Check required packages
    print("1. Checking Required Packages...")
    print("-" * 60)
    required_packages = {
        'numpy': 'numpy',
        'cv2': 'opencv-python',
        'matplotlib': 'matplotlib',
        'skimage': 'scikit-image',
        'sklearn': 'scikit-learn',
        'scipy': 'scipy',
        'PIL': 'pillow',
        'rasterio': 'rasterio',
        'seaborn': 'seaborn',
        'tqdm': 'tqdm'
    }
    
    for import_name, package_name in required_packages.items():
        success, error = check_import(import_name)
        if success:
            print(f"  [OK] {package_name}")
        else:
            print(f"  [ERROR] {package_name} - {error}")
            errors_found.append(f"Missing package: {package_name}")
    
    print()
    
    # Check optional packages
    print("2. Checking Optional Packages...")
    print("-" * 60)
    optional_packages = {
        'pystac_client': 'pystac-client',
        'planetary_computer': 'planetary-computer',
        'landsatxplore': 'landsatxplore',
        'sentinelsat': 'sentinelsat'
    }
    
    for import_name, package_name in optional_packages.items():
        success, error = check_import(import_name)
        if success:
            print(f"  [OK] {package_name} (optional)")
        else:
            print(f"  [SKIP] {package_name} (optional, not installed)")
            warnings.append(f"Optional package not installed: {package_name}")
    
    print()
    
    # Check Python files for syntax errors
    print("3. Checking Python Files for Syntax Errors...")
    print("-" * 60)
    
    python_files = [
        'data_loader.py',
        'process_images.py',
        'visualize.py',
        'example_usage.py',
        'advanced_processing.py',
        'ml_integration.py',
        'enhanced_real_image_downloader.py',
        'advanced_visualization.py',
        'batch_processing.py',
        'advanced_example.py',
        'batch_processor.py',
        'ml_features.py',
        'real_image_downloader.py'
    ]
    
    for file_name in python_files:
        file_path = Path(file_name)
        if file_path.exists():
            success, error = check_file_syntax(file_path)
            if success:
                print(f"  [OK] {file_name}")
            else:
                print(f"  [ERROR] {file_name} - {error}")
                errors_found.append(f"Syntax error in {file_name}: {error}")
        else:
            print(f"  [SKIP] {file_name} (not found)")
    
    print()
    
    # Try importing main modules
    print("4. Testing Module Imports...")
    print("-" * 60)
    
    modules_to_test = [
        'data_loader',
        'process_images',
        'visualize',
        'advanced_processing',
        'ml_integration',
        'enhanced_real_image_downloader',
        'advanced_visualization',
        'batch_processing'
    ]
    
    for module_name in modules_to_test:
        try:
            mod = importlib.import_module(module_name)
            print(f"  ✓ {module_name}")
        except ImportError as e:
            print(f"  [ERROR] {module_name} - Import error: {e}")
            errors_found.append(f"Import error in {module_name}: {e}")
        except SyntaxError as e:
            print(f"  [ERROR] {module_name} - Syntax error: {e}")
            errors_found.append(f"Syntax error in {module_name}: {e}")
        except Exception as e:
            print(f"  [ERROR] {module_name} - Error: {e}")
            errors_found.append(f"Error in {module_name}: {e}")
    
    print()
    
    # Check for duplicate files
    print("5. Checking for Duplicate Files...")
    print("-" * 60)
    
    potential_duplicates = {
        'batch_processing.py': 'batch_processor.py',
        'ml_integration.py': 'ml_features.py',
        'enhanced_real_image_downloader.py': 'real_image_downloader.py'
    }
    
    for new_file, old_file in potential_duplicates.items():
        new_path = Path(new_file)
        old_path = Path(old_file)
        if new_path.exists() and old_path.exists():
            print(f"  [WARN] Both {new_file} and {old_file} exist")
            warnings.append(f"Duplicate files: {new_file} and {old_file}")
        elif new_path.exists():
            print(f"  [OK] {new_file} (recommended)")
        elif old_path.exists():
            print(f"  [SKIP] {old_file} (older version)")
    
    print()
    
    # Summary
    print("=" * 60)
    print("SUMMARY")
    print("=" * 60)
    
    if errors_found:
        print(f"\n[ERRORS] Found {len(errors_found)} error(s):")
        for error in errors_found:
            print(f"  - {error}")
    else:
        print("\n[SUCCESS] No critical errors found!")
    
    if warnings:
        print(f"\n[WARNINGS] {len(warnings)} warning(s):")
        for warning in warnings:
            print(f"  - {warning}")
    
    print()
    
    if errors_found:
        print("=" * 60)
        print("RECOMMENDATIONS")
        print("=" * 60)
        print("\n1. Install missing packages:")
        print("   pip install -r requirements.txt")
        print("\n2. For real image downloading (optional):")
        print("   pip install pystac-client planetary-computer")
        print("\n3. Check file syntax errors and fix them")
        print("\n4. Remove duplicate files if any")
        return 1
    else:
        print("=" * 60)
        print("All checks passed! [SUCCESS]")
        print("=" * 60)
        return 0

if __name__ == "__main__":
    sys.exit(main())

223 lines•6.9 KB
python

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer