Hi,
I have been using the SharePy python library to interact with my Sharepoint access for some time. As of last week, without any changes to either the Sharepoint, the account permissions, or my code, I suddenly started getting the following error when attempting to connect.
import sharepy
sharepy.connect("sitename", username="username", password="password")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/[username]/.local/lib/python3.11/site-packages/sharepy/session.py", line 15, in connect
return SharePointSession(site, auth=autoauth)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/[username]/.local/lib/python3.11/site-packages/sharepy/session.py", line 61, in __init__
self.auth.login(self.site)
File "/home/[username]/.local/lib/python3.11/site-packages/sharepy/auth/spol.py", line 26, in login
self._get_cookie()
File "/home/[username]/.local/lib/python3.11/site-packages/sharepy/auth/spol.py", line 60, in _get_cookie
cookie = self._buildcookie(response.cookies)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/[username]/.local/lib/python3.11/site-packages/sharepy/auth/spol.py", line 91, in _buildcookie
return 'rtFa=' + cookies['rtFa'] + '; FedAuth=' + cookies['FedAuth']
~~~~~~~^^^^^^^^
File "/home/[username]/.local/lib/python3.11/site-packages/requests/cookies.py", line 334, in __getitem__
return self._find_no_duplicates(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/[username]/.local/lib/python3.11/site-packages/requests/cookies.py", line 413, in _find_no_duplicates
raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}")
KeyError: "name='rtFa', domain=None, path=None"
Has anyone encountered something similar?
Thanks.