Got error while updating butterfly

I got the following error while trying to update butterfly:

The text of the error message is:

Downloading butterfly repository to C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts
Copying butterfly source code from C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly-master\butterfly to C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly
Downloading butterfly-plus repository to C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts
Copying butterfly source code from C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly-plus-master\butterfly_grasshopper to C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly_grasshopper
Runtime error (Win32Exception): WindowsError
Traceback:
  line 157, in makedirs, "C:\Program Files\Rhinoceros 5 (64-bit)\Plug-ins\IronPython\Lib\os.py"
  line 174, in copytree, "C:\Program Files\Rhinoceros 5 (64-bit)\Plug-ins\IronPython\Lib\shutil.py"
  line 84, in installButterfly, "<string>"
  line 110, in script

May I ask the source of this problem here?

Thanks.

Hi @Grasshope! The WindowError is one of those exceptions that can happen when Windows fails to create/delete a folder or file. Most of the time it is a permission issue. Can you remove ``C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterflyandC:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly_grasshopper` manually and try again?

1 Like

Thanks, Mostapha.

I followed your suggestion but it was not successful.

Then, I noticed that I have the following three folders in the script directory, so I deleted all three of them:

C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly
C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly_grasshopper
C:\Users\USER_NAME\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts\butterfly-plus-master
Image 4

  1. now the update is successful with no warning:

  2. However, the 3rd folder butterfly-plus-master is not installed:
    Image 6

I wonder

  1. how this butterfly-plus-master folder is installed previously?
  2. why the existence of this folder will affect the update?
  3. whether it is required to run butterfly?

Thanks.

The way the installation script works is to

  1. Download the butterfly and butterfly-plus repositories from GitHub.
  2. Unzip the files into butterfly-master and butterfly-plus-master.
  3. Copy the related files to butterfly and butterfly-plus folders.
  4. Try to remove the zip files and butterfly-master and butterfly-plus-master folders. Sometimes Windows keeps the files inside the folders open and doesn’t let the folder to be removed! That’s why you had the -plus folder in your directory.

To answer your questions:

  1. It wasn’t removed for the reason that I mentioned above.
  2. Because Windows system cannot overwrite the file that already exist without permission.
  3. No. It is not. Only butterfly and butterfly-grasshopper folders are required!
1 Like

Noted with many thanks, Mostapha.

Hi,
I did what Mostafa said but I still have some outdated components like: gradXYZ as shoen below:
moreover, As there is no BF+ in Food4Rhino and I just downloaded it from Git how could it be run ? whether it is a union plug_in like HB+ or its in the BF.Canvas at 17;19;01

That is normal as far as the versions are the same. The date of component is the date that the component has been updated for the last time, and the last updated date for butterfly is the date that the source code has been updated.

1 Like

Hi Mostapha,

I’ve run into similar problems as EhsanFouladi describes. I tried following the same logic to fix the issue but with no luck. I’m stuck with the following error:

Other componets report: “Failed to import Butterfly”

Any ideas?