Spurious warning message when running a modified script


#1

In V6, I am now often getting warning messages like the following when running a script I am developing - after having opened an existing script and modified a few things, then run to test (without saving first).

image

And this when I only have one instance of Rhino open, and do not have the script open anywhere else. If you answer “Yes” it reverts all changes since the last save…

–Mitch


(Dale Fugier) #2

Hi @Helvetosaur,

Never seen this. I don’t suppose you can provide us a way to repeat?

– Dale


(Willem Derks) #3

Hi Dale,

to repeat with a file that is actually edited in another application:

Create a file in the scripteditor and save it somewhere.
Open the file with another application, edit it and save it.
Coming back to Rhino the message appears:


#4

That I could understand, and would not be a problem. However, this happened when I had only one instance of V6 open and one script file that I was modifying… I actually got two different messages, one was even longer than the one I posted, it was on the clipboard ready to post, but i accidentally overwrote it…


#5

@dale Yep, easy, figured it out…

  1. Open a simple script that already exists in the editor
  2. Run it once
  3. Use SaveAs to save the script under a new name (the original is closed and the copy with the new name is active in the window)
  4. Run the newly-named script - you will get the dialog popping up (here at least)

(Alain Cormier) #6

Trying to reproduce this. No luck so far.


#7

Here’s what happens over here…


(Alain Cormier) #8

I see that you’re saving in a dropbox folder and my 1st guess was that dropbox was doing something to the file but I still can’t reproduce the problem if I save to dropbox.

If you save somewhere else do you still have the problem?


#9

It doesn’t appear to be a problem if I save to the desktop. So maybe Dropbox is the problem - seeing as it is also perhaps implicated in some of the other file saving problems that are being reported… This was never a problem with V5…

Unfortunately, I have my entire script library in Dropbox…


(Alain Cormier) #10

Unfortunately, I have my entire script library in Dropbox…

Of course you shouldn’t have to stop saving to Dropbox.

I suspect it’s a combination of dropbox and how the main Rhino window and Python editor are going in and out of focus. Would you mind sharing your file and script in hope that I can reproduce the problem?


#11

Here’s the script -

RotateObjsAroundBBCtrAxis.py (629 Bytes)

The file can be any kind of object, I just made a random surface to verify that the script was flipping the object in the right direction.


(Alain Cormier) #12

I can reproduce the problem with your file. Thanks!

Being prompted to reload files if they were modified by another editor was a feature requested for Rhino 6 and that’s why you don’t have the problem in Rhino 5. Worst case if there’s no reasonable way to fix these edge cases we can provide a setting to turn the feature off.


#13

Aha! Wonder what’s different about my file…? Anyway, thanks for testing! --Mitch


(Alain Cormier) #14

Don’t know yet.


(Alain Cormier) #15

This specific case of saving to Dropbox combined with text editor UI goes in and out of focus causes the system to fire a ‘change’ event even though the file hasn’t changed. It can be hard to control these edge cases so I added an option to disable the feature. See RH-44567


(Brian Gillespie) #16

RH-44567 is fixed in the latest Service Release Candidate