BUG - Python 3 - Script Component - No Module Named 'scriptcontext'

Hello,

I found a new bug in today’s build 09.28.23

Python3 Script Component error:

  1. Error running script: No module named ‘scriptcontext’

This unfortunately breaks all Python 3 scripts. RIP till next beta build :upside_down_face:

All other language versions including legacy R7 components appear to be unaffected.

Thank you all!

I saw this too yesterday but it went away after a restart of my machine.

2 Likes

Oh right, I forgot to restart, I’ll give that a go thanks Martin.

EDIT: restart did it thank you. The sad part is I probably would have installed next weeks beta build before restarting my machine. I need to be better about that :sweat_smile:

2 Likes

I pushed a fix for this so this should not happen again. I’ll test more today. Thanks for reporting.

There is the Tools → Advanced → Reset Python 3 Runtime command in the menus that resets the deployed runtime so on the next Rhino start, the runtime is set up from scratch. This should help solve these kind of problems but it’s great to report them here so I can fix them for good :smiley:

Thanks!

1 Like

Oh good to know @eirannejad , thank you! I’ll give that a try if I run into a problem again.

Much appreciated!

1 Like

Update: Resetting the Python 3 Runtime fixed the issue

Is this still an issue? I’m just converting an integer to a string. and I was able to execute the script properly with VScode.

1 Like

I’m sorry, having the very same issue here :slight_smile:

just updated to the last 8.0.23278.13003, 2023-10-05, things were going 100% ok until 10 minutes ago

When I opened Grasshopper the first time after the update, it took a lot of time bacause (I guess) was importing again all the plugins from v7

then GH started popping-up several gh-import-error-close-only windows (MANY of those)

and now if I start a Python script this comes up regardless of the content:

I have also tried Tools → Reset Python 3 (CPython) Engine → reboot → problem persists

[edit] it’s curios that I’m having an error on line 38 like @tay.othman even if I don’t have a line 38 :open_mouth:

[edit_2] the problem is still there even after uninstalling and reinstalling the full v8 BETA

Hi @inno ,

Don’t reset the Python engine. Reset the Python runtime.

Looks similar but further down on the tools->advanced settings below the reset python engine.

I reset both Python3 and IronPython, rebooted Rhino/GH and it took a moment to refresh the python runtimes in GH and then all has been well since!

1 Like

if I’m looking in the right place, then I think I’m missing some menu items :joy:

I’m on the last release btw…

probably I should try to uninstall, delete some magic folders that keep some weird data between installations, and install again?

I tried also uninstalling, deleting the folder called “8” from this location and installing again, no luck :slight_smile: C:\Users\user_name\AppData\Roaming\McNeel\Rhinoceros

image

[edit] well… looks like I found it in the pure Rhino ScriptEditor, I was indeed looking in the wrong place :slight_smile:

it works! THANKS!!!

1 Like

Yes you found it, I was confused too and sorry to have forgotten to mention that it was in the Rhino script editor version!

Glad you got it working!

print("You're welcome!")
2 Likes

This should really be fixed in today’s BETA release. There was something going on with updating the rhinoscript modules files that would delete the files but not copy the new files there and therefore the module would go missing.

Let me know if you still see this after today.

2 Likes

Sounds good, I’ll check it out, thanks @eirannejad !

1 Like

Anyone having this in the official release?

image

Shut down and restart your computer. Then try again. I think that helped in my case.

1 Like

Thanks @martinsiegrist, it worked! :slight_smile:

1 Like

I have made a series of fixes on this that will be available in Rhino 8.3 RC1. Hopefully no more missing scriptcontext

2 Likes