Skip to main content
Question

Moving folders using Python API causes cyclical_folder_structure error

  • May 22, 2025
  • 2 replies
  • 18 views

Forum|alt.badge.img

Here is what my directory structure looks like:

/Base
   - /Archive
   - /Folder
         - /Files in folder i want to move

When I use the update folder API as such:
      client.folder(Folder.id).update_info({
          'parent': {'id': Archive.id}
      })

I get a cyclical_folder_structure error. Am I missing something? Moving the file manually works fine. Thank you

2 replies

Forum|alt.badge.img

To clarify, I want to move Folder and all its contents to Archive. This also seems to happen trying to copy Folder into Archive


Forum|alt.badge.img

Hi , 

 

The main reason that the cyclical_folder_structure error comes up is because the move itself would create a cyclical structure (most likely where you're archiving it to). In short, the folder might be moved into a subfolder of itself. This can be a bit confusing when it comes to shared folders - if you take a look through the folder structure you're trying to move and the folder structure you're trying to move to you should probably see where that cyclical structure is coming from. 

 

- Jon