Page 1 of 1
Error with menu
Posted: Sun Feb 08, 2026 6:08 pm
by Jean-Francois
Hello,
All my scripts with the "menu" custom button are not more working.
The following message appears:

- Custom_button_error.jpg (57.05 KiB) Viewed 713 times
I tested with 4.1.14155, but it appears with 4.1.14136 too, maybe earlier.
In addition ... my script UCAC4 is not more working from the script console in 4.1.14155.
I tested the UCAC4 script with 4.1.14136 ... it is still working with the older version.
The Plate Solve coordinates are OK from the version 4.1.14136, but they are completely off with the 4.1.14155.
For the M42 image ... normally at around (5;-5) my script received the coordinates (2.5;17.8).
Jean-Francois
Re: Error with menu
Posted: Sun Feb 08, 2026 6:25 pm
by Jean-Francois
Hello,
I tested on my laptop with older version ...
all fine with 4.1.14031 or before ... but the first time problem with the menu custom button is with the version 4.1.14120.
What changed in the script between 14031 and 14120 ?
Jean-Francois
Re: Error with menu
Posted: Mon Feb 09, 2026 1:40 pm
by admin
Hi Jean-Francois,
thanks for working out the version range for the problem - what happened in that range was that I tried to improve the way that the python scripting was cancelled if you press the 'Stop' button to stop a running script. I wouldn't have expected anything changed to do that to have had any effect on normal running (ie if you are not pressing stop), but aside from some supposedly 'safe' code tidy ups (generated by code analysis tools) there is nothing else to blame.
I will have a dig and see if I can get that fixed for today's update.
cheers,
Robin
Re: Error with menu
Posted: Mon Feb 09, 2026 2:27 pm
by admin
Hi,
just a quick update - I am still not 100% sure about the cause, but I have a workaround for you.
In your scripts, shift the class definitions out of the functions up to the main level, so that the classes are defined when the script is first run (even if they are not used at that point). As an example, I shifted the
Code: Select all
class UCAC4_MenuForm(Form):
.... many lines of class body ....
out of the launch_UCAC4_form() function to put it just above and then it all works fine. I think that something has changed about the way that the custom button code is being run that means it is unhappy about defining new types in response to that code. Still trying to work out why...
cheres,
Robin
Re: Error with menu
Posted: Mon Feb 09, 2026 5:07 pm
by admin
Hi,
should be fixed with the latest update - it turns out that my clever new way of cancelling the script left the runtime in an odd and somewhat broken state when I tried to turn it off at the end of a run. If I don't turn it off and leave it in place but deactivated then all is fine.
cheers,
Robin
Re: Error with menu
Posted: Mon Feb 09, 2026 9:10 pm
by Jean-Francois
Hello Robin,
Yes, it works back with the last version of today.
And the UCAC4 stars coordinates are OK again.
No idea why it was not the case with the preceding version.
Jean-Francois