-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SpreadPi and Powershot SX160 #190
Comments
Please, in order to provide a somewhat useful bug report, include at least:
(Also note that this is not a support forum for spreadpi, but a bug tracker for errors in the spreads software. I will gladly help you determine if this is a spreads bug.) |
Unfortunately I do not know how to upload the log files to this thread. Apparently only images files (jpeg, etc) can be uploaded. Can send them by email? |
Drop them on a pastebin and paste the link here. On May 7, 2015 8:15:04 PM CEST, niram8 [email protected] wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
See the logs of a freshly installed image (2015-04-26) and triggering session: |
As mark said, can you paste a 'corrupted' jpeg file? |
Can you also try to take a picture using chdkptp (the lua shell), it's available over at assembla. |
Thank you, that clears some things up! The beginning marker of the JPEG file ( After some poking around, it seems that I naively assumed that I received the chunks in order, which does not seem to be the case for your file. So I just pushed a change that sorts the chunks by their ascending offset before assembling them. Could you try the new version on your SpreadPi and see if it helps? To update, SSH onto your Pi (user: spreads, password: spreads) and run the following:
|
Unfortunately it is not working. After the first update to my current image the cameras did not shoot at all. With a fresh image (2015-04-26) and the update I get the error: |
Most chunks do not have an offset... that's why you get this error. |
Thanks for the hints, @adongy, I think I have found a better and more robust way to assemble the chunks that arrive from the cameras: jbaiter/chdkptp.py@4ff8e53 Here is a new beta release that you should try: |
With "chdkptp.py-0.1.4beta2.tar.gz" it is working. The images are readible and the thumbnails visible in the web interace.
|
Can you give us logs for every issue you encounter? |
as for zoom, it may be that the sx160 has many zoom step. try to put a high number (eg 60 or more) and try again. |
Sorry. The zoom apparently is a parameter issue. With about 30 it is working fine. |
paste it to pastie.org or pastebin.com? 2015-05-12 0:03 GMT+02:00 niram8 [email protected]:
Mark Van den Borre |
I just found another set of issues in the
Do you mean that the system completely freezes up? Or is it just the camera that becomes unresponsive? |
After install of "chdkptp.py-0.1.4beta3.tar.gz" spreads does not start any more. See the error capture after install: After reinstalling "chdkptp.py-0.1.4beta2.tar.gz" the system works again. Here is a fresh log with some capture sessions (foot pedal not working) with "chdkptp.py-0.1.4beta3.tar.gz" : Occasionally the Web-Interace freezes, i.e. does not come come back from shooting. I did not identify it reproducible. I assume that it happens when at least one camera is not reponding any more. I`ll try to capture a log for this. |
Sorry, The log is with "chdkptp.py-0.1.4beta2.tar.gz" (NOT chdkptp.py-0.1.4beta3.tar.gz): |
Ugh, I just noticed that I have a horrible typo in beta3, please try this new one:
|
Not related to the bug, but to check in the future. Probably, the third method to set focus, where left is pressed during shot_half pressed, does not work for SX cameras. |
@nafraf: Is there a way to set a manual focus value on the SX cameras over PTP? |
The image http://jbaiter.de/files/chdkptp.py-0.1.4beta4.tar. works. However foot pedal still is not functioning. Also "Tulip Error" still pops up I have done the following testing sequence:
Resulting spreads.log: |
Another Test Sequence resulting in the "tulip index out of range":
Resulting spreads.log |
@jbaiter: For sx160, set_mf() is an option. See this test log:
To detect which subject distance override modes work for each camera: get_sd_over_modes() |
Using "pip install -e git+https://github.com/jbaiter/chdkptp.py.git" results in the error: root@spreadpi /home/spreads # pip install -e git+https://github.com/jbaiter/chdkptp.py.git |
whoops, extra -e is not needed i think niram8 wrote:
|
<pip install git+https://github.com/jbaiter/chdkptp.py.git> runs to install but is not working. There is no web interface and also the IP address of spreadPi is not shown on the cameras. |
I just uploaded a beta5 for you, @niram8, this should work now. I checked and it seems that the tarball I created had a messed up line. |
I think I am not lucky ... |
@niram8, for the love of god, please be more specific than just 'is not working' :-( |
@jbaiter, sorry, you are really right. For whatever reason some parts of my comments are missing. Also the reference to the file which is not running. It should read: "https://github.com/jbaiter/chdkptp.py.git runs to install but is not working. There is no web interface and also the IP address of spreadPi is not shown on the cameras." I did not look at the spreads.log file but immediately reinstalled "http://jbaiter.de/files/chdkptp.py-0.1.4beta4.tar.gz" which was running again (IP adress on the cameras, Web-Interface running). If the log file is helpfull I can repeat the procedure as from the current log file I cannot identify the sequence of "http://jbaiter.de/files/chdkptp.py-0.1.4beta5.tar.gz" Last part of spreads.log is pasted here: http://pastebin.com/gF1JP1Sc |
Unfortunately these logs do not show anything suspicious, just that you ran spreads and installed various versions of chdkptp.py. What do you mean by 'is not working'? Does spreads error out when launching ? When capturing ? Does it say anything in the logs ? |
I have tested all the versions again. Here is the sequence and the results. Sequence start with image "spreadpi-20150514,img" Resulting spreads.log: Hope that is clearer. |
Don't bother with the beta/beta2 files, they are now outdated. Looks like it doesn't manage to find the camera, thus it doesn't work. Can you edit It should give more info. |
Same thing here with A800. I used an earlier version of SpreadPi before. Back then, though one of the two camera dies (automatically shutdown, not freeze) from time to time and requires restarting, it was less frequent. Now with the latest release "tuple out of index" pops up every 20-50 pages, and I need to restart the Raspberry Pi each time...I tried to use separate USB hubs for each of the camera but it didn't work either. |
@niram8: Is this really the full log? How does it e.g. 'crash'/'not work' with beta5? From the logs it looks like everything is running fine up to the point where it tries to find cameras. Does it stop at that point? Is there any console output after that? @gazagoal: I'm working on it, I'll release a new stable chdkptp.py version once I've got to the bottom of niram8's issue. That should then be available in the next spreadpi build. |
@adongy, I have edited "spreadsplug/dev/chdkcamera.py" here is the log (after install of spreadpi-20150514,img / chdkptp.py-0.1.4beta5.tar.gz): @jbaiter, It should be the full log. It just stops. There is no output on the cameras. I cannot see any console output (the pi runs headless). I can still access via putty. Can I look on any other log on the pi? |
Wow, so it just deadlocks? Can you CTRL+C or |
There is no file /etc/init.d/spread on the system (at least I do not find it in that directory). I cannot analyse dmesg and systemctl. |
@scannopolis, it seems your comments got deleted, but I think you were onto something! I did some tests last weekend and it turns out that the 'mode' the camera rotary button is set to plays a role. I recommend you all set it to 'P' (or the most 'manual' mode you have on your model), this seems to minimize the errors. I also did some more work on the error handling and logging, this should help with stability and debugging: http://jbaiter.de/files/chdkptp.py-0.1.4b7.tar.gz |
I deleted them myself because I wasn't sure if they were useful. I did perform some more test yesterday, using the same version of CHDK (build 1.3.0 ver 4154) and the latest build from Spreads. I did the following:
It seems to me that nafraf is right about this, it might be a problem with the focus of the camera rather than something else. However, I didn't have time yesterday to fix the bugs with the code that you provided, but I might be able to do it in the weekend |
I also did:
|
Scann, do you have a log and an example image for the 'thumb is not in JPEG format' error? |
Just to follow up on the earlier "tuple out of index" report. The issue has been largely resolved with the latest built and chdk client. Much thanks! But a new problem is that now when "tuple" problem does occur, which happens now much less frequently, it may result in a bad file for the last photo I scan. This causes the problem that, even after I restart the spreadpi, the Raspberry will crash whenever it loads the last, perhaps badly stored, photo. So either when I want to continue from where I left after the "tuple problem", or when I want to browse the last photo scanned in that workflow, the Raspberry Pi will crash and shows "the server seems to be offline". This issue can be solved by deleting the whole workflow, or reformat the SD card. But a fix will of course be much appreciated, for it means there is a chance that if the "tuple" problem happens again, you will lose everything you've scanned under the current workflow... |
Can you post the last picture saved on such an error along with the logs ? It's really hard to debug without proper input. |
Hi Anthony, the error just occurred again and here are the picture files (simply empty...) and the logs. Deleting the last two empty pictures solves the problem; otherwise Raspberry crushes every time I open the webpage. https://www.dropbox.com/sh/g0w2tofb0x4szv5/AAB8NKqawOAiaUbT267vYNNHa?dl=0 Hope it helps! |
Thanks, I think I got it: jpegtran does not handle very well 0 bytes image files, it just segfaults leading to the errors you mentioned. Edit: the root cause of it all is that one of the two cameras did not seem to take a shot when asked to, maybe a little bug in CHDK or in the python wrapper. Can you try to put the camera in 'P' mode when taking shots? Usually it gives better results. |
Hello, what of all of this install options solve this issue? Thanks in advance. |
I set up SpreadPi with two PowerShot However, the downloaded images (JPEG) are ot readible neither on windows or linux. I also got the error message "Thumbnail is not in JPEG format".The SX160 works well with CHDKPTP (on Windows 7).Can I set up or modify SpreadPi to work with the SX160.
The text was updated successfully, but these errors were encountered: