Skip to content
Back to skills

2565 Errors 9b1bc534

ASecurity

``` Error: requests.exceptions.Timeout: Request timed out after 15s ``` **Cause**: The Graph subgraph is slow or unavailable. **Solution**: - Script automatically falls back to DeFiLlama data - Wait and retry if fresh subgraph data is needed - Check The Graph status page for outages

  • 11 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 11, 2026
code-qualitypythonbashtestingdebuggingapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2565-errors_9b1bc534 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2565 Errors 9b1bc534?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2565 Errors 9b1bc534
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2565-errors-9b1bc534/badge)](https://www.skillsdirectory.com/skills/tools-only-2565-errors-9b1bc534)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Error Handling Reference

## API Errors

### Subgraph Query Timeout
```
Error: requests.exceptions.Timeout: Request timed out after 15s
```
**Cause**: The Graph subgraph is slow or unavailable.
**Solution**:
- Script automatically falls back to DeFiLlama data
- Wait and retry if fresh subgraph data is needed
- Check The Graph status page for outages

### Subgraph Rate Limit
```
Error: 429 Too Many Requests
```
**Cause**: Too many subgraph queries in short period.
**Solution**:
- The Graph allows ~100 queries/minute on free tier
- Cache is used by default to reduce queries
- Wait 60 seconds before retrying

### DeFiLlama API Error
```
Error: Failed to fetch from DeFiLlama
```
**Cause**: DeFiLlama API unavailable.
**Solution**:
- Falls back to cached data if available
- Uses mock data for testing if needed
- Retry after a few minutes

## Pool Errors

### Pool Not Found
```
Error: Pool not found on ethereum
```
**Cause**: Pool address doesn't exist or wrong chain.
**Solution**:
- Verify pool address is correct
- Check you're using the right chain flag (--chain)
- Address must be lowercase for subgraphs

### Invalid Pool Address
```
Error: Invalid pool address format
```
**Cause**: Address format is incorrect.
**Solution**:
- Ensure address starts with 0x
- Address should be 42 characters (0x + 40 hex chars)
- Use lowercase for consistency

### Token Pair Not Found
```
Warning: No pools found for ETH/BTC
```
**Cause**: No pools exist for this pair on the selected protocol.
**Solution**:
- Try different protocol (--protocol)
- Check token symbols are correct
- Some pairs only exist on certain chains

## Calculation Errors

### Invalid Price Values
```
Error: Entry price must be greater than 0
```
**Cause**: Invalid price input for IL calculation.
**Solution**:
- Entry and current prices must be positive numbers
- Don't include currency symbols ($)
- Use decimal notation (2000, not 2,000)

### IL Calculation Error
```
Error: Cannot calculate IL for negative price ratio
```
**Cause**: Current price is 0 or negative.
**Solution**:
- Verify price inputs are correct
- Current price cannot be 0

## Output Errors

### File Write Permission Denied
```
PermissionError: [Errno 13] Permission denied: 'output.json'
```
**Cause**: Cannot write to output file location.
**Solution**:
- Check file/directory permissions
- Try different output path
- Use stdout (no --output flag)

### Invalid Output Format
```
Error: Invalid format 'xml'
```
**Cause**: Unsupported output format.
**Solution**: Use supported formats:
- `table` (default)
- `json`
- `csv`

## Cache Errors

### Cache Read Error
```
Warning: Could not read cache file
```
**Cause**: Cache file corrupted or permissions issue.
**Solution**:
- Delete cache: `rm ~/.lp_analyzer_cache.json`
- Script will fetch fresh data

### Stale Cache Warning
```
Using cached data (10 min old)
```
**Cause**: Cache TTL exceeded but API unavailable.
**Solution**:
- Not critical - data is still usable
- Use `--no-cache` to force refresh when API is back

## Import Errors

### Missing requests Library
```
Warning: requests library not available
```
**Cause**: Python `requests` package not installed.
**Solution**:
```bash
pip install requests
```

### Module Not Found
```
ModuleNotFoundError: No module named 'pool_fetcher'
```
**Cause**: Running script from wrong directory.
**Solution**:
```bash
# Run from scripts directory or use full path
python /path/to/scripts/pool_analyzer.py --help
```

## Recovery Commands

### Reset Cache
```bash
rm ~/.lp_analyzer_cache.json
```

### Test Subgraph Connectivity
```bash
curl -X POST https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3 \
  -H "Content-Type: application/json" \
  -d '{"query": "{ pools(first: 1) { id } }"}'
```

### Verbose Mode for Debugging
```bash
python pool_analyzer.py --verbose --pair ETH/USDC
```

### Test with Known Pool
```bash
# Uniswap V3 ETH/USDC 0.05% pool
python pool_analyzer.py --pool 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640 --verbose
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in code-quality →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.