-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
"TypeError: cannot concatenate 'str' and 'NoneType' objects" on request to get a file. #28
Comments
I had a similar problem because our SharePoint instance is running behind a proxy. I had to subclass the |
I ran into the same issue. It seems like authentication failures are not handled by exceptions. It only bubbles up when cookies are queried. Check your credentials |
Same issue. Checked credentials but issue persists. Any other thoughts? Thanks! |
I ended up using OAuth2Session to get oauth2 authentication and grab data from graph api. its been a while and i no longer remember the exact details. |
Thanks will check it out. |
Hi, I have the same issue, but in my case I think it's because I have sharepoint configured with FormAuthentication method. No way it will work until the proper token provider is implemented |
I am bumping into this problem too but only if I am using an outlook.com account. I am hoping somebody can explain what is going on behind the scenes and perhaps offer a solution. Here is a brief explanation:
What would be the different in authentication between using an outlook.com address and one issued by my organization (in this case [email protected]? |
Same problem here. We're using AD FS for authentication. Till now I didn't found any way to get any information from our sharepoint online server. I tried a lot of libraries but nothing worked for me. |
I had the same error because sharepoint was redirecting for authentication to the on-prem STS/ADFS. We created a new O365 user directly in O365 so it doesn't use the redirect to the on-prem STS/ADFS. This resolved the error 👍 |
I switched to sharepy, which runs ootb and covers my conditions |
Same here: Any luck from others? |
Maybe the following helps to narrow it down further. I can successfully authenticate on the general sharepoint URL, but not on a URL that is pointing to a specific teams-channel. The following bit of code works fine:
But when I replace the URL with:
then I get the following error::
Any work-around appreciated - in my browser I can see both of them just fine. |
We found a workaround for the above use case. Just use the base url for getting the base_url = "https://COMPANYNAME.sharepoint.com/"
ctx_auth = AuthenticationContext(url=base_url)
if not ctx_auth.acquire_token_for_user(username=user, password=password):
sys.exit('Error in getting token - quitting')
url = base_url + "sites/TEAMSCHANNEL/"
ctx = ClientContext(url, ctx_auth)
..
.. |
Hey guys! Since the moment when this issue was reported until now the following improvements/bug fixes have been made in terms of support for SAML-based federated authentication with SharePoint Online:
So, the provided error should no longer occur, just make sure to grab the latest version ( |
I'm trying to download a file which is accessible (via a browser) on this URL:
https://test.sharepoint.com/sites/team/team documents/subfolder/document.docx
I'm using a ClientRequest object with the following code:
On running this, I'm getting the following trace:
Is there something wrong on how I use the module?
The text was updated successfully, but these errors were encountered: