BUG - Import Content HIGHLY! unreliable

We are considering upgrading the whole company from V7 to V9 and I started making preparations.

I have quite a script (one of many) where I am using Import Content multiple times - 11 to be specific (10 of them are visible here, circled green).

First load (script launch): 4 / 11 fully load the content

1st recompute: 8 / 11

2nd, 3rd, 4th recompute: 10 / 11

5th recompute: 11 / 11

Summary: It took me to recompute the solution 5 times to get where Human in V7 takes me instantly and ALWAYS (I have never experienced issue of this kind).

I have been reporting this issue first days Import Content was available, seems nothing has changed over the years, only some vague answers ā€œit works for usā€.

This is the exact reason I halted upgrade V7 to V8 for a whole company. Don’t make me do it for V9.

Please treat is seriously. My previous post about offset bug got completely ignored.

PS I restarted the script and recomputed it ca. 10 times, still one mf won’t work

+1 to this, I have also started running into issues with import content

Can this please be looked into?

Are you able to share this script here or upload it anonymously here @Piotr? System info would also be excellent in helping me repro and ticket this bug :slight_smile:

Hi Callum

This is huge: GH script + 2 Excel files + 850 Rhino files - shrinking to some usable fragment would cost me a day or so.

I will try to make a zip package of the whole solution and send it to you. Please give me some time.

I could reduce 850 to 50 required to run the script without hiccup, but what if the problem lies in the size of the library? You will have to figure this out.

PS system info has nothing to do it. It happens on my two machines which were built 8 years apart, and run on a different systems.

Ah. That’s A lot of stuff. If you could create the smallest possible example of it failing that would make testing and fixing much easier for us.

I’ve been there before. I have a very large definition too which imports dozens of files in Grasshopper. In my case the Import Model Block component fails randomly and usually my quick fix is to copy paste the component and then it works again. I have tried to create a reduced sample file but the import never failed on a small file here.

If this is unrelated feel free to delete.

I can imagine. If a smaller example can’t repro it, that’s fine, but of course, the smaller the better

You should have all the info by now. You need TT2 to read the excel files. Rest can be ignored.

I asked about this internally and tried reproducing. One thing that is important to note is that Rhino 8/9 runs in dotnetcore by default which is a bit different and may have issues. You’ll want to be running in dotnet framework for that script as it’s using COM interop forExcel. SetDotNetRuntime is the command you need.

Changing the runtime does not make a problem go away. It is as bad as before or even worse as only 3 / 11 are loaded.

Besides, are you going to ask each user to fiddle with this setting to make the component work? I strongly advise to rewrite it, or find Andy and ask him how he did it, put some money on the table and take his solution.

Also, as far as I can see, TT2 reads all data from Excel with no problem at all.

I’m trying to repro your bug, find it and get it fixes, I’m suggesting things that may help you resolve your problem for now in case a bug fix takes time. If you see no difference between netcore and netfx that is useful information for us.

I have tried different scenarios: with Excel closed or opened. I tried launching the script and loading the blocks with another True trigger. Nothing makes change.

Usually, pressing recompute multiple times makes them all work, but, sometimes, the one that worked before recomputing turns red after. There is no visible logic to it.

One thing is constant - the Import Content with only one article (always the same) to load never fails.

@CallumSykes the import content component is proving to be highly unreliable. A grasshopper script I was working on just crashed and when I reopened it, the import content component no longer imports and just gives a ā€œFile could not be readā€ error message. I have no idea what is wrong and how to diagnose the error. It genuinely seems to be working by some randomness as you can see from this screenshot:

I have uploaded relevant stuff on this link. Please let me know what can be done, this component is highly pivotal for our workflows and these constant problems are starting to become a real pain.

This is being looked into for 9, but I notice you are on 8, I’ve created you a separate ticket as I believe it is a separate issue that needs addressing.

https://mcneel.myjetbrains.com/youtrack/issue/RH-91832/File-could-not-be-found-but-file-exists-Import-Component

Nope, this is entirely V9. I have never done anything in V8, I stayed as long as possible in V7 then moved directly to V9.

One more instance @CallumSykes

This time I noticed that it happened after I asked my colleague to make changes in the .3dm on her system and save the file. I reconnected the Boolean Toggle to the Import Content that is on the bottom and it gave an error. The error did not go away even after restarting the file.

I had to put a new Import Content and not expose the Import Boolean and click on the default Import Button and then it finally worked…

For me, copy paste the component and reconnect the output works to fix the issue

Guys, check the new WiP. It solved the problem for me.

Looks promising. One of my big definitions which always had at least one issue with either of the input components loaded fine now.