Pollination Installing Error

During Pollination installation this jumped out, I clicked Retry, the engine said installation successful but there’s nothing found in
C:\Users<ins>dsung\pollination\plugins\

in the installationlog.txt, it reads like this,

[46743] Operation “Execute” with arguments “C:\Users<ins>dsung\pollination\python\python.exe; @TargetDir@/python/setupPlugin.py; install; UNDOEXECUTE; C:\Users<ins>dsung\pollination\python\python.exe; @TargetDir@/python/setupPlugin.py; uninstall” failed: Execution failed (Unexpected exit code: 1): “C:\Users<ins>dsung\pollination\python\python.exe C:\Users<ins>dsung\pollination/python/setupPlugin.py install”
[46743] installationErrorWithCancel : Installer Error : Error during installation process (finish):
Execution failed (Unexpected exit code: 1): “C:\Users<ins>dsung\pollination\python\python.exe C:\Users<ins>dsung\pollination/python/setupPlugin.py install” Retry|Ignore|Cancel
[62410] perform finish operation: Execute
[62412] - arguments: C:\Users<ins>dsung\pollination\python\python.exe, C:\Users<ins>dsung\pollination/python/setupPlugin.py, install, UNDOEXECUTE, C:\Users<ins>dsung\pollination\python\python.exe, C:\Users<ins>dsung\pollination/python/setupPlugin.py, uninstall
[62422] C:\Users<ins>dsung\pollination\python\python.exe" started, arguments: "C:\Users<ins>dsung\pollination/python/setupPlugin.py install
[62552] Warning: Is install: True\r\n
[62553] Done
[62563] Writing maintenance tool: “C:\Users<ins>dsung\pollination/maintenancetool.exe.new”
[62563] Writing maintenance tool.
[63102] Wrote permissions for maintenance tool.
[63278] Maintenance tool restart: false.
[63281] Installation finished!

Thanks!

Hi @song-dee

Could you try to run following command in the CMD, and we should be able to find out the real reason that failed?

C:\Users\dsung\pollination\python\python.exe C:\Users\dsung\pollination\python\setupPlugin.py install

It says installed?

C:\Users\dsung>C:\Users\dsung\pollination\python\python.exe C:\Users\dsung\pollination\python\setupPlugin.py install
Is install: True

But still nowhere to be found on GH ribbon, and there’s nothing under C:\Users\dsung\pollination\plugins
if there’s where the .gha files supposed to be?

You should be able to find a folder “Pollination” in here:

%appdata%\McNeel\Rhinoceros\packages\

Here is what it should looks like: (if you have Rhino7, then you should find it in 7.0 folder)
image

I have both 6.0 and 7.0, neither of them have this pollination folder inside…

Could you check if C:\Program Files\Rhino 6\System\yak.exe exist on your system?

If yes, could you try to replace this new setupPlugin.py with the one in your pollination\python folder, and run following command again?
setupPlugin.zip (1.7 KB)

C:\Users\dsung\pollination\python\python.exe C:\Users\dsung\pollination\python\setupPlugin.py install

Thanks for trying, but I followed through and it is still not installed.

I have yak.exe in both \Rhino 6\ and \Rhino 7\ folders, I used the new setupPlugin.py and ran the command, it says “Is install: True” again but I still don’t have it and the \pollination\ folder is not created under \McNeel\Rhinoceros\packages\ either.

Thank you.

Hi @song-dee,

Ok, I guess we will need to do more checks here:

1. Check Rhino installation path:

Could you confirm that you found the yak.exe in following exact path?

C:\Program Files\Rhino 6\System\yak.exe
C:\Program Files\Rhino 7\System\yak.exe

2. Check user’s environment variable:

Run following commands

C:\Users\dsung\pollination\python\python.exe
import os; print(os.environ[‘APPDATA’])

You should get C:\Users\dsung\AppData\Roaming on your side.
Here is what it looks like on my machine.

3. Check Rhino’s package folder:

It should be following paths on your side:

C:\Users\dsung\AppData\Roaming\McNeel\Rhinoceros\packages\6.0
C:\Users\dsung\AppData\Roaming\McNeel\Rhinoceros\packages\7.0

4. Install it again:

First: please let me know if you find any of above paths that doesn’t match what’s on your machine, in case you installed Rhino to somewhere else.

If the same error pops up again. Don’t click any button, and do following:

  1. Download this updated file setupPlugin.zip to replace the one in your C:\Users\dsung\pollination\python.

  2. Run command:

