-
Notifications
You must be signed in to change notification settings - Fork 57
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
DeprecationWarning: with timeout() is deprecated, use async with timeout() instead #36
Comments
For me it's not working, unfortunately. I have tested adding a new script and it detects the new script but never actually uploads it, adding the --verbose argument doesn't provide any meaningful data either. `python3 sync.py --url https://jss-url --username xyz --verbose WARNING: Executing <Task pending name='Task-1' coro=<main() running at sync.py:384> wait_for=<Future pending cb=[shield.._outer_done_callback() at /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py:902, <TaskWakeupMethWrapper object at 0x104360df0>()] created at /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py:883> cb=[run_until_complete..done_cb()] created at sync.py:427> took 0.012 seconds WARNING: Executing <Task pending name='Task-2' coro=<TCPConnector._resolve_host() running at /Users/xyz/Library/Python/3.8/lib/python/site-packages/aiohttp/connector.py:880> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x104371580>()] created at /Users/xyz/Library/Python/3.8/lib/python/site-packages/aiohttp/resolver.py:33> cb=[shield.._inner_done_callback() at /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py:885] created at /Users/xyz/Library/Python/3.8/lib/python/site-packages/aiohttp/connector.py:1147> took 0.002 seconds WARNING: Executing took 0.002 seconds WARNING: Executing <Task pending name='Task-1' coro=<main() running at sync.py:384> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x104371280>()] created at /Users/xyz/Library/Python/3.8/lib/python/site-packages/aiohttp/streams.py:614> cb=[run_until_complete..done_cb()] created at sync.py:427> took 0.006 seconds No Changes in Extension Attributes |
Can you fix the formatting in the output above? Also can you share the xml for the script? I don't think this is an issue with the timeout based on the output posted above |
The output is kind of messy and I'm not sure I can fix the formatting more than just adding a few spaces to space it out. I've attached the XML Just to add, even if I just add the script itself without any xml to the scripts folder I get the same result. |
Sorry for the bump but was wondering if you have any ideas as to why this isn't working? |
Apologies for the delayed response, I no longer have a jss instance to test against so it might be touch and go for a bit :( Can you maybe try an older version of python and let me know if it works? When I originally developed this it was against 3.6 - just trying to narrow this down to a python version, jamf api issue, or malformed script issue |
No worries on the delay, I will specify the original python version and let you know the outcome. |
If it detects the script, ensure you have the proper permissions enabled in Jamf for the API user |
Have been looking to get this going for our org for a while now and finally got all the pieces in place only to be stumped by what appears to be a deprecated function.
Wondering if you or anybody else has come across this and has a quick fix?
The text was updated successfully, but these errors were encountered: