terrillmoore / ttn_storage_api

MIT License
3 stars 4 forks source link

Data folder doesn't work. #2

Closed terrillmoore closed 1 year ago

terrillmoore commented 1 year ago

As reported by @vak000, data folders don't work:

I need to store the data on my local computer and one argument for this is the data directory. When I specify a directory name as below:

r = ttn_storage_api.sensor_pull_storage("vahidakbari", key, "24h", data_folder = r"C:\Users\vaak\Downloads")

I am getting the following error:

TypeError: argument of type 'WindowsPath' is not iterable

The problem is this line:

https://github.com/terrillmoore/ttn_storage_api/blob/c9c962005335a27d5c57e53b6083eb083eaf6750/ttn_storage_api.py#L82

It should be

        args += [ "-o", str(pathlib.Path(data_folder, "sensors_lastperiod.json")) ]