C:\Users\dsung\pollination\python\python.exe C:\Users\dsung\pollination\python\setupPlugin.py install

This is what it runs on my side if everything runs correctly:

Hope this will help to find the issue.

1 Like

Hey @mingbo, thank you for this thorough stepbystep.

  1. I can confirm having both

C:\Program Files\Rhino 6\System\yak.exe
C:\Program Files\Rhino 7\System\yak.exe

However in Step 2, when I type in the command you gave me, I did not get C:\Users\dsung\AppData\Roaming line.

I do have both paths on Step 3.

Could that command line be the cause? How do I fix it? Thank you!

Ok, I think we have found the issue here.

Could you try type %Appdata% in your file explorer to see if it jumps to C:\Users\dsung\AppData\Roaming automatically? If not, then I think you have changed some Windows’ system variables. I just Googled and here is a post for how to fix it (note: I have not tested, but it should work)

image

Thank you for investigating! when I type %Appdata% if does jump to C:\Users\dsung\AppData\Roaming and I don’t have to fix it though!

Thanks for your updates,

Now I think this is something related to the Python. @mostapha do you have any idea that why os.environ[‘APPDATA’] doesn’t work on @song-dee’s machine while %appdata% is a valid environment variable?

Hi @song-dee, Did you press Enter after typing the command? It should either give you an empty string or a value.

image

Looks like in our case it hasn’t been executed. And you can type it in two separate lines like this:

import os
os.environ['appdata']

@mostapha I typed in two separate lines and it worked! Back to @mingbo’s step 4, I typed in

C:\Users\dsung\pollination\python\python.exe C:\Users\dsung\pollination\python\setupPlugin.py install

But got an error result as follows…
Failed to find: C:\\Users\dsung\pollination\plugin

I do have a \plugin folder there though.
Sorry for having no ability to write/read code and have to report back here!


Edit:
I just realized the default generated folder is called \plugins not \plugin, so I changed that.
But still not installed…

“No rhino found” is quite discouraging.


Edit 2:

Could this be folder naming issues too? My folders are actually named Rhinoceros instead of Rhino But I dare not change the folder names this time in case of other plug-ins are referencing here. Is it something in the .py can change? Many thanks

C:\Program Files\Rhinoceros 6\System\yak.exe
C:\Program Files\Rhinoceros 7\System\yak.exe

Ok, this is the real issue here. I don’t know how you get following paths which are not the path that Rhino documented.

Let’s forget everything now, and here is the updated setupPlugin file that works with your Rhino paths.
Please do following steps:

  1. Download and unzip setupPlugin.zip (1.7 KB), and use new setupPlugin.py to replace C:\Users\dsung\pollination\python\setupPlugin.py

  2. Remove both plugin and plugins folders under C:\Users\dsung\pollination\ if any.

  3. Download plugin.zip (1.0 MB) and unzip all files to C:\Users\dsung\pollination\plugin. (note: make sure to unblock the zip file before unzipping)
    This is what it should look like in your C:\Users\dsung\pollination\plugin
    image

  4. Run this command:

C:\Users\dsung\pollination\python\python.exe C:\Users\dsung\pollination\python\setupPlugin.py install

@mingbo, Thank you for being on top of this issue.

Don’t we get the path to Rhino installation (and yak) from the System registry? Changing the path shouldn’t really create an issue for us. Right?

No I didn’t use the registry for getting yak. I think I will change it in the next release. @mostapha

1 Like

This worked! Pollination is installed! I am so happy that I am going to explore it! Thank you @mingbo and @mostapha.

As of my folder names spelt out Rhinoceros, they were autogenerated though! Still it’s good to bring some possible cases like mine to light early on?

1 Like

Absolutely! Thank you for being patient with us and helping us with finding the bug. As @mingbo mentioned it will be fixed for the next release.

Hi @mostapha, @mingbo, I think I’m having a similar issue with installation. For me the installer runs fully and successfully but when I open GH Pollination doesn’t appear in the GH ribbon.

I’ve tried the steps above (not including Mingbo’s step with the new .zip files) and everything appears to be set up correctly.

I’m probably on the way off here - but overhearing some other Ladybug Tools discussion in our office, there might be some potential issues with how our company’s systems deal with home folder, defaulting ours to H drive. They linked me to this post here What is the correct cross-platform way to get the home directory in Python? - Stack Overflow

Adding a little more context - when I run Command Prompt from search it default opens to H:. To get around this and test the steps above I opened C drive in file explorer and typed cmd into the top bar
image
image

Please could you help me fix? Thanks!