Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting exit status 6 or 60 error #6

Open
bvanthull opened this issue Oct 24, 2023 · 0 comments
Open

getting exit status 6 or 60 error #6

bvanthull opened this issue Oct 24, 2023 · 0 comments

Comments

@bvanthull
Copy link

I'm running this code with the code below (private keys etc filled in with 'xxxx'):


tests the use of Terry's ttn_storage_api.py

import ttn_storage_api as tsa

folder = '/users/xxxxxxxxx/indoor/'

appname = "iaqnyc"
accesskey = "XXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
timestring = "10h"
version = 3

outdata = tsa.sensor_pull_storage(appname, accesskey, timestring, data_folder = None, ttn_version=version)

print(outdata)

fid = open(folder+'newdata.json','w')
fid.write(outdata)
fid.close()

with both version 2 and version 3 I get ALMOST the same error message:

Traceback (most recent call last):
File "/Users/brianvanthull2/Documents/grants/prathap/indoor/code/TTNv3pulltest.py", line 12, in
outdata = tsa.sensor_pull_storage(appname, accesskey, timestring, data_folder = None, ttn_version=version)
File "/Users/brianvanthull2/Documents/grants/prathap/indoor/code/ttn_storage_api.py", line 77, in sensor_pull_storage
result = subprocess.run(
File "/users/brianvanthull2/opt/anaconda3/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['curl', '-X', 'GET', '--header', 'Accept: application/json', '--header', 'Authorization: key XXXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', 'https://iaqnyc.data.thethingsnetwork.org/api/v2/query?last=10h']' returned non-zero exit status 6.

For version 2 it's exit value 6, for version 3 it's exit version 60. I believe my sensors are version 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant