Closed Zev-Chonoles closed 9 years ago
Very strange issue indeed, but we can detect a pattern:
Each time chdkptp.py tries to create an image from a multiple chunk image, it fails. Next shot gives a single-chunk image so it succeeds. Chunk order is always 'false' then 'true' (first capture is a bit misleading if you look at the sizes, look at the next ones and it's easier)
I'd look at the latest chdkptp.py patch to see if it resolves things.
On May 12, 2015 6:58:17 AM CEST, Zev Chonoles notifications@github.com wrote:
My previous issue was successfully resolved, so that I'm now able to get to the capturing stage of the process, but unfortunately I've come across another problem: when capturing, I always (eventually) start to get reports of
CHDKCameraDevice[XXXX]: Error during capture, retrying shot
. When the camera does retry the shot, it seems to always work the second time, but it's quite annoying to wait at every capture event for the error to be processed and then for the camera to needlessly take another picture.While there isn't any absolutely consistent pattern, it does seem to often alternate between the cameras; to be more specific, if on one capture event I get
CHDKCameraDevice[A28E]: Error during capture, retrying shot. CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image
it's often the case that in the next capture event I get
CHDKCameraDevice[7B4C]: Error during capture, retrying shot. CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image
Interestingly, on those occasions when I get errors on both cameras, it's often the case that in the next capture event, I get errors on neither. (It's possible my observations became subject to confirmation bias; I haven't collected rigorous statistics on the occurrences of these errors.)
It seems quite strange to me that these errors are occurring non-deterministically; performing the same keyboard strokes doesn't always make the
Error during capture
messages occur at a consistent point, or from the same camera.It's certainly possible that this is a problem with CHDK instead of spreads; I know basically nothing about CHDK, but I did run a basic experiment that (as far as I can tell) doesn't indicate anything from CHDK that would correspond to
Error during capture
. Usingchdkptp
directly to take four pictures:zev@zev-X58A-UD7:~$ LUA_PATH=lua/?.lua ./chdkptp -i -c -e"set cli_verbose=2" connected: Canon PowerShot A2500 , max packet size 512 con> rs rs_init rs_shoot get data 1 rc file IMG_0150.jpg 1 rc chunk get IMG_0150.jpg 1 0 rc chunk size:1461760 offset:17920 last:false rc chunk get IMG_0150.jpg 1 1 rc chunk size:1479168 offset:nil last:false rc chunk get IMG_0150.jpg 1 2 rc chunk size:1099307 offset:nil last:false rc chunk get IMG_0150.jpg 1 3 rc chunk size:17920 offset:0 last:true script wait time 0.5068 con 207> rs rs_init rs_shoot get data 1 rc file IMG_0151.jpg 1 rc chunk get IMG_0151.jpg 1 0 rc chunk size:1461760 offset:17920 last:false rc chunk get IMG_0151.jpg 1 1 rc chunk size:1479168 offset:nil last:false rc chunk get IMG_0151.jpg 1 2 rc chunk size:1064521 offset:nil last:false rc chunk get IMG_0151.jpg 1 3 rc chunk size:17920 offset:0 last:true script wait time 0.5066 con 210> rs rs_init rs_shoot get data 1 rc file IMG_0152.jpg 1 rc chunk get IMG_0152.jpg 1 0 rc chunk size:1461760 offset:17920 last:false rc chunk get IMG_0152.jpg 1 1 rc chunk size:1479168 offset:nil last:false rc chunk get IMG_0152.jpg 1 2 rc chunk size:1118317 offset:nil last:false rc chunk get IMG_0152.jpg 1 3 rc chunk size:17920 offset:0 last:true script wait time 0.5065 con 213> rs rs_init rs_shoot get data 1 rc file IMG_0153.jpg 1 rc chunk get IMG_0153.jpg 1 0 rc chunk size:1461760 offset:17920 last:false rc chunk get IMG_0153.jpg 1 1 rc chunk size:1479168 offset:nil last:false rc chunk get IMG_0153.jpg 1 2 rc chunk size:1152437 offset:nil last:false rc chunk get IMG_0153.jpg 1 3 rc chunk size:17920 offset:0 last:true script wait time 0.5070 con 216> quit
Apologies for the massive terminal output, but it's a representative run-through:
zev@zev-X58A-UD7:~$ spread --verbose wizard spread-test7 ========================== Starting capturing process ========================== Workflow: Initializing workflow spread-test7 bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload bagit: Adding path spread-test7/config.yml to payload spreads.plugin: Finding devices for driver "CHDKCameraDevice" Found 2 devices! Setting up devices for capturing. Workflow: Preparing capture. Workflow: Preparing capture in devices CHDKCameraDevice[A28E]: Setting focus to mode 'autofocus_all' CHDKCameraDevice[7B4C]: Setting focus to mode 'autofocus_all' Workflow: Running 'prepare_capture' hooks Workflow: Running 'start_trigger_loop' hooks ( /b) capture | (r) retake last shot | (f) finish Workflow: Triggering capture. Workflow: Sending capture command to devices chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:963415 offset:nil last:true chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:118784 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:1016033 offset:nil last:true CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image CHDKCameraDevice[7B4C]: Error during capture, retrying shot. chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1118482 offset:nil last:true CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image Workflow: Running 'capture' hooks bagit: Adding path spread-test7/data/raw/001.jpg to payload bagit: Adding path spread-test7/data/raw/000.jpg to payload bagit: Adding path spread-test7/pagemeta.json to payload Shot 2 pages [708315/h] bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload Workflow: Triggering capture. Workflow: Sending capture command to devices chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:757248 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:203025 offset:nil last:true chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:823808 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:280986 offset:nil last:true CHDKCameraDevice[A28E]: Error during capture, retrying shot. CHDKCameraDevice[7B4C]: Error during capture, retrying shot. chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:992893 offset:nil last:true chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1136224 offset:nil last:true CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image Workflow: Running 'capture' hooks bagit: Adding path spread-test7/data/raw/003.jpg to payload bagit: Adding path spread-test7/data/raw/002.jpg to payload bagit: Adding path spread-test7/pagemeta.json to payload Shot 4 pages [1205/h] bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload Workflow: Triggering capture. Workflow: Sending capture command to devices chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:964856 offset:nil last:true CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1134414 offset:nil last:true CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image Workflow: Running 'capture' hooks bagit: Adding path spread-test7/data/raw/005.jpg to payload bagit: Adding path spread-test7/data/raw/004.jpg to payload bagit: Adding path spread-test7/pagemeta.json to payload Shot 6 pages [1161/h] bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload Workflow: Triggering capture. Workflow: Sending capture command to devices chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:406528 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:743462 offset:nil last:true CHDKCameraDevice[7B4C]: Error during capture, retrying shot. chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:797184 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:243136 offset:nil last:true CHDKCameraDevice[A28E]: Error during capture, retrying shot. chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1142300 offset:nil last:true CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:970946 offset:nil last:true CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image Workflow: Running 'capture' hooks bagit: Adding path spread-test7/data/raw/007.jpg to payload bagit: Adding path spread-test7/data/raw/006.jpg to payload bagit: Adding path spread-test7/pagemeta.json to payload Shot 8 pages [ 327/h] bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload Workflow: Triggering capture. Workflow: Sending capture command to devices chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:976603 offset:nil last:true CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1072128 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:67787 offset:nil last:true CHDKCameraDevice[7B4C]: Error during capture, retrying shot. chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1149478 offset:nil last:true CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image Workflow: Running 'capture' hooks bagit: Adding path spread-test7/data/raw/009.jpg to payload bagit: Adding path spread-test7/data/raw/008.jpg to payload bagit: Adding path spread-test7/pagemeta.json to payload Shot 10 pages [ 356/h] bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload Workflow: Triggering capture. Workflow: Sending capture command to devices chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:767488 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:276463 offset:nil last:true chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1112768 offset:nil last:true CHDKCameraDevice[A28E]: Error during capture, retrying shot. CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1014550 offset:nil last:true CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image Workflow: Running 'capture' hooks bagit: Adding path spread-test7/data/raw/011.jpg to payload bagit: Adding path spread-test7/data/raw/010.jpg to payload bagit: Adding path spread-test7/pagemeta.json to payload Shot 12 pages [ 177/h] bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload Workflow: Triggering capture. Workflow: Sending capture command to devices chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:976688 offset:nil last:true CHDKCameraDevice[A28E]: Setting EXIF orientation on captured image chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:627712 offset:nil last:false chdkptp.lua: rc chunk get 1 1 chdkptp.lua: rc chunk size:522815 offset:nil last:true CHDKCameraDevice[7B4C]: Error during capture, retrying shot. chdkptp.lua: rc chunk get 1 0 chdkptp.lua: rc chunk size:1115449 offset:nil last:true CHDKCameraDevice[7B4C]: Setting EXIF orientation on captured image Workflow: Running 'capture' hooks bagit: Adding path spread-test7/data/raw/013.jpg to payload bagit: Adding path spread-test7/data/raw/012.jpg to payload bagit: Adding path spread-test7/pagemeta.json to payload Shot 14 pages [ 197/h] bagit: Adding path /home/zev/spread-test7/bag-info.txt to payload
Again, just in case it helps, I'm on Ubuntu 14.04 64-bit, running two Canon A2500 cameras with CHDK version
a2500-100a-1.3.0-4132-full_ALPHA
on them.
Reply to this email directly or view it on GitHub: https://github.com/DIYBookScanner/spreads/issues/192
Sent from my Android device with K-9 Mail. Please excuse my brevity.
You might want to update to the newest chdkptp.py
beta, I changed the code that handles chunk concatenation, maybe that helps:
$ pip install http://jbaiter.de/files/chdkptp.py-0.1.4beta2.tar.gz
Also, could you modify the area around line 243 in spreadsplug/dev/chdkcamera.py
module so it reads like this:
except Exception as e:
self.logger.debug(e)
if not retried:
Then re-run with --verbose
and upload the debug log somewhere, this should give us more information about the error that occured.
Thanks to you both! After installing the latest chdkptp.py
, the problem seems to have gone away.
@jbaiter: If you'd like, I can try to revert back to the version that was having the error and make the edit you mentioned (of course, your changes did fix the problem, but perhaps there's more diagnostic information that could be gathered about what was happening that would still be helpful?)
No need, I just added it myself, it should be in the next nightly build :-)
My previous issue was successfully resolved, so that I'm now able to get to the capturing stage of the process, but unfortunately I've come across another problem: when capturing, I always (eventually) start to get reports of
CHDKCameraDevice[XXXX]: Error during capture, retrying shot
. When the camera does retry the shot, it seems to always work the second time, but it's quite annoying to wait at every capture event for the error to be processed and then for the camera to needlessly take another picture.While there isn't any absolutely consistent pattern, it does seem to often alternate between the cameras; to be more specific, if on one capture event I get
it's often the case that in the next capture event I get
Interestingly, on those occasions when I get errors on both cameras, it's often the case that in the next capture event, I get errors on neither. (It's possible my observations became subject to confirmation bias; I haven't collected rigorous statistics on the occurrences of these errors.)
It seems quite strange to me that these errors are occurring non-deterministically; performing the same keyboard strokes doesn't always make the
Error during capture
messages occur at a consistent point, or from the same camera.It's certainly possible that this is a problem with CHDK instead of spreads; I know basically nothing about CHDK, but I did run a basic experiment that (as far as I can tell) doesn't indicate anything from CHDK that would correspond to
Error during capture
. Usingchdkptp
directly to take four pictures:Apologies for the massive terminal output, but it's a representative run-through:
Again, just in case it helps, I'm on Ubuntu 14.04 64-bit, running two Canon A2500 cameras with CHDK version
a2500-100a-1.3.0-4132-full_ALPHA
on them.