Python Upload Files To SharePoint Using Office365 Rest Package Part 2

  Рет қаралды 14,779

I am Lu

I am Lu

Күн бұрын

I have made a previous video on uploading files to SharePoint using the SharePlum package, but in this video we will be using the Office365 Rest Client package.
In this video we will add on to the office365_api file, by adding a function for uploading files.
I will be showing examples on how to upload files from local directory to SharePoint.
I will be added on to source code which can be find on my GitHub account (view below).
github.com/iam...
Sponsor video by:
goshareit.io
Support my Channel
www.paypal.com...
Book a 1 on 1 meeting with me at:
calendly.com/i...

Пікірлер: 45
@pythondeveloper4105
@pythondeveloper4105 2 жыл бұрын
Awesome video !! Great explanation, makes it easy to understand, great work as always. Thanks Lu 😀
@codingwithlu
@codingwithlu 2 жыл бұрын
Glad it was helpful!
@rodrigogomezmaleno1099
@rodrigogomezmaleno1099 2 жыл бұрын
Thank you very much! This was super helpful
@codingwithlu
@codingwithlu 2 жыл бұрын
You're welcome!
@imamsibromuhlisi1520
@imamsibromuhlisi1520 3 ай бұрын
thats a great job... thank you so much
@ProgramadorMetrindust
@ProgramadorMetrindust 4 ай бұрын
17/09/2024 y me sigue funcionando tu video tutorial, muchísimas gracias
@realynriano2144
@realynriano2144 2 жыл бұрын
First💕
@sachinsalve8332
@sachinsalve8332 2 жыл бұрын
Hey, It would be great if you make video about how to set the metadata in columns along with file upload.
@codingwithlu
@codingwithlu 2 жыл бұрын
Sure will look into this and make a video on it
@shawerahmed
@shawerahmed Жыл бұрын
can you please show us how to return the upload status code?
@yanglingtong6388
@yanglingtong6388 2 жыл бұрын
Thanks for this great video! I have one question, sometimes when I am uploading the files with python, and the other users keep the file with the same name open, then I cannot upload the file. Do you know any methods which can upload the file with the same name while other users are using the file? Because some colleagues are not from the same country, if they are on vacation, it is hard to tell them to close the file. I am updating the file locally with python script, so I need to download it, update it, and upload it to sharepoint all with python.
@codingwithlu
@codingwithlu 2 жыл бұрын
I'm not sure if there is a way to update the file if an existing user has it checked out (open). When you try to upload file in this case do you get an error message? If so can you share what that error message is?
@khoanguyen7647
@khoanguyen7647 2 жыл бұрын
hi Lu, I tried to follow your tutorial here and ran into this error with this line of code. Been trying to search the error but nothing useful comes up. target_folder = conn.web.get_folder_by_server_relative_path(target_folder_url) error: AttributeError: 'function' object has no attribute 'web'
@codingwithlu
@codingwithlu 2 жыл бұрын
Can you tell me which version of Office 365 API package you are using?
@steven12hv
@steven12hv Жыл бұрын
@@codingwithlu I'm using the current API package and I get the samer error (Office365-REST-Python-Client 2.4.1)
@TL-yd6bt
@TL-yd6bt 2 жыл бұрын
Is there a way to upload data to a column field with files or do you have to loop through the files and update the column after the upload? I need to link a (known) unique ID with all attachment.
@codingwithlu
@codingwithlu 2 жыл бұрын
Are you referring to uploading data to SharePoint List column? If so, what are you trying to upload? Is it the actual file to that column?
@TL-yd6bt
@TL-yd6bt 2 жыл бұрын
@@codingwithlu I am going to be uploading image files and I need them to have a primary key column to expose them in a Power Apps gallery. So I need to upload a file and metadata field.
@Juanpfrancos
@Juanpfrancos 2 жыл бұрын
Thank you 😃 How can i get link for share a Sharepoint folder?
@codingwithlu
@codingwithlu 2 жыл бұрын
Are you trying to get back a share link after file has been uploaded?
@Juanpfrancos
@Juanpfrancos 2 жыл бұрын
@@codingwithlu Yes i need a share link of uploaded file as response and a folder if is possible
@yashodiptakore7599
@yashodiptakore7599 Жыл бұрын
@@Juanpfrancos any luck with this?
@szymula
@szymula Ай бұрын
Im getting this error ConnectionResetError(10054, An existing connection was forcibly closed by the remote host
@maryvisuvasam8014
@maryvisuvasam8014 Жыл бұрын
Hi Lu, Greetings. I'm getting below error "Access has been blocked by Conditional Access policies. The access policy does not allow token issuance"
@rickmedlin5389
@rickmedlin5389 2 жыл бұрын
Lu, does the Office365 API let you export to MS Word documents?
@codingwithlu
@codingwithlu 2 жыл бұрын
Are you trying to download Word docs? If you you can upload/download any type of docs.
@rickmedlin5389
@rickmedlin5389 2 жыл бұрын
@@codingwithlu No, I actually want to create Word documents using the SharePoint API. I'm not sure if that is possible. I'm currently using docx. It's good but has some shortcomings.
@KevinLoughran-yx3tl
@KevinLoughran-yx3tl 2 жыл бұрын
Hi Lu, great video. I have one question. When I try to upload large file I get the error "Microsoft.SharePoint.Client.InvalidClientQueryException', 'The request message is too big. The server does not allow messages larger than 262144000 bytes.', "400 Client Error: Bad Request for url: " . Is there a way to upload larger files? Thanks
@codingwithlu
@codingwithlu 2 жыл бұрын
Yes there is. I have a video showing how to upload large files. Check it out kzbin.info/www/bejne/mJ2lnohui66GeLM
@smkplays007
@smkplays007 2 жыл бұрын
Hey Lu , I am getting error like : An error occurred while retrieving token from XML response: AADSTS53003: Access has been blocked by Conditional Access policies. The access policy does not allow token issuance. and I am trying on company SharePoint.
@ravivenkatatejamucharla1802
@ravivenkatatejamucharla1802 2 жыл бұрын
i am getting a similar issue, i am using my own trial sharepoint account
@codingwithlu
@codingwithlu 2 жыл бұрын
So this error relates to Microsoft blocking access due to conditional policies that have been setup by Admin in Azure Portal or Microsoft identifying the login connection as suspicious. Your Azure Admin should be able to provide some insights. They should be able to tell you if the company has policies in place that may be blocking your connection or if Microsoft is blocking it, the reason to why it is being blocked
@shanhuahuang3063
@shanhuahuang3063 2 жыл бұрын
HI Lu, in my case, it was a link on sharepoint, but i have to do some clicks to export the file. Then I got a .ipy file. There is a xml file inside the ipy file. After that it will automically to excel. In this case, how could I set up the connection string in python to pull data? would you mind share your email? thanks
@codingwithlu
@codingwithlu 2 жыл бұрын
Sure you can email me at contact@iamlu.net
@chrisparkinson9132
@chrisparkinson9132 Жыл бұрын
Hi Lu, when trying to upload a file I get this error: requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0). Do you have any recommendations? Thanks!
@saiarvind6829
@saiarvind6829 Жыл бұрын
Hey did you resolve the issue??
@Dhimanmadhur
@Dhimanmadhur 2 жыл бұрын
Hi Lu, I am using my username and password for authentication and getting the error as below. OS error, tunnel connection failed, is error, tunnel connection failed: 403 forbidden. We have a policy in place but no way to add an exception here. Please guide.
@jiarpa1
@jiarpa1 2 жыл бұрын
did you solve it?
@Dhimanmadhur
@Dhimanmadhur 2 жыл бұрын
@@jiarpa1 nope, its a certificate and proxy issue, we found that out but then moved to powershell from Python.
@jfwong1807
@jfwong1807 2 жыл бұрын
Hello, am using user authentication and I'm getting index error at this line.. assertion_node = dom.getElementsByTagNameNS("urn:oasis:names:tc:SAML:1.0:assertion", 'Assertion')[0].toxml() IndexError: list index out of range anyone face anything similar?
@chinmaybhatvb
@chinmaybhatvb 2 жыл бұрын
Yes I am facing exactly the same issue
@chinmaybhatvb
@chinmaybhatvb 2 жыл бұрын
Did you by any chance discover whats the cause?
@nataliesiqueira7462
@nataliesiqueira7462 2 жыл бұрын
Hi Lu, could you help me? I'm trying to access SharePoint with my login and password, which are authorized in principle. However, I can't access the SharePoint link. The error that appears is this: What can I do to fix this error? ShareplumRequestError: Shareplum HTTP Post Failed: 401 Client Error: Unauthorized for URL: sharepoint/site/xxxxxxxx/
@codingwithlu
@codingwithlu 2 жыл бұрын
Based on the error that you provided, is seems that you are using the SharePlum package. This video uses the following package "Office365-REST-Python-Client". Can you confirm the package? Does your code match what is in the video?
Upload and Delete file to Sharepoint with Python
44:55
I am Lu
Рет қаралды 42 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
Python SharePoint On-Premise Access List
16:42
I am Lu
Рет қаралды 10 М.
5 Tips To Organize Python Code
12:16
Tech With Tim
Рет қаралды 262 М.
Introducing Python in Excel
19:01
Leila Gharani
Рет қаралды 1,7 МЛН
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 422 М.
Authenticating with SharePoint Online using Python MSAL library
16:52
China announces retaliatory tariffs on US goods
5:29
Al Jazeera English
Рет қаралды 227 М.
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН