diff --git a/homeassistant/components/sensor/gtfs.py b/homeassistant/components/sensor/gtfs.py index 633a50f15c1..3ccc60457b6 100644 --- a/homeassistant/components/sensor/gtfs.py +++ b/homeassistant/components/sensor/gtfs.py @@ -16,7 +16,7 @@ from homeassistant.const import CONF_NAME from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['pygtfs-homeassistant==0.1.3.dev0'] +REQUIREMENTS = ['pygtfs==0.1.5'] _LOGGER = logging.getLogger(__name__) @@ -169,9 +169,9 @@ def setup_platform(hass, config, add_entities, discovery_info=None): import pygtfs - split_file_name = os.path.splitext(data) + (gtfs_root, _) = os.path.splitext(data) - sqlite_file = "{}.sqlite".format(split_file_name[0]) + sqlite_file = "{}.sqlite?check_same_thread=False".format(gtfs_root) joined_path = os.path.join(gtfs_dir, sqlite_file) gtfs = pygtfs.Schedule(joined_path) diff --git a/requirements_all.txt b/requirements_all.txt index ec22bccfa9a..0606252b18d 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -963,7 +963,7 @@ pygatt==3.2.0 pygogogate2==0.1.1 # homeassistant.components.sensor.gtfs -pygtfs-homeassistant==0.1.3.dev0 +pygtfs==0.1.5 # homeassistant.components.remote.harmony pyharmony==1.0.20