niosh-mining / obsplus

A Pandas-Centric ObsPy Expansion Pack
GNU Lesser General Public License v3.0
38 stars 8 forks source link

Setting a custom index path using a string causes problems when reading index #277

Open shawnboltz opened 2 weeks ago

shawnboltz commented 2 weeks ago

Another easy fix. Workaround is to pass a Path object as the custom index path, not a str

Description If you specify a custom index path for a WaveBank (presumably also EventBank) as a str, it gets attached to the bank as a str. This becomes a problem when reading the index because internally the bank is assuming a Path and treating it like a Path object.

Expected behavior When a str gets passed, it should internally get converted to a Path object before being attached to the bank.

Versions (please complete the following information): Affects all versions since commit 74897ccd.