# pydantic.errors.UrlError: Invalid URL

- **ID:** `python/pydantic-url-parsing-error`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Using HttpUrl or AnyUrl type, the input string is not a valid URL (e.g., missing scheme, malformed).

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   Ensure full URL: 'https://example.com'
   ```
2. **** (85% success)
   ```
   Use AnyUrl with allowed_schemes if needed
   ```

## Dead Ends

- **** — URL must have scheme for HttpUrl. (90% fail)
- **** — URLs cannot contain spaces. (80% fail)
