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
Not able to use it for Python 3 #31
Comments
Hello, it should be compatible with both versions of Python: 2 and 3, but let me verify it. Will get back to you. |
Hi Thanks for the prompt reply. ModuleNotFoundError: No module named 'office365'` And Yes, I have pip install the moduel :) |
Hi, I have written code to get the information by only using Requests module. and I can get the FedAuth and rtFa cookies successfully. However, it throws an error Forbidden when i try to get the siteUsers. url="https://login.microsoftonline.com/extSTS.srf" filecontent = open(path,'r') #Let's make call to get the Token in order to get the cookies #Now, Lets fetch the cookies to make Call to SharePoint Online #Calling the Sharepoint REST Api using cookies obtained from above Call headers = {'Content-Type': 'application/x-www-form-urlencoded', response=requests.get(url,headers=headers) |
getting an error on python3.4: Traceback (most recent call last): According to https://docs.python.org/2/library/urlparse.html:
|
Try this https://github.com/parthrawal/Python.O365 i have written .py file which can connect to the SharePoint Online and even has some methods to get the data from lists in dictionary format. Let me know if you need any help with it. |
@vic-by A recent commit fixes the problem : 90731f |
There is still work needed to get the library really with python 3. I have encountered an encoding problem when running the library under python 3. It happened when doing a list.properties but I'm sure the problem is perpasive.
|
I am having the same problem with Python 3: "ModuleNotFoundError: No module named 'urlparse'" |
Did you try this link https://github.com/parthrawal/Python.O365 make sure you use the service account for the same |
Yes. Copy / Paste the code, on the bottom:
The following error is returned:
To get more detail on the error, I've inserted, on SPOnlineHeaders, the following code (print(s)):
Response: ...wst:FailedAuthentication...The entered and stored passwords do not match... |
I hope what you are using it is a service account |
That is correct. I am using the service account. |
Is password correct? can you please double check it. cause i tried running the code, it's working fine. But when i entered wrong password it throws "IndexError: list index out of range" error. |
Yes. The password is correct. This is what's happening when doing a manually login. I write the link into the browser: https://company.sharepoint.com/ When pressing enter I am redirected to the login page: https://login.microsoftonline.com/575...71a/oauth2/authorize?client_id=...&response_mode=form_post&response_type=code%20id_token&resource=...&scope=openid&nonce=....&redirect_uri=https:%2F%2Fcompany.sharepoint.com%2F_forms%2Fdefault.aspx&wsucxt=1&client-request-id=.... After pressing the ok button at the login page I saw two fast links... And finally stops at the required page: |
I run this code found that it is throwing 403 error somewhere in code. response = requests.post(url,data=SharepointOnlineAuth,headers=headers) |
I forgot to use endpoint |
I'm having the same problem with urlparse (Python 3.6.5 :: Anaconda, Inc.). This was solved by modifying saml_token_provider.py: Then I was missing web, which I installed it with: |
Install the utils module in anaconda. |
Thanks. After installing utils, I also needed to install db...it might be useful to have a requirements.txt check in the package? What is happening now is that the print statements are not adequate for python3: |
Please go through following link: |
@viogp Thanks for posting your progress here, would be good if we can iron some of these kinks out. Currently are using this library in py 2.7 and would like to these workflows over to py 3. |
Hi. I have a problem using this library. |
Since the library is officially compatible with both Python 2 and Python 3 runtimes, propose to close this issue. |
hi, I am getting this error "ModuleNotFoundError: No module named 'office365.sharepoint.client_context'" when I use project environment in pycharm during running. BUT it will work just fine if i use Python system environment. The same behavior either I use Python 3.6 or 3.7. Please help! |
I have the same issue. Did you found a way to solve it? |
Is there an issue with python 3?
The text was updated successfully, but these errors were encountered: