-
Notifications
You must be signed in to change notification settings - Fork 0
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
Comments
Looks like the environment variable JSS_URL is not set properly. Please
read through the instructions.
…On Thu, Oct 20, 2022, 18:21 Gilbert Palau ***@***.***> wrote:
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 ***@***.***/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'
—
Reply to this email directly, view it on GitHub
<#3>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2XWNDQGDFQOOQBRJ2B3V3WEHAX5ANCNFSM6AAAAAARKS74OY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I actually read the instructions well, and installed requests with pip3. This is how that portion looks like: |
I believe the issue is you are running the script with sudo so your user
environment variables are not used.
…On Thu, Oct 20, 2022, 18:35 Gilbert Palau ***@***.***> wrote:
I have that portion filled out correctly: JSS_URL = "
https://nasajpl.jamfcloud.com"
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2XWNAXXDYYPIKWHB6U4DDWEHCKLANCNFSM6AAAAAARKS74OY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when trying to run the script it errors out:
The text was updated successfully, but these errors were encountered: