MMT scripts gives syntax error

The Scrips works great in V5.5 but this Exception massage comes up on all of them in the WIP.
Is there something small that needs to be changed? [purhaps in the Aliases list?]

thanks a lot

Hi @Akash-

Sorry for the delayed reply. Can you please share the script (or a version of the script) that demonstrates this bug?

This sounds like my collection of scripts, which are run from aliases… The problem on Mac has always been having a consistent the path to the user directory without knowing the username. I don’t know anything about Mac file systems, I was simply told that I could set up the aliases as follows:

! _NoEcho _-RunPythonScript "./MMT/ScriptFileName"

The MMT folder that has all the scripts is located inside
~/Library/Application Support/McNeel/Rhinoceros/Scripts

So, I don’t know why it has stopped working in the WIP…

now checking I saw that the Aliases list was empty in the V6Wip [thought it was supposed to go through automatically from V5.5…
so I did export import manually now, but the list stay empty even as I got a message saying the Aliases were imported successfully,

there should be many in there not only Helvetosaur’s scripts but other ones using the same path ~/Library/Application Support/McNeel/Rhinoceros/Scripts

  • I tried to run the RunPytonScrip command but was unable to navigate to this location only the V6 Scrips which is empty.
    Do I need to copy all the scrips to this new location?

thanks a lot

Hi @Akash and @Helvetosaur I know this is an old one but I just tested in the Rhino 6 for Mac Beta and Aliases are automatically transferring from Rhino 5. Import of a v5 exported alias txt file also works and doesn’t create duplicates if identical aliases already exist. Let me know please if you still have this issue. Thanks.

Hi Brian
I get this error massage,
I put the scrips in the Library / mcneel /rhino/ scrips folder, [after a recent clean reinstall of the MacOS]
I seems to remember that is the correct location…?

thanks a lot

This is the default location the Rhino 6 for Mac Beta looks when running RunPythonScript
/Users/YOUR USER NAME/Library/Application Support/McNeel/Rhinoceros/6.0/scripts/samples

But I think you can put them anywhere and Rhino will recall the last used folder location the next time you run the command.

Can you share the script that causes this exception? I think one of the scripting gurus like @pascal will need to take a look.

In the case of those, the MMT folder must be saved inside the default scripts folder - the aliases are hard coded for that.

Sure James
here it is: [only to say that the problem here is with all the scripts running of an Alaises! not just that one or the MMT collection ]
Great script Created by Helvetosaur that used to work in V5 with this Alaises
Aliases%20path (1.1 KB)

thanks a lot

This script works off an Alias here using the Rhino 6 for Mac Beta but I used the whole pathname…
! _-RunPythonScript “/Users/brianjames/Library/Application Support/McNeel/Rhinoceros/Scripts/samples/”

Does that work for you? Change the user name of course in the path to test. Thx

Hey Brian,

Yeah, the whole thing on Mac was to have the aliases work for everyone - otherwise the user has to change like 100 of 'em. At the time I created this, the path ./ was supposed to always lead directly to the user’s scripts folder. Apparently it doesn’t work anymore.

All this because on Mac there is no way to specify a path to a folder where python scripts are stored like you can in Windows in the the python script editor options.

I’m checking what has changed with the paths but the MMT folder may need to be
~/Library/Application Support/McNeel/Rhinoceros/6.0/scripts
notice the 6.0.

To check:

import sys

for p in sys.path:
  print p

Hi Brian
I tried as you suggested and it works!

Hi Alain, thanks for looking into this. It doesn’t work here just with ~ before Library, it wants the whole path as Brian wrote.
and without the 6.0

Thanks a lot

What I meant was that if the MMT folder is in the
~/Library/Application Support/McNeel/Rhinoceros/6.0/scripts
folder, i.e.,
~/Library/Application Support/McNeel/Rhinoceros/6.0/scripts/MMT
then the alias:
! _NoEcho _-RunPythonScript "./MMT/ScriptFileName"
should work providing that
~/Library/Application Support/McNeel/Rhinoceros/6.0/scripts is on the path. Confirmed by:

import sys
for p in sys.path:
  print p

Hi Alain
I’m not sure I understand …
how to run that script? and from where?
unfortunately I don’t know Python, I just copy paste recommended scrips that people kindly share.
[for now I have manually added the whole path to all the scripts]

thanks a lot

Hi Alain,

I can confirm that this works now, one just needs to copy the MMT folder to the new location


Cheers, --Mitch