# django.urls.exceptions.NoReverseMatch: Reverse for 'product_detail' with arguments '('',)' not found. 1 pattern(s) tried: ['product/<int:pk>/']

- **ID:** `python/django-url-reverse-with-args`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Passing an empty string or non-integer argument to reverse() for a URL pattern expecting int.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Ensure argument is integer: reverse('product_detail', args=[int(pk)])
   ```
2. **** (85% success)
   ```
   Provide default: reverse('product_detail', args=[pk or 0])
   ```

## Dead Ends

- **** — Using reverse('product_detail', args=[None]) doesn't convert None to int, still fails. (70% fail)
- **** — Changing URL pattern to string doesn't fix if you pass None. (50% fail)
