You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use this module inside an Ansible inventory script to retrieve hosts from a SharePoint list. This works well in a recent (3.11) Python version, but unfortunately I need to rely on Python 3.6 in another environment. There the script fails right away in line 1:
fromoffice365.sharepoint.client_contextimportClientContext# [...] Authentication code like in this example: https://github.com/vgrem/Office365-REST-Python-Client/blob/master/examples/sharepoint/connect_with_client_certificate.py
The SyntaxError thrown is this:
Traceback (most recent call last):
File "inventory-from-spo.py", line 1, in <module>
from office365.sharepoint.client_context import ClientContext
File "/home/me/.local/lib/python3.6/site-packages/office365/sharepoint/client_context.py", line 16, in <module>
from office365.runtime.odata.request import ODataRequest
File "/home/me/.local/lib/python3.6/site-packages/office365/runtime/odata/request.py", line 6, in <module>
from office365.runtime.client_object import ClientObject
File "/home/me/.local/lib/python3.6/site-packages/office365/runtime/client_object.py", line 1
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
Is there some kind of compatibility layer one needs to activate?
The text was updated successfully, but these errors were encountered:
I also had this dependency error, I had to uninstall the current version and reinstall with this version that is specified as support for the python version.
I am trying to use this module inside an Ansible inventory script to retrieve hosts from a SharePoint list. This works well in a recent (3.11) Python version, but unfortunately I need to rely on Python 3.6 in another environment. There the script fails right away in line 1:
The SyntaxError thrown is this:
Is there some kind of compatibility layer one needs to activate?
The text was updated successfully, but these errors were encountered: