I got error message "operation is not valid due to the current state of the object" when I try to generated specflow Step Definition Report - specflow

I got above error message when I try to use specflow.exe to generate specflow Step Definition Report, the command I used is:
specflow.exe stepdefinitionreport ..\\..\\..\MyProject\MyProject.csproj"
Any ideas and suggestions, Thank you!

I had this issue when I was using StepDefinition instead of Given-When-Then in my step definitions. By switching back to Given-When-Then it started working.
Instead of using the [StepDefinition(#"...")] use a [Given(#"...")] for example:
[Given("I take a screenshot")]
[When("I take a screenshot")]
[Then("I take a screenshot")]
public void takeScreenshot()
{
screenShots.Add(((ITakesScreenshot)driver).GetScreenshot());
}

Related

applying MSDDetector in colab

I have trouble writing the MSD detector correctly. However, it has no attribute ''create''.
I wrote the following code. But my session crashed for an unknown reason.
msd=cv2.xfeatures2d.MSDDetector()
kps1=msd.detect(I1)
I will appreciate any help.
unfortunately, you've found a bug here.
there should be a ´XXX_create()´ function, but someone forgot to expose it to the python api, by adding a CV_WRAP to the function signature here
(and no, you cannot use the 'ordinary' constructor, it does not produce a valid instance (will segfault, if you call any method on it !!))
please raise an issue here
if you're able to build from src, try to fix it locally, by changing that line to:
CV_WRAP static Ptr<MSDDetector> create(....

Error in calling gmail watch method

I am calling watch method of gmail to get updates of my mailbox, but it is giving me error
Google::Apis::ClientError: invalidArgument: topicName required
this is the code
service.watch_user('me','projects/devpush/topics/push')
can any one please tell me what is wrong in this?
I had this same problem and after I consulted the source, I found that you need to build a WatchRequest and pass that in to user_watch, like so:
watch_request = Google::Apis::GmailV1::WatchRequest.new
watch_request.topic_name = 'projects/devpush/topics/push'
service.watch_user('me', watch_request)
I'm not familiar with ruby, but maybe you can try giving the topicName as a named parameter?
service.watch_user('me', topicName: 'projects/devpush/topics/push')
Sorry if I'm wrong, but from the error message, you should add a named parameter.

Create Issue type in JIRA using Atlassian plugin

I am trying to create a custom issue type using the below code.
IssueTypeManager itm = (IssueTypeManager) ComponentAccessor.getComponentOfType(IssueTypeManager.class);
itm.createIssueType("issueType", "issueType", "https://jira.atlassian.com/images/atlassian-jira-logo-large.png");
I have included the following line in Atlassian-plugin.xml file
<component-import key="IssueType" interface="com.atlassian.jira.config.IssueTypeManager" />
But it throws an error while running the test case. The error is "ComponentAccessor is not initialized"
Could you please help me ?
Thanks!

Error when Compiling Clang Tool RecursiveASTVisitor : error: conflicting return type CreateASTConsumer

I just learn clang tool about How to write RecursiveASTVisitor based ASTFrontendActions.
I followed the example in the documentation and compile the example code, and there was always one error. I don't know why it have this error and how to solve it. I didn't find the solution of related problem. I don't know whether who meet the same problem and solved it.
/home/sun/project/clang-llvm/llvm/tools/clang/tools/extra/find-class-decls/FindClassDecls.cpp:44:31: error: conflicting return type specified for ‘virtual clang::ASTConsumer* FindNamedClassAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef)’
In file included from /home/sun/project/clang-llvm/llvm/tools/clang/tools/extra/find-class-decls/FindClassDecls.cpp:4:0:
/home/sun/project/clang-llvm/llvm/tools/clang/include/clang/Frontend/FrontendAction.h:64:40: error: overriding ‘virtual std::unique_ptr clang::FrontendAction::CreateASTConsumer(clang::CompilerInstance&, llvm::StringRef)’
ninja: build stopped: subcommand failed.
Thanks!
Oops. I've updated the documentation the rest of the way. It should have read:
class FindNamedClassAction : public clang::ASTFrontendAction {
public:
virtual std::unique_ptr<clang::ASTConsumer> CreateASTConsumer(
clang::CompilerInstance &Compiler, llvm::StringRef InFile) {
return std::unique_ptr<clang::ASTConsumer>(
new FindNamedClassConsumer(&Compiler.getASTContext()));
}
};
As of r215323, FrontendAction::CreateASTConsumer was changed to return a std::unique_ptr<clang::ASTConsumer> instead. I've updated the documentation on http://clang.llvm.org/docs/RAVFrontendAction.html to reflect that.
when I change to std::unique_ptr. At the same time, I keep return new FindNamedClassConsumer(&Compiler.getASTContext()); not like you have updated the documentation "return new FindNamedClassConsumer;". Now When I compile FindClassDecls.cpp, there is still another error.
/home/sun/project/clang-llvm/llvm/tools/clang/tools/extra/find-class-decls/FindClassDecls.cpp:46:64: error: could not convert ‘((&(& Compiler)->clang::CompilerInstance::getASTContext()), (operator new(24ul), (((FindNamedClassConsumer*))->FindNamedClassConsumer::FindNamedClassConsumer(), ((FindNamedClassConsumer*)))))’ from ‘FindNamedClassConsumer*’ to ‘std::unique_ptr’.
Thank you very much!

Simple OpenCV problem

Why I try to run the following OpenCV program, it shows the following error :
ERROR:
test_1.exe - Application Error
The application failed to initialize properly (0x80000003).
Click on OK to terminate the application.
CODE:
#include "cv.h"
#include "highgui.h"
int main()
{
IplImage *img = cvLoadImage("C:\\face.bmp");
cvSetImageROI(img, cvRect(100,100, 100, 100));
cvAddS(img, cvScalar(50), img);
cvResetImageROI(img);
cvShowImage("Test", img);
cvWaitKey(0);
return 0;
}
When i press F5(im using vs2008express), the program encounters a break point...i have attached a picture...dont know, whether, it will help or not.
Error Snapshot Link
It is not that, only this program is producing this error, but also any kind of image manipulation funciton containing (OpenCV)program is resulting in this sitution.
Such as : cvSmooth
one last thing, it there any dedicated OpenCV forum or sth like that?
I am an administrator.So, yes, ive the permission.
a version mismatch.
sorry, i didn't get it?Version mismatch with what?
But, i have found the error using dependency walker.
Warning: At least one module has an unresolved import due to a missing export
function in a delay-load dependent module.
and also found that, it is a common problem, and found some info in the FAQ of DW...
Why am I seeing a lot of applications where MPR.DLL shows up in red under
SHLWAPI.DLL because it is missing a function named WNetRestoreConnectionA?
I also get a "Warning: At least one module has an unresolved import due to
a missing export function in a delay-load dependent module" message.
Function name : WNetRestoreConnectionA
But there is no guideline about how to solve it. Though, they say, it is not a problem.
i googled a little and found a suggestion.It says,
Turn off your compilers setting to assume you are programming for Win9x.
(I just lost which setting but it is not that difficult, use a #define...)
But i have no idea, how to do that in Visual Studio 2008 express.
Any suggestion how to solve it...
This usually indicates a problem with a dll; either you don't have permission, or a version is mismatched. Try running as Administrator to see if it is a permissions problem. If that doesn't help, try using the Dependency Walker.

Resources