Library semPlot load failed - semplot

When I tried to run the library(semPlot) , always receive an error message:
library(semPlot)
Error: package or namespace load failed for ‘semPlot’:
objeto ‘readPNG’ não foi exportado por 'namespace:png'
Besides when I run the function sem Paths another error :
Error in semPaths(fit, title = FALSE, sizeMan = 4, sizeMan2 = 4, sizeLat = 4, :
could not find function "semPaths"
Could someone help me?

I resolved this problem as follows:
Install semPlot using install.packages("semPlot")
Wait for the dependencies to install
Restart R
Invoke the install command again using install.packages("semPlot")
I found that this installed two remaining libraries (XML and semPlot) and I was able to continue my analysis.

Related

Problem in R: package reticulate does not work with doparallel

I recently bumped into a new problem with reticulate and doparallel that I never seen before.
The following code works well with %do% (which is regular for loop) BUT NOT with %dopar% (doParallel package)
library(doParallel)
library(reticulate)
cl <- makeCluster(4)
registerDoParallel(cl)
foreach(j=1:4,.combine=rbind,.packages = "reticulate") %dopar%
{
test <- "Testing to see if dopar can recognize reticulate"
py_run_string("for i in range(len(r.test)): print(i)")
}
Here is the error message:
"Error in { :
task 1 failed - "RuntimeError: Evaluation error: object 'test' not found."
By default, test is an R object and when using reticulate, r.test will be recognized as an object in python py_run_string. However, the dopar created different cluster and therefore the r.test is not recognized anymore. The strange thing in here is that I have test ran inside the foreach loop and reticulate loaded for each small cluster.
Any hint would help. Thanks in advance.

Getting [error] Mouse: not useable (blocked) while using Sikuli in Mac

I have used Sikulix maven dependency and getting below error while executing the script:
[error] Mouse: not useable (blocked)
Please find code snippet below
Pattern p = new Pattern("path of the image");
org.sikuli.script.Screen s = new org.sikuli.script.Screen();
s.hover(p);
s.click(p);
Could someone please help to resolve above isssue

How to generate Cucumber extent reports 4 through Gradle

I am executing the Cucumber automation test scripts through gradle, though i am able to execute the test successfully but reports are not getting generated. I did give a try with with below gradle tasks
one at a time.
Cucumber gradle tasks copied below
a) for the below gradle task i am able to execute the scripts which does not generate reports as i have not included the reports statements inside args
task cucumber() {
dependsOn assemble, testClasses
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty',
'--glue','com.hal.brands.test.stepdefinition',
'src/test/resources','src/main/java',
'--tags', '#Api'
]
}
}
}
b) I tried to include the few statements related to reporting as shown in below gradle task but it failed with a exception
task cucumber() {
dependsOn assemble, testClasses
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty', 'json:target/HalBrands.json', 'com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:',
'--monochrome', 'true',
'--features','src\test\resources\featurefile',
'--glue','com.hal.brands.test.stepdefinition',
'src/test/resources','src/main/java',
'--tags', '#Api'
]
}
}
}
Exception details given below
BUILD SUCCESSFUL in 1s
6 actionable tasks: 6 up-to-date
E:\GradleProj_workspace\GadleDemoProj>gradle cucumber
> Configure project :
http://api-qa.dpr-prv.halbrands.us.cloudappzero.azureflash.com
E:\GradleProj_workspace\GadleDemoProj
> Task :cucumber FAILED
Exception in thread "main" java.lang.IllegalArgumentException: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter: is not valid. Try URI[:LINE]*
at io.cucumber.core.model.FeatureWithLines.parse(FeatureWithLines.java:56)
at io.cucumber.core.options.RuntimeOptionsParser.parse(RuntimeOptionsParser.java:131)
at io.cucumber.core.options.CommandlineOptionsParser.parse(CommandlineOptionsParser.java:25)
at io.cucumber.core.options.CommandlineOptionsParser.parse(CommandlineOptionsParser.java:29)
at io.cucumber.core.cli.Main.run(Main.java:29)
at io.cucumber.core.cli.Main.main(Main.java:14)
Caused by: java.lang.IllegalArgumentException: Expected scheme-specific part at index 68: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:
at java.net.URI.create(URI.java:852)
at io.cucumber.core.model.FeaturePath.parseProbableURI(FeaturePath.java:72)
at io.cucumber.core.model.FeaturePath.parse(FeaturePath.java:57)
at io.cucumber.core.model.FeatureWithLines.parseFeaturePath(FeatureWithLines.java:77)
at io.cucumber.core.model.FeatureWithLines.parse(FeatureWithLines.java:53)
... 5 more
Caused by: java.net.URISyntaxException: Expected scheme-specific part at index 68: com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:
at java.net.URI$Parser.fail(URI.java:2848)
at java.net.URI$Parser.failExpecting(URI.java:2854)
at java.net.URI$Parser.parse(URI.java:3057)
at java.net.URI.<init>(URI.java:588)
at java.net.URI.create(URI.java:850)
... 9 more
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\GradleProj_workspace\GadleDemoProj\build.gradle' line: 104
* What went wrong:
Execution failed for task ':cucumber'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_202\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s
6 actionable tasks: 1 executed, 5 up-to-date
E:\GradleProj_workspace\GadleDemoProj>
**---------------------------------------------------------------------------------------------------------------**
I am not sure where i am going wrong in the above 'b' gradle task . Please help with me at the earliest as iam literally wasting lot of time here trying out many possibilities. Also i want to keep you informed that i am new gradle stuff.
Have also copied cucumberoptions as present in my cucumber runner file
#CucumberOptions(features = { "classpath:featurefile" }, glue = { "classpath:com.hal.brands.test.stepdefinition",
"classpath:com.hal.brands.helper" },
plugin = { "pretty", "json:target/HalBrands.json", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" },
monochrome = true, tags = "#Api")
Pls take off the json: to get rid of the exception you are getting wrt to invalid scheme!
The Complete solution is given below .
task cucumber() {
dependsOn assemble, testClasses
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['--plugin', 'pretty',
'--plugin', 'json:target/HalBrands.json',
'--plugin', 'com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:Report',
'--glue','com.hal.brands.test.stepdefinition',
'src/test/resources','src/main/java',
'--tags', '#Api'
]
}
}
}

