How to take pictures from a digital camera remotely using python...capture.py? - python-2.6

I would like to take pictures with my Nikon Coolpix and Nikon D5000 digital camera remotely with python.
I have downloaded all the packages from pyusb.
When I run the capture.py script, the following error results:
"Attribute Error: 'module' object has no attribute 'findptps'"
The line of code the error is referring to is here in capture.py:
ptpTransport = PtpUsbTransport(PtpUsbTransport.findptps()[0])
What is this error caused by? Would appreciate any help.

You have probably done:
import PtpUsbTransport
instead of:
from PtpUsbTransport import PtpUsbTransport

Related

Compilation problem while running the sdm package in Rstudio

I am getting this error when compiling:
Error in FUN(X[[i]], ...): trying to get slot "presence" from an object of a basic class ("NULL") with no slots
How can I solve this?
You should check the formula to see whether you are indicating the same name
ie
sdmdata<- sdmData(**species~.,** train, test, predictors, bg..)
Writing this in the model will give you an error you described.
sdmmodel<- sdm(**specie~.,** data= methods=c("glm", "brt")).
I solved a similar problem that way

Why is RStudio giving an error when using plotFun from the Mosaic package?

My students are using the Mosaic package for RStudio, and one of them is not able to use the function plotFun. Every time she tries to use it, she gets the same error. For example,
> plotFun(x+2~x)
Error in as.data.frame.default(x[[i]], optional = TRUE) :
cannot coerce class ‘"formula"’ to a data.frame
Are there any thoughts as to what is going wrong? She will need to use this function often for this class; is she missing a package or update of R or RStudio?

I can't import com.parse.ParseImageView

I've been trying to import com.parse.ParseImageView so i can display image queried from parse. But I get this error in my xml file
The following classes could not be found:
- com.parse.ParseImageView
Is ParseImageView no longer supported ? What is the alternative way to display image from parse database? Thanks

Why can't Processing 2.0b8 find a class or type named "Set"?

I'm trying to walk through a Processing tutorial and hitting a wall. I can't even run the sample starter code --I get an error: Cannot find a class or type named "Set" and this line comes back highlighted:
Set<String> tags = le.getCustomElements().getTags();
Am I missing something already?
Some default imports has gone in 2.0. Try
import java.util.*
at the beginning of the code

A null reference or invalid value was found [GDI+ status: InvalidParameter]

I am running an MVC3 app on Mono/linux and everything is working fine with the exception of an image upload utility. Whenever an image upload is attempted i get the Invalid Parameter error from within the method below:
System.Drawing.GDIPlus.CheckStatus(status As Status) (unknown file): N 00339
System.Drawing.Bitmap.SetResolution(xDpi As Single, yDpi As Single)
I've googled this error extensively and have found that the Invalid parameter error can often be misleading, and could fire if for example there was an error with the upload itself, or if the image was not fully read. This runs fine on IIS/Windows, but I've not been able to get it to work in Mono.
Apache2
Mono 2.10.8.1
Am i missing something simple or do i need to find a different way to handle image manipulation for mono?
After doing quite a bit of testing, I was able to determine the root of my error. I was attempting to use the Image.HorizontalResolution and Image.VerticalResolution properties for Bitmap.Resolution . While these properties were set on the initial upload (where the file is read into a stream from the tmp directory), when i posted back with the base64 encoded string of the image itself, it appears these values were lost somehow. Because of this the SetResolution method failed.
For whatever reason i do not have this issue on IIS/Windows, the properties exist in both circumstances.
I encountered a similar issue. A Bitmap loaded from disk, reported bmp.HorizontalResolution==0 and bmp.VerticalResolution==0 when they were both==300. This behaviour does not occur on Windows.
A bit more digging, I found that the following test fails:
[Test]
public void GDI_SetResoltion()
{
var b1 = new Bitmap (100, 100);
Assert.That (b1.HorizontalResolution, Is.Not.EqualTo (0));
Assert.That (b1.VerticalResolution, Is.Not.EqualTo (0));
}
I believe Windows will default resolution to 96 dpi.

Resources