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

Script breaks when run #3

Open
cpeonepeloton opened this issue Oct 20, 2022 · 3 comments
Open

Script breaks when run #3

cpeonepeloton opened this issue Oct 20, 2022 · 3 comments

Comments

@cpeonepeloton
Copy link

when trying to run the script it errors out:

sudo python3 download_scripts.py
Traceback (most recent call last):
  File "/Users/Shared/scripts/download_scripts.py", line 132, in <module>
    main()
  File "/Users/Shared/scripts/download_scripts.py", line 102, in main
    tokenResponse = getToken()
  File "/Users/Shared/scripts/download_scripts.py", line 41, in getToken
    response = requests.request("POST", os.environ['JSS_URL'] + url, data=payload, headers=headers, auth=(os.environ['JSS_USER'], base64.b64decode(os.environ['JSS_PASSWORD'])))
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/os.py", line 680, in __getitem__
    raise KeyError(key) from None
KeyError: 'JSS_URL'
@nahrens007
Copy link
Owner

nahrens007 commented Oct 20, 2022 via email

@cpeonepeloton
Copy link
Author

cpeonepeloton commented Oct 20, 2022

I actually read the instructions well, and installed requests with pip3. This is how that portion looks like: JSS_URL = "https://nasajpl.jamfcloud.com"

@nahrens007
Copy link
Owner

nahrens007 commented Oct 20, 2022 via email

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

2 participants