Solution: Use python -m pip
python -m pip install -e ".[dev]"Solution: Install in editable mode
pip install -e .Solution: Use virtual environment
python3.12 -m venv venv
source venv/bin/activate
pip install -e ".[dev]"Solution: Check file path
from pathlib import Path
file_path = Path("data.csv")
if not file_path.exists():
print(f"File not found: {file_path}")
else:
df = loader.load_csv(file_path)Solution: Check delimiter and encoding
# Specify delimiter
df = loader.load_csv("data.csv", delimiter=";")
# Specify encoding
df = loader.load_csv("data.csv", encoding="latin-1")
# Or let auto-detection handle it
df = loader.load_csv("data.csv")Solution: Specify correct encoding
# Try different encodings
for encoding in ["utf-8", "latin-1", "utf-16"]:
try:
df = loader.load_csv("data.csv", encoding=encoding)
print(f"Success with {encoding}")
break
except UnicodeDecodeError:
continueSolution: Check data values
# View problematic rows
print(df[df["value"] < 0])
# Fix data
df = df[df["value"] >= 0]Solution: Handle empty strings
# Remove empty labels
df = df[df["label"].str.strip() != ""]
# Or fill with default
df["label"] = df["label"].fillna("unknown")Solution: Run with verbose output
pytest tests/unit/test_loader.py::test_loader_loads_csv_file -vv -sSolution: Check test data
# View test file
cat tests/fixtures/test_data/sample.csv
# Check fixture
pytest --fixtures | grep sample_csv_fileSolution: Add tests for uncovered code
# Generate coverage report
pytest --cov=src/ai_project --cov-report=html
# View report
open htmlcov/index.html
# Add tests for uncovered linesSolution: Check file size and use caching
# Enable caching (default)
loader = DataLoader(cache_enabled=True)
# First load caches data
df1 = loader.load_csv("large_file.csv") # Slow
# Second load uses cache
df2 = loader.load_csv("large_file.csv") # FastSolution: Process in chunks
# Read in chunks
for chunk in pd.read_csv("large_file.csv", chunksize=10000):
# Process chunk
result = pipeline.execute_chunk(chunk)Solution: Check logs
# View workflow logs
gh run view <run-id> --log
# Or check on GitHub UI
# Actions tab → Workflow run → Job logsSolution: Add repository secret
Settings → Secrets and variables → Actions
New repository secret
Name: PYPI_API_TOKEN
Value: <your-token>
Solution: Check Python version
# Test with specific Python version
python3.11 -m pytest
python3.12 -m pytest
python3.13 -m pytestA: Use pytest with debugging options
pytest tests/unit/test_loader.py -vv -s --pdbA: Generate coverage report
pytest --cov=src/ai_project --cov-report=html
open htmlcov/index.htmlA: Use pytest markers
pytest -m unitA: Use pytest markers
pytest -m integrationA: Use Black
black src testsA: Use Ruff
ruff check src testsA: Use Pyright
pyright srcA: Create a tag
git tag v1.0.0
git push origin v1.0.0from ai_project.logger import configure_logging
configure_logging("DEBUG")
# Now all operations are logged
loader = DataLoader()
df = loader.load_csv("data.csv")# Run with logging
python -c "
from ai_project.logger import configure_logging
configure_logging('DEBUG')
from ai_project.processors.loader import DataLoader
loader = DataLoader()
df = loader.load_csv('data.csv')
"- GitHub Issues
- Search for similar problems
- GitHub Discussions
- Ask questions in community
- Create Issue
- Include error message, code, and steps to reproduce
- 📧 Email: support@example.com
- 💬 Slack: Join workspace
import cProfile
import pstats
profiler = cProfile.Profile()
profiler.enable()
# Your code
df = loader.load_csv("data.csv")
profiler.disable()
stats = pstats.Stats(profiler)
stats.sort_stats('cumulative')
stats.print_stats(10)pip install pytest-benchmark
pytest --benchmark-onlyLast Updated: January 15, 2026