Line continuation is not needed here.  PEP8 would recommend:
```python
    raise ValueError('No sample ids match metadata_value="%s" in metadata_category="%s"' %
                     (metadata_value, metadata_category))
```