Drupal Wiris integration

I followed this tutorial to install the Wiris plugin on a new installation of Drupal.
Once the installation was complete and I clicked on the Wiris icon to begin adding a formula, the popup window does NOT load and I get the following error in the console area:
Uncaught DOMException: Failed to execute 'postMessage' on 'Window': Invalid target origin '/DrupalQuiz/sites/all/libraries/ckeditor/plugins/ckeditor_wiris/' in a call to 'postMessage'.
at http://*.*.*.*/DrupalQuiz/sites/all/libraries/ckeditor/plugins/ckeditor_wiris/core/core.js:19:22
The code causing the problem is as follows:
e.source.postMessage(postVariable, _wrs_conf_path);
I'm at a loss how to deal with this issue.
I don't have a complete fix but I was able to get it working locally by replacing _wrs_conf_path with the base path of my dev box. _wrs_conf_path was evaluating to a relative path to the plugins folder.
if (typeof(e.source) != 'undefined') {
e.source.postMessage(postVariable, _wrs_conf_path);
}
with
if (typeof(e.source) != 'undefined') {
e.source.postMessage(postVariable, _wrs_currentPath);
}
in the /sites/all/libraries/ckeditor/plugins/ckeditor_wiris/core/core.js file.
Edit: I replaced _wrs_conf_path with one of their internal variables _wrs_currentPath and that seemed to fix the issue.

PackageMaker is failing with Invalid Certificate in Mac os X

I have developed one Installer Package using PackageMaker which installs different components in user machine. After signing the package its failing in another user machine with following error in logs. It works wihout any issue with un signed .pkg file
11/4/11 7:24:37 AM installd[718] PackageKit: Install Failed: (null)
Error Domain=PKInstallErrorDomain Code=102 UserInfo=0x1004261f0 "The package “_Installer” is untrusted." Underlying Error=(Error Domain=NSOSStatusErrorDomain Code=-2147409622 UserInfo=0x10043b2e0 "The operation couldn’t be completed. CSSMERR_TP_NOT_TRUSTED") {
NSLocalizedDescription = "The package \U201cInstaller\U201d is untrusted.";
NSURL = "#plugin.pkg -- file://localhost/Users/sandeepakhare/Documents/%20Apps/1025/Installer/Installer.pkg";
NSUnderlyingError = "Error Domain=NSOSStatusErrorDomain Code=-2147409622 UserInfo=0x10043b2e0 \"The operation couldn\U2019t be completed. CSSMERR_TP_NOT_TRUSTED\"";
I have used Verisigned Certificate to sign the .pkg .. Please advice

Resources