Fix bug in empatica_zip container script

pull/128/head
JulioV 2021-03-11 13:35:34 -05:00
parent a79997e0ac
commit 1e66dad838
2 changed files with 6 additions and 2 deletions

View File

@ -84,7 +84,11 @@ def pull_data(data_configuration, device, sensor, container, columns_to_download
participant_data = pd.DataFrame(columns=columns_to_download.values())
participant_data.set_index('timestamp', inplace=True)
for zipfile in list((Path(data_configuration["FOLDER"]) / Path(device)).rglob("*.zip")):
available_zipfiles = list((Path(data_configuration["FOLDER"]) / Path(device)).rglob("*.zip"))
if len(available_zipfiles) == 0:
warnings.warn("There were no zip files in: {}. If you were expecting data for this participant the [EMPATICA][DEVICE_IDS] key in their participant file is missing the pid".format((Path(data_configuration["FOLDER"]) / Path(device))))
for zipfile in available_zipfiles:
print("Extracting {} data from {} for {}".format(sensor, zipfile, device))
with ZipFile(zipfile, 'r') as zipFile:
listOfFileNames = zipFile.namelist()

View File

@ -138,7 +138,7 @@ properties:
pattern: "^.*\\.csv$"
IF_MISSING_TZCODE:
type: string
enum: [USE_DEFAULT]
enum: [STOP, USE_DEFAULT]
DEFAULT_TZCODE:
type: string
FITBIT: