-
Notifications
You must be signed in to change notification settings - Fork 52
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
v2 Issues with POST and DELETE Calls #49
Comments
Can you please check that the auth cookies have been set correctly? print(s.auth.cookie)
print(s.auth.digest) |
Well it returns something so I guess it works. (Should I also put the output here or is there confidential information in these outputs) |
No need to post them. So long as they're both not I just tried your steps on my test account, and all there requests (POST, GET, DELETE) returned 200. The test folder was created and deleted successfully. The only difference was that I used the Shared Documents library in the root site, rather than a subsite. Are you able to test with a library in the top-level site? |
Sadly I am not as I only have my Sub-Site for testing purposes. I tried using your old approach (so the v1 one where you had an explicit post() function) and basically copied the post function and replaced it with delete. That worked out just fine. Am I allowed to use that modified approach until I can get the beta version working for me? |
The only other thing I can suggest right now is to try the PyPI version of the beta package: pip install --pre sharepy There shouldn't be any differences between that and what you have, but it's worth checking. I'll create a subsite myself tomorrow and see what I get. |
Okay thanks :) |
I just tested with a subsite, and using the URLs you provided, got a load of 404 responses. Only if I removed I didn't get the security message you're seeing. |
I've realised the name of the digest header is different in SharePy v2. Please can you try adding the following to the header dictionary in the
Perhaps the other header isn't supported by your site for some reason. |
I've created a branch with that change for you to try. You can find it here https://github.com/JonathanHolvey/sharepy/tree/issue-%2349 |
I've been facing same isssue while uploading files using PUT and with change on issue-#49 branch upload works. Could you include that in next release? |
I got the same issue. Workaround with adding 'Authorization' header before post works for me:
|
s = sharepy.connect(sharepoint_url, username=username, password=password)
-----------------below is the output------------------------------ File "", line 5, in
does the s object has this s.auth.digest ? |
Hi, |
Hey Jonathan,
thanks for the quick replies so far.
As suggested in the last Issue (#47) I freshly downloaded the beta v2.0.0 Branch and tried running a small test script which creates a new Folder (POST), gets some information of it (GET) and finally deletes the folder (DELETE).
The new version changed which errors I get as a response from the API:
POST Error Message:
value -> The Security check for this site is invalid... and so on
GET Error Message -> just the usual IOException because of the missing folder (works if I manually create the folder)
DELETE Error Message (after manually creating the folder):
value -> The Security check for this site is invalid... and so on
The Authentication type is SharepointOnline from what I understood.
The text was updated successfully, but these errors were encountered: