PlateSolve2 gives an error "unable to read image file (unspecified error)"

Hi, I am new to SGP and am getting an error on PlateSolve2.

Problem
What happens is that PlateSolve2 starts but does not seem to have an image to work on. It displays a popup message with the title “unable to read image file (unspecified error)”.
In the lower left is also states ‘no image’. So apparently when PlateSolve2 is being launched it cannot properly open the file.

Other posts on this forum
Before posting, I searched the forum and found 2 other similar cases:

Unfortunately, their aren’t any answers there. So trying again hoping someone might have solved this in the mean time.

Details

I am running SGP on Windows 10.
I tested with 2.6.0.17 initially.
After that I tried the beta version 2.6.0.21 which is giving me the same problem.

I see that the file is present however, and if I open it (using Nebulosity) it looks to be a perfectly valid file.
In the FITS headers I see the exposure length and binning also matches my settings from SGP.

What I also noticed from the logs it that there seem to be 2 different file names involved (plate_solve_image.fit and psXSolve_0.fit). I checked and both exist and appear to be identical.

Logs

[04/08/17 22:18:12.873][DEBUG] [Telescope Thread] Created full file name (file does not exist): C:\Users\rnoor\AppData\Local\SequenceGenerator\Temp\plate_solve_image.fit
[04/08/17 22:18:12.887][DEBUG] [Camera Thread] SGM_CAMERA_PLATE_SOLVER_CAPTURE message received...
[04/08/17 22:18:12.910][DEBUG] [Camera Thread] Collecting FITs headers for plate solve frame...
[04/08/17 22:18:12.915][DEBUG] [Camera Thread] Collecting FITs headers for plate solve frame...
[04/08/17 22:18:13.145][DEBUG] [Camera Thread] SBIG Camera: end exposure called...
[04/08/17 22:18:13.146][DEBUG] [Camera Thread] SBIG Camera: end readout...
[04/08/17 22:18:13.146][DEBUG] [Camera Thread] SBIG Camera: CaptureImage...
[04/08/17 22:18:13.148][DEBUG] [Camera Thread] SBIG Camera: Start exposure...
[04/08/17 22:18:13.148][DEBUG] [Camera Thread] SBIG Camera: exposure time = 400
[04/08/17 22:18:13.149][DEBUG] [Camera Thread] SBIG Camera: shutter is open...
[04/08/17 22:18:13.956][DEBUG] [Camera Thread] SBIG Camera: capture command sent...
[04/08/17 22:18:17.965][DEBUG] [Camera Thread] SBIG Camera status check: INTEGRATING
[04/08/17 22:18:18.967][DEBUG] [Camera Thread] SBIG Camera status check: INTEGRATION_COMPLETE
[04/08/17 22:18:19.048][DEBUG] [Camera Thread] SBIG Camera: end exposure called...
[04/08/17 22:18:19.052][DEBUG] [Camera Thread] SBIG Camera: read data...
[04/08/17 22:18:19.054][DEBUG] [Camera Thread] SBIG Camera: starting readout...
[04/08/17 22:18:19.054][DEBUG] [Camera Thread] SBIG Camera: reading lines...
[04/08/17 22:18:23.216][DEBUG] [Camera Thread] SBIG Camera: end readout...
[04/08/17 22:18:23.216][DEBUG] [Camera Thread] SBIG read complete.  Took 4161ms...
[04/08/17 22:18:23.219][DEBUG] [Camera Thread] Created full file name (file does not exist): C:\Users\rnoor\AppData\Local\SequenceGenerator\Temp\plate_solve_image.fit
[04/08/17 22:18:23.235][DEBUG] [Camera Thread] SaveFileBmp16: Locking bitmap for disk write...
[04/08/17 22:18:23.235][DEBUG] [Camera Thread] SaveFileBmp16: Opening file stream...
[04/08/17 22:18:23.236][DEBUG] [Camera Thread] SaveFileBmp16: Writing FITS headers...
[04/08/17 22:18:23.243][DEBUG] [Camera Thread] SaveFileBmp16: Traversing and persisting bitmap data...
[04/08/17 22:18:23.283][DEBUG] [Camera Thread] SaveFileBmp16: FITS block fill...
[04/08/17 22:18:23.283][DEBUG] [Camera Thread] SaveFileBmp16: Unlocking bitmap...
[04/08/17 22:18:23.283][DEBUG] [Camera Thread] SaveFileBmp16: Closing file stream
[04/08/17 22:18:23.292][DEBUG] [Camera Thread] Internal Interface: Set Preview...
[04/08/17 22:18:23.293][DEBUG] [Camera Thread] Display image preview using asynch task...
[04/08/17 22:18:23.587][DEBUG] [Camera Thread] ---------> Save file took 369ms
[04/08/17 22:18:23.588][DEBUG] [Camera Thread] SGM_CAMERA_PLATE_SOLVER_CAPTURE complete...
[04/08/17 22:18:23.790][DEBUG] [Telescope Thread] Auto center verification frame complete.  Plate solving image C:\Users\rnoor\AppData\Local\SequenceGenerator\Temp\plate_solve_image.fit
[04/08/17 22:18:23.828][DEBUG] [Telescope Thread] FitsFileHeaderData: Angle - 0
[04/08/17 22:18:23.828][DEBUG] [Telescope Thread] FitsFileHeaderData: Scale - 0
[04/08/17 22:18:23.828][DEBUG] [Telescope Thread] FitsFileHeaderData: RA - 14.0533345821966
[04/08/17 22:18:23.829][DEBUG] [Telescope Thread] FitsFileHeaderData: DEC - 54.3494725653691
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: RA (HRS)  - 14.0533329007996
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: RA (RAD)  - 3.67915394996697
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: DEC (DEG) - 54.3494362163622
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: DEC (RAD) - 0.948576608578169
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: SCALE     - 1.4
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: Width     - 1676
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: Height    - 1266
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSove2 Param: Regions   - 3000
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] PlateSolve2 Command Line:
[04/08/17 22:18:23.837][DEBUG] [Telescope Thread] C:\Users\rnoor\AppData\Local\SequenceGenerator\\PlateSolve2.exe 3.67915394996697,0.94857660857817,0.01137566821355,0.00859283768399,3000,C:\Users\rnoor\AppData\Local\SequenceGenerator\\Temp\psXSolve_0.fit
[04/08/17 22:19:04.750][DEBUG] [Telescope Thread] Auto center validation frame failed to solve. PlateSolve 2 failed!  No APM file found.
[04/08/17 22:19:04.750][DEBUG] [Telescope Thread] Auto center validation frame solve failed. PlateSolve 2 failed!  No APM file found.

Hi @roelnoort

This just means that PS2 did not write out a solve file. I can’t be sure why. Does it happen every time or just sometimes?

Hi Ken, this happens every single time.
However, based on my past experience with PlateSolve2, if PlateSolve is open I can see the image it is working on. Now I can not see that. It also does not appear to be doing anything at all (no regions being searched). So I manually cancel the process/close the PlateSolve window. I think that is when the no solution/no APM file message appears.

Roel

@roelnoort

Were you able to follow the PS2 setup in the help manual successfully?

Hi Ken, yes, I was able to set up PS2 successfully. I checked the manual to verify everything. See attached screenshot. As far as I can tell everything is ok.

Some further information with screenshots:

  1. I open an existing image, right click it and choose plate solve. The following dialog appears (I filled in the scale manually).

  2. After clicking Ok, an error dialog appears. You can see in the bottom that PlateSolve2 is running.

  3. When I click on the OK button, the PlateSolve2 dialog opens. The status says ‘No image loaded’. Apparently the parameter is passed as you can see that it is trying to work on psXSolve_3.fit. I checked in the /AppData/Local/SequenceGenerator/Temp folder and the image exists, is 16MB in size and opens well with Nebulosity and has the right image in it.

  4. After a while (probably after some timeout) a dialog pops up saying “No APM file found”

Hope this gives some useful extra information which helps resolving this issue…

Thanks, Roel

@roelnoort

Can you please provide us access to a full log?

Sure, here is the log of the session earlier today, when I provided you with the screenshots.
I had to run PlateSolve a couple of times to get all the screenshots and description sorted. I guess that will be visible in the log.
sg_logfile_20170415210021.txt (26.5 KB)

@roelnoort

Please have a look here and see if this helps (let me know if the instructions are not clear and I will attempt to be more explicit).

Hi Ken, I tried it but it did not resolve the problem. But I found something else which DID solve the problem. Find details below, hope it helps others.

First of all: in the forum post user FrancescoPelizzo refers to the error “Component “comdlg32.ocx” or one of its dependencies not correctly registered: a file is missing or invalid.”
I am not getting that error.

Nonetheless, I tried the steps to see if I could resolve the problem.

  1. Open CMD using ‘run as admin’.
  2. In the Windows\System32 folder the file ‘comdlg32.ocx’ was not present.
  3. The file was present in the foder Windows\SysWOW64
  4. I ran the command ‘regsvr32 /u comdlg32.ocx’ from within the SysWOW64 folder. This completed succesfully (“DllUnregisterServer in ComDlg32.OCX succeeded”)
  5. I ran ‘regsvr32 /i comdlg.ocx’ from within that folder. I got an error “The module “ComDlg32.OCX” was loaded but the entry-point DllInstall was not found. Make sure that “ComDlg32.OCX” is a valid DLL or OCX file and then try again.”
  6. I ran ‘regsvr32 comdlg.ocx’ from within the same folder. This worked. “DllRegisterServer in ComDlg32.OCX succeeded.”
  7. PlateSolve still gives the same error when called from SGP.

Then I started looking further at comdlg32.ocx.
8. I noticed there is also a ‘comdlg32.ocx’ file in the folder ‘c:\users…\appdata\local\sequencegenerator’. Unregistering that one works but registering it with either /i or without this parameter results in the error “The module ‘comdlg32.ocx’ was loaded but the call to DllRegisterServer failed with error code 0x8002801c. For more information about this problem, search online using the error code as a search term.”
9. I have 2 different versions of comdlg32.ocx. One in SysWOW64 of 153k dated 14/11/2010 and one that comes with SGP of 137k dated 12/10/2016. To see if it would work better with the latest file in both places I unregistered the comdlg32.ocx file in SysWOW64; then I copied the comdlg32.ocx file from the SGP folder into the SysWOW64 folder and registered it there. However, Platesolve still has the same problem.
10. I also tried to reverse the situation by using the old version. This did not work.

And even some further digging as I used PlateSolve already for APT and it is still on my system.
11. I have a working install of PlateSolve2 version 2.28 on my C drive. This uses a very old comdlg32.ocx file, 137k in size dated 22/6/1999. Replacing my SGP’s ocx with this one (and then registering it) did not solve the problem either.

From the log file I saw the call which is being made to launch PlateSolve, including parameters and the image file.
It looks like:
C:\Users\rnoor\AppData\Local\SequenceGenerator\PlateSolve2.exe parameter1,parameter2,…,filename
When I launch this via Windows Run command it fails, also when not launched via APT.
Now if I change the first path the the existing 2.28 version, like:
C:\PlateSolve2.28\PlateSolve2.exe parameter1,parameter2,…,filename
This works fine.
So I tried to copy the old comdlg32.ocx to the SGP folder. No result.
Then I copied the PlateSolve2.exe file to the SQP folder. No result.
Then I copied the configuration file PlateSolve2.ini to the SGP folder. This resolved the issue!
I attached both versions of the file to this post
PlateSolve2Config.zip (1.1 KB)

I tested to plate solve the same image again from SGP and that works fine.
I restored the PlateSolve.exe version to the one that came with SGP. Still fine.
I restored the comdlg32.ocx file to the one that came with SQP. Still fine.

In the end I have changed only 1 file: PlateSolve2.ini.
I got that from the PlateSolve2 version 2.28 which I manually installed earlier on my PC.
I have no idea why this solves the problem but it does.
The next time we have dark skies here I can test SGP in real-life scenario!

Tonight was a clear night, allowing me to test the plate solving in further detail.

Solving the coordinates from an existing image worked, also this night. I could load the retrieved coordinates into the target sequence. From the target sequence I chose “slew target” and then “center target”. Unfortunately, the latter step failed wit PlateSolve reporting an ‘Run-time eror ‘6’ Overflow’. See screenshot. Apparently, there is still something wrong with my setup. Any tips?

I don’t really have any insight here. That message is generated and issued by PlateSolve2 and we have no insight as to what generates it. That said, I have seen it before when I was messing with my PlateSolve2.ini file (was trying to write this out dynamically and PS2 would show that same error). I know you replaced your ini file and that may be contributing. I am still a little baffled as to why that ini files was problematic for you. There is one that we install with SGPro, but I think the PS2 app will rewrite this file any time you change settings or modify a catalog. Most of our users use PS2 and this report about incompatible ini file is making my brain hurt.

SOLVED.

I changed the binning parameter from the Plate Solve settings.
It was set as 2x2.
I changed it to 1x1.
Now it works just fine. I used it on 2 different nights already!
Very happy with it!