AberrationSpotter error

Linwood

Well-known member
I'm exploring and tried running AberrationSpotter, it immediate fails with:

Code:
pjsr --reset

run --execute-mode=auto "C:/Program Files/PixInsight/src/scripts/misc/AberrationSpotter.js"

Processing script file: C:/Program Files/PixInsight/src/scripts/misc/AberrationSpotter.js
Couldn't read setting 'aberration_spotter/hsize'
Couldn't read setting 'aberration_spotter/vsize'
Couldn't read setting 'aberration_spotter/show_center'
Couldn't read setting 'aberration_spotter/sep'
Couldn't read setting 'aberration_spotter/bgcolor'
*** Error [000]: C:/Program Files/PixInsight/src/scripts/misc/AberrationSpotter.js, line 384: Error: Settings.read(): invalid argument type: integer value expected.

Notice I did the reset first.

I'm on windows 10 x 64 pro (patched), PI 1.8.8-9 (2021-09-02)
 
this does not happen to me, but the error you are seeing indicates that the settings that AberrationSpotter.js has saved in the PI preferences file are somehow corrupt.

<key>000.ScriptData.aberration_spotter.bgcolor</key>
<real>0.25</real>
<key>000.ScriptData.aberration_spotter.hsize</key>
<integer>270</integer>
<key>000.ScriptData.aberration_spotter.sep</key>
<integer>50</integer>
<key>000.ScriptData.aberration_spotter.show_center</key>
<true/>
<key>000.ScriptData.aberration_spotter.vsize</key>
<integer>150</integer>

those are the settings that are saved in my preferences file. you can see the types there and maybe you can compare with yours and see what is different.

rob
 
I'm feeling particularly slow this morning... where can I find that file? I've looked in the profile under pleiades (not an xml, has no abberation-spotter), and searched for all sorts of name combinations. I changed global preferences and searched based on modify time and file contents.

By the way, to my recollection (which may be faulty) I never ran that program before. As I said, was just exploring things never used.
 
i think on windows the file is called PixInsight.ini and is in "AppData\Roaming\Pleiades" in your home directory. i think... i just got that from the forum as i don't use windows.

i guess it could be a bug in the script, but did you search for "abberation-spotter" or "aberration-spotter"?

rob
 
On windows the file is not XML for one thing, it looks like this:

Code:
[000]
StartTime=2021-10-03T16:12:18.198Z
Global\FileDialogs\Modules\GetDirectory\LastDirectory=T:/Stage/Rejects
Global\Preferences\ProcessInterface\Preferences\TranslucencyActivationEffects=true
Global\Preferences\ProcessInterface\Preferences\VisibleOnAllWorkspaces=false
ModuleData\Global\Interfaces\Preferences\Geometry\Left=820
ModuleData\Global\Interfaces\Preferences\Geometry\Top=288
ModuleData\Global\Interfaces\Preferences\Geometry\Width=710
ModuleData\Global\Interfaces\Preferences\Geometry\Height=737

(And goes on for 7040 lines). And yes, I can't spell, but more importantly it appears without an underscope or (sort of) dash:

Code:
Global\FeaturedScripts\0023_FilePath=@@pxi_src_dir/scripts/misc/AberrationSpotter.js
Global\FeaturedScripts\0023_MenuItem=Image Analysis > AberrationSpotter
Global\FeaturedScripts\0023_Description="A simple script that creates an image containing the corners and, optionally, the center of another image. Useful to highlight the aberrations of the optical elements used.<br><br/><br/>Copyright &copy; 2007-2017 David Serrano"
Global\FeaturedScripts\0023_ScriptId=
Global\FeaturedScripts\0023_IconPath=aberration-spotter.xpm
Global\FeaturedScripts\0023_ExecutionCount=3
Global\FeaturedScripts\0023_FirstExecuted=2021-10-03T03:22:39.924Z
Global\FeaturedScripts\0023_LastExecuted=2021-10-03T03:24:40.073Z

But that looks like something different from yours, which makes me think I'm in the wrong place.

I did search again just for the word "spotter" which I have a bit more likelihood in spelling right. It found the PixInsight.ini above, but nothing else (based on modify date).

I also searched the registry for "spotter" thinking it might store itself as a class definition or something. I see it as an installer object but nothing that look like preferences.

Anyone on windows have it working? Or know where to find this file?
 
no - you are looking at the right file, i think. the global\featuredscripts\0023 entries are what puts AberrationSpotter in the script menu.

later on down the line there should be saved settings for various scripts.

if nothing is saved in the ini file for aberration-spotter, then as you say it's never been run before. i'd have to read the source but it seems like its trying to restore settings that don't exist. there should be a try/catch around the code that gets the settings.

rob
 
well i read thru the code - it does have the proper check for if the settings read was OK, but it is not checking if the type of the current retrieved setting is what it is expecting, which seems to be the problem. having said that, there should be no settings to retrieve so it's hard to understand what is happening without instrumenting the code.

one thing you might try is to tick "delete settings and exit" and then click OK in the interface, but before doing this i'd do the following:

1) quit pixinsight
2) back up the pixinsight.ini file somewhere safe
3) start PI, then run AS and try ticking delete settings and exit.

then try to run the script again. if it works, great!

then quit PI and start again and make sure everything still looks OK (all modules there, all scripts there). if not, quit PI again and restore the copy of the .ini file.

i'm worried that if the ini file is somehow corrupted that trying to delete the settings for AS might clobber the file.

if you want to debug it further i could probably put some printfs() into the script to see exactly what parameter it is unhappy with and why it even thinks it read a parameter from the ini file.

rob
 
I'm more than willing to help debug, I even know enough js to probably edit and change the file, but you lost me entirely on the "delete settings and exit" (Where would I find that) and I'm unclear if the "Global Preferences" and "Settings" are different -- I definitely do not want to lose my preferences - MANY changes not recorded. Which reminds me, I wish I knew where they were so I could back them up, are they in that pixinsight.ini file? Do I just drag a triangle off the global preferences to create a process icon and save it?
 
the script has a tickbox that says "delete settings and exit" - that's what i'm referring to. i'm thinking it would clean up the problem.

yes all the PI settings are stored in that .ini file but ticking the box in the AS interface and clicking OK in theory should not mess up the .ini file. but since something is already clearly wrong somewhere, it seemed prudent to me to back up the .ini file first.

rob
 
Wait... wait.... Sorry, I didn't have an image open that time.... backing up that file and trying again...
 
OK, now that's just plain weird. now it works. (Not very interesting result but it works).

Image specific error?

I have no idea. I wanted to recreate the problem before checking the box, and now it works.

Sorry for the diversion, but if it happens for someone else maybe there'll be a clue here.
 
interesting, could be. though i was testing it on an RGB image and i suppose most people use it with a mono image. maybe you had an image with an alpha channel open?

it makes sense that the dialog never opened for you, but that didn't occur to me since it's working for me... lol

rob
 
Just tried RGB. I don't even know how to make an alpha channel. o_O

I think when it first failed I had a mono image open.

I don't recall which image, but went back through the recent image list and tried several and it worked on all.

Not sure. no PI updates, haven't rebooted windows. 128gb machine that was basically idle, so nothing competing for resources. No clue. Sorry for the diversion. Glad I actually had a copy of the error or would doubt my memory.
 
strange. well, there's also AberrationInspector which pretty much does the same thing... two different authors.

rob
 
Yeah, I had used that often. Alphabetically first. ;)

I was just out exploring trying to avoid the 7th pass on trying to get the bubble nebula right.

Thanks again.
 
Back
Top