-
Notifications
You must be signed in to change notification settings - Fork 411
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
"Protocol not provided to Api Component" when copying files from a shared OneDrive #1048
Comments
This makes no sense. In order for CopyOperation to work, it needs a connection object. The connections objects comes directly from the parent attribute (or con if provided but it's not provided from driveitem.copy): Line 148 in 417d8cf
So parent can't be None or otherwise the connection will be None and the whole copy operation becomes impossible. Are you sure self.drive is None from the driveitem that executes the copy method? This must be something else. |
First of all: Thank you so much for your time and the effort you put into this project! It is really appreciated. I think Line 790 in 417d8cf
The latter one is Maybe the connection object is taken from the parent, but the protocol information is taken from |
Can you provide the code on how you get the shared driveitem please? |
I have a problem copying files in a shared OneDrive.
Error Description
When attempting to copy files from one directory to another in a shared OneDrive using the following Python code:
The following error is encountered:
It is worth noting that despite the error, the copy operation still succeeds.
Steps to Reproduce
Origin of the Error
Upon inspecting the source code, it was discovered that the protocol is set within the CopyOperation class:
This is invoked from the
DriveItem.copy()
method with the argumentsCopyOperation(parent=self.drive, ...)
. Further investigation revealed thatself.drive
is set to None.Workaround
A temporary workaround for this issue is to wrap the copy statement in a try/except block.
Question
Is there a more elegant solution to address this problem?
The text was updated successfully, but these errors were encountered: