Short-bus / pilomar

RaspberryPi based miniature observatory
https://shortbus.blog/
GNU General Public License v3.0
63 stars 14 forks source link

piDNG.convert in new bookworm build fails #64

Closed Marcus8675 closed 4 months ago

Marcus8675 commented 4 months ago

preview and auto seem to work but when first light image is take the code exits due to failure to DNG convert. output is listed below:

In DEBUG MODE. The dashboard display is suppressed so that any errors are more clear. In DEBUG MODE. Press 'x' to quit, 'd' toggle debug, 'm' submenu, 'r' refresh. 2024-03-06 12:46:11 ObservationRun: (DebugMode) Starting main loop... 12:46:35 ReadyToObserve changed from False to True 12:46:35 Begin tracking image capture. 12:46:49 Begin image capture (1) 1.0s. 2024-03-06 12:47:03 logfile.RecordTraceback(): ErrorMessage 'NoneType' object has no attribute 'convert' 2024-03-06 12:47:03 logfile.RecordTraceback(): Traceback (most recent call last): 2024-03-06 12:47:03 logfile.RecordTraceback(): File "/home/pi/pilomar/src/pilomar.py", line 2417, in CaptureSetFull 2024-03-06 12:47:03 logfile.RecordTraceback(): PiDNG.convert(outputfile) # Convert the saved .jpg file into the raw .dng format. 2024-03-06 12:47:03 logfile.RecordTraceback(): ^^^^^^^^^^^^^ 2024-03-06 12:47:03 logfile.RecordTraceback(): AttributeError: 'NoneType' object has no attribute 'convert' 2024-03-06 12:47:03 logfile.RecordTraceback(): ERROR reported in LogFile: 2024-03-06 12:47:03 logfile.RaiseException(): Comment: astrocamera.CaptureSetFull(): PiDNG.convert failed. ERROR reported in LogFile: 2024-03-06 12:47:03 CameraHandler: CameraInUse.TakePhoto failed. ERROR reported in LogFile: 2024-03-06 12:47:03 CameraHandler: CameraInUse.TakePhoto raised:Program exception raised ERROR reported in LogFile: 2024-03-06 12:47:03 logfile.ReportException(): Error Program exception raised 2024-03-06 12:47:03 logfile.RecordTraceback(): ErrorMessage Program exception raised 2024-03-06 12:47:03 logfile.RecordTraceback(): Traceback (most recent call last): 2024-03-06 12:47:03 logfile.RecordTraceback(): File "/home/pi/pilomar/src/pilomar.py", line 2417, in CaptureSetFull 2024-03-06 12:47:03 logfile.RecordTraceback(): PiDNG.convert(outputfile) # Convert the saved .jpg file into the raw .dng format. 2024-03-06 12:47:03 logfile.RecordTraceback(): ^^^^^^^^^^^^^ 2024-03-06 12:47:03 logfile.RecordTraceback(): AttributeError: 'NoneType' object has no attribute 'convert' 2024-03-06 12:47:03 logfile.RecordTraceback(): 2024-03-06 12:47:03 logfile.RecordTraceback(): The above exception was the direct cause of the following exception: 2024-03-06 12:47:03 logfile.RecordTraceback(): 2024-03-06 12:47:03 logfile.RecordTraceback(): Traceback (most recent call last): 2024-03-06 12:47:03 logfile.RecordTraceback(): File "/home/pi/pilomar/src/pilomar.py", line 8157, in CameraHandler 2024-03-06 12:47:03 logfile.RecordTraceback(): result = CameraInUse.TakePhoto(batch_size,terminal=False) 2024-03-06 12:47:03 logfile.RecordTraceback(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-06 12:47:03 logfile.RecordTraceback(): File "/home/pi/pilomar/src/pilomar.py", line 2524, in TakePhoto 2024-03-06 12:47:03 logfile.RecordTraceback(): result = self.CaptureSet(file_root=FileRoot,batch_size=batch_size,camera_command=CameraCommand,terminal=terminal,cleanup=False) 2024-03-06 12:47:03 logfile.RecordTraceback(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-06 12:47:03 logfile.RecordTraceback(): File "/home/pi/pilomar/src/pilomar.py", line 2346, in CaptureSet 2024-03-06 12:47:03 logfile.RecordTraceback(): result = self.CaptureSetFull(file_root,batch_size,camera_command,tempfile=tempfile,terminal=terminal,cleanup=cleanup,astrotime=astrotime) 2024-03-06 12:47:03 logfile.RecordTraceback(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-06 12:47:03 logfile.RecordTraceback(): File "/home/pi/pilomar/src/pilomar.py", line 2419, in CaptureSetFull 2024-03-06 12:47:03 logfile.RecordTraceback(): CamLog.RaiseException(e,comment='astrocamera.CaptureSetFull(): PiDNG.convert failed.') 2024-03-06 12:47:03 logfile.RecordTraceback(): File "/home/pi/pilomar/src/pilomarlogfile.py", line 173, in RaiseException 2024-03-06 12:47:03 logfile.RecordTraceback(): raise Exception('Program exception raised') from e # Terminate through regular exception stack. 2024-03-06 12:47:03 logfile.RecordTraceback(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2024-03-06 12:47:03 logfile.RecordTraceback(): Exception: Program exception raised 2024-03-06 12:47:03 logfile.RecordTraceback(): ERROR reported in LogFile: 2024-03-06 12:47:03 logfile.ReportException(): Comment: CameraHandler: Call to TakePhoto() ERROR reported in LogFile: 2024-03-06 12:47:03 CameraHandler: Something went wrong with image capture. Aborting. 2024-03-06 12:47:03 CameraHandler: Finished. ERROR reported in LogFile: 2024-03-06 12:47:03 ObservationRun: CameraThread (Camera handler) is not running!

Stopping CameraHandler... Waiting for CameraHandler to confirm it has completed (telescope may continue to move until this is finished) ...

Short-bus commented 4 months ago

Hmm... looks like it's trying to extract the .DNG data from a raspistill image but doesn't have the PiDNG library loaded. I can't recreate the error immediately in Buster or Bookworm...

... digging ...

OK, I compared my running version with the GitHub version, looks like I messed up the merge. I'll repost the src/pilomar.py code again...

Short-bus commented 4 months ago

Try downloading src/pilomar.py and giving it another go.

Marcus8675 commented 4 months ago

That solved it! Thanks for the update. Can you do anything about these clouds? :(

Short-bus commented 4 months ago

Great. Thanks for raising it, I have 4 instances running in different configurations - I missed that 'raspistill' check from the mastercopy, but my local instance was OK. I'll close this one now.

Can you do anything about these clouds? :(

I can only sympathise on that one. There was a good aurora display a few days ago here, 100% cloud cover coincided precisely with the show. We've chosen an infuriating sport I think :)