---
Product: Aspose.Email
Platform: python
Page Type: reference
Canonical URL: https://reference.aspose.org/email/python/msgerror
---

# MsgError

## Overview

`MsgError` is a class in Aspose.Email FOSS for Python.
Inherits from: `Exception`.

Raised for malformed or unsupported MSG structures.

This class is part of the public API of Aspose.Email FOSS for Python.
It can be used with other exported types in the package when working with MsgError values in your Python application.

## Examples

```python
from aspose.email_foss.msg import MsgReader, MsgError

try:
    reader = MsgReader.from_file("invalid.msg")
except MsgError as e:
    print(f"MSG error: {e}")
```

## See Also

- [Aspose.Email for Python — Enterprise API Reference](https://reference.aspose.com/email/python-net/)