Modify ↓
Ticket #338 (closed defect: fixed)
read() raises a "wave.Error" exception when reading an unsupported file
| Reported by: | satriano | Owned by: | barsch |
|---|---|---|---|
| Priority: | major | Component: | ObsPy library |
| Keywords: | read() exception | Cc: |
Description
Calling obspy.core.stream.read() without specifying the file format results in a series of attempts to open the given file according to the supported formats.
Now, in case of an unsupported file, an exception is raised from the last module which tried to open the file, which is (at least in my case) the module wave. This makes it complicate to properly handle this exception, since one should import the module wave just for this.
I think that read() should raise its own exception when all the reading attempts fail.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

Hmm, I can confirm this issue. Using a random unsupported file, even though obspy.wav.core.isWAV returns False it is displaying the error message of obspy.wav.core.readWAV.