Popular New Releases in Cucumber
cucumber-ruby
v8.0.0.RC.1
cucumber-js
v8.1.2
Behat
v3.8.1
common
gherkin/go/v23.0.1
cucumber
cucumber-json-formatter/v7.0.1
Popular Libraries in Cucumber
by cucumber ruby
5101 MIT
Cucumber for Ruby. It's amazing!
by cucumber typescript
4499 MIT
Cucumber for JavaScript
by Behat php
3587 MIT
BDD in PHP
by cucumber c
3317 MIT
A monorepo of common components - building blocks for implementing Cucumber in various languages.
by cucumber java
3203 MIT
Cucumber monorepo - building blocks for Cucumber in various languages
by grosser ruby
3046
Ruby: 2 CPUs = 2x Testing Speed for RSpec, Test::Unit and Cucumber
by seattlerb ruby
2981
minitest provides a complete suite of testing facilities supporting TDD, BDD, mocking, and benchmarking.
by getgauge go
2689 Apache-2.0
Light weight cross-platform test automation
by cucumber java
2434 MIT
Cucumber for the JVM
Trending New libraries in Cucumber
by MelSumner javascript
120
Open-source project. Tracking the available automation for accessibility. What a11y failures can be linted & tested for in an automated fashion?
by labs42io typescript
115 MIT
BDD tests with Cucumber, WebdriverIO and Docker Selenium
by Tallyb typescript
100 MIT
by AppiumTestDistribution typescript
75 MIT
This is an Appium 2.0 plugin designed to manage and create driver sessions on available devices.
by hopsoft javascript
56 MIT
[WIP] Stimulus controller library common enough to span multiple projects
by cucumber-school ruby
48 CC-BY-4.0
Scripts for the BDD with Cucumber video series
by restqa javascript
47 MIT
🦏 | Creates Happiness through Next in class Microservice developer experience
by Sub-Xaero typescript
46
A set of useful pre-built and configurable StimulusJS controllers for various common scenarios
by cucumber java
39
Human friendly alternative to Regular Expressions
Top Authors in Cucumber
1
26 Libraries
23014
2
14 Libraries
126
3
9 Libraries
37
4
8 Libraries
242
5
7 Libraries
89
6
7 Libraries
78
7
6 Libraries
167
8
6 Libraries
122
9
6 Libraries
37
10
6 Libraries
25
1
26 Libraries
23014
2
14 Libraries
126
3
9 Libraries
37
4
8 Libraries
242
5
7 Libraries
89
6
7 Libraries
78
7
6 Libraries
167
8
6 Libraries
122
9
6 Libraries
37
10
6 Libraries
25
Trending Kits in Cucumber
No Trending Kits are available at this moment for Cucumber
Trending Discussions on Cucumber
Selenium-chromedriver: Cannot construct KeyEvent from non-typeable key
Is it possible to have Cucumber steps and Karate steps recognised at the same time in different feature files?
Counting unique list items
Cypress stopped working with cucumber-preprocessor after 9.3.0
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible:module
how can I pass the cypress.json file to cypress-tags
Unable to build and deploy Rails 6.0.4.1 app on heroku - Throws gyp verb cli error
Clustering in R using K-mean
Selenium / Java : How to write element locator for an element with aria-selected=false
Could not create a cucumber expression for scenario step
QUESTION
Selenium-chromedriver: Cannot construct KeyEvent from non-typeable key
Asked 2022-Mar-25 at 12:17I updated my Chrome and Chromedriver to the latest version yesterday, and since then I get the following error messages when running my Cucumber features:
1....
2unknown error: Cannot construct KeyEvent from non-typeable key
3 (Session info: chrome=98.0.4758.80) (Selenium::WebDriver::Error::UnknownError)
4 #0 0x55e9ce6a4093 <unknown>
5 #1 0x55e9ce16a648 <unknown>
6 #2 0x55e9ce1a9866 <unknown>
7 #3 0x55e9ce1cbd29 <unknown>
8 .....
9
I try to fill a text field with Capybara's fill_in
method. While debugging I noticed that Capybara has problems especially with the symbols @
and \
. Every other character can be written into the text field without any problems.
The code that triggers the error looks like this
1....
2unknown error: Cannot construct KeyEvent from non-typeable key
3 (Session info: chrome=98.0.4758.80) (Selenium::WebDriver::Error::UnknownError)
4 #0 0x55e9ce6a4093 <unknown>
5 #1 0x55e9ce16a648 <unknown>
6 #2 0x55e9ce1a9866 <unknown>
7 #3 0x55e9ce1cbd29 <unknown>
8 .....
9def sign_in(user)
10 visit new_sign_in_path
11 fill_in 'Email', with: user.email
12 fill_in 'Password', with: user.password
13 click_button 'Sign in'
14end
15
user.email
contains a string like "example1@mail.com"
.
I work with Rails 6.1.3.1, Cucumber 5.3.0, Chromedriver 98.0.4758.48, capybara 3.35.3
The error only occurs on features that are tagged with @javascript
Do you have any ideas what causes this error or how to fix it?
ANSWER
Answered 2022-Feb-03 at 08:25It seems something has changed in the new version of ChromeDriver and it is no longer possible to send some special chars directly using send_keys method.
In this link you will see how it is solved (in C#) --> Selenium - SendKeys("@") write an "à"
And regarding python implementation, check this out --> https://www.geeksforgeeks.org/special-keys-in-selenium-python/
Specifically, my implementation was (using MAC):
1....
2unknown error: Cannot construct KeyEvent from non-typeable key
3 (Session info: chrome=98.0.4758.80) (Selenium::WebDriver::Error::UnknownError)
4 #0 0x55e9ce6a4093 <unknown>
5 #1 0x55e9ce16a648 <unknown>
6 #2 0x55e9ce1a9866 <unknown>
7 #3 0x55e9ce1cbd29 <unknown>
8 .....
9def sign_in(user)
10 visit new_sign_in_path
11 fill_in 'Email', with: user.email
12 fill_in 'Password', with: user.password
13 click_button 'Sign in'
14end
15driver.find_element('.email-input', 'user@mail.com')
16
Now I had to change it by:
1....
2unknown error: Cannot construct KeyEvent from non-typeable key
3 (Session info: chrome=98.0.4758.80) (Selenium::WebDriver::Error::UnknownError)
4 #0 0x55e9ce6a4093 <unknown>
5 #1 0x55e9ce16a648 <unknown>
6 #2 0x55e9ce1a9866 <unknown>
7 #3 0x55e9ce1cbd29 <unknown>
8 .....
9def sign_in(user)
10 visit new_sign_in_path
11 fill_in 'Email', with: user.email
12 fill_in 'Password', with: user.password
13 click_button 'Sign in'
14end
15driver.find_element('.email-input', 'user@mail.com')
16from selenium.webdriver.common.keys import Keys
17from selenium.webdriver.common.action_chains import ActionChains
18
19emailParts = 'user@mail.com'.split('@')
20emailElement = driver.find_element('.email-input')
21
22emailElement.send_keys(emailParts[0])
23action = ActionChains(driver)
24action.key_down(Keys.ALT).send_keys('2').key_up(Keys.ALT).perform()
25emailElement.send_keys(emailParts[1])
26
QUESTION
Is it possible to have Cucumber steps and Karate steps recognised at the same time in different feature files?
Asked 2022-Mar-08 at 20:08I have a Java Framework that contains some Cucumber Feature Files. It also contains some Karate Feature Files.
I have separate runners for each type of Feature File and both sets of tests run successfully.
However, when I view the Feature Files in Intellij...it always looks as though either the Cucumber or the Karate Step definitions cannot be found.
If I add ONLY a Karate dependency to the pom:
1 <dependency>
2 <groupId>com.intuit.karate</groupId>
3 <artifactId>karate-junit5</artifactId>
4 <version>1.1.0</version>
5 <scope>test</scope>
6 </dependency>
7
Then the karate steps in the Karate Feature Files are recognised but the Cucumber Steps in the Cucumber Feature Files are NOT recognised.
If I add ONLY a Cucumber dependency to the pom:
1 <dependency>
2 <groupId>com.intuit.karate</groupId>
3 <artifactId>karate-junit5</artifactId>
4 <version>1.1.0</version>
5 <scope>test</scope>
6 </dependency>
7 <dependency>
8 <groupId>io.cucumber</groupId>
9 <artifactId>cucumber-java</artifactId>
10 <version>7.2.3</version>
11 </dependency>
12
Then the Cucumber steps in the Cucumber Feature Files are recognised but the Karate Steps in the Karate Feature Files are NOT recognised.
Is there a way for BOTH to be recongnised at the same time?
I think it is a problem with the step definition location but I'm not sure how to overcome it.
ANSWER
Answered 2022-Mar-08 at 20:08IDEA uses a simple heuristics to determine which Cucumber version to use. If the latest version is detected, that one is used.
However Karate depends on the older versions of Cucumber. So when using Karate and a recent version of Cucumber IDEA will ignore Karate.
To fix this properly Peter would have to provide his own step definition annotations. And then IDEA could use those next to the ones from Cucumber.
But that means waiting for Jetbrains which I imagine Peter is loath to do.
QUESTION
Counting unique list items
Asked 2022-Mar-07 at 15:45Assuming I have a datatable dt.recipes
which consists of lists with various items, for example:
1recipe_id ingredients
21 apple, banana, cucumber, water
32 apple, meat, water
43 water
5
How can I create a table, counting the amount of unique items present in dt.recipes$ingredients
? In other words, I am looking for a result similar to this:
1recipe_id ingredients
21 apple, banana, cucumber, water
32 apple, meat, water
43 water
5ingredient count
6water 3
7apple 2
8banana 1
9cucumber 1
10meat 1
11
Any pointers would be greatly appreciated, thanks in advance!
ANSWER
Answered 2022-Mar-07 at 15:20You can do:
1recipe_id ingredients
21 apple, banana, cucumber, water
32 apple, meat, water
43 water
5ingredient count
6water 3
7apple 2
8banana 1
9cucumber 1
10meat 1
11 as.data.frame(table(unlist(strsplit(df$ingredients, ", "))))
12#> Var1 Freq
13#> 1 apple 2
14#> 2 banana 1
15#> 3 cucumber 1
16#> 4 meat 1
17#> 5 water 3
18
Data
1recipe_id ingredients
21 apple, banana, cucumber, water
32 apple, meat, water
43 water
5ingredient count
6water 3
7apple 2
8banana 1
9cucumber 1
10meat 1
11 as.data.frame(table(unlist(strsplit(df$ingredients, ", "))))
12#> Var1 Freq
13#> 1 apple 2
14#> 2 banana 1
15#> 3 cucumber 1
16#> 4 meat 1
17#> 5 water 3
18df <- structure(list(recipe_id = 1:3,
19 ingredients = c("apple, banana, cucumber, water",
20 "apple, meat, water",
21 "water")),
22 class = "data.frame", row.names = c(NA, -3L))
23
24df
25#> recipe_id ingredients
26#> 1 1 apple, banana, cucumber, water
27#> 2 2 apple, meat, water
28#> 3 3 water
29
Created on 2022-03-07 by the reprex package (v2.0.1)
QUESTION
Cypress stopped working with cucumber-preprocessor after 9.3.0
Asked 2022-Feb-03 at 09:16I have upgraded cypress version to 9.3.0 (and also tried above) from 9.2.0 and I keep getting this error from attachment.
Key thing is that I use cypress-cucumber-preprocessor https://www.npmjs.com/package/cypress-cucumber-preprocessor
I wanted upgrade to use natively .selectFile() instead of plugin. So far I could stick to 9.2.0 but it worries me in a long run.
My plugins/index.js
1/**
2 * @type {Cypress.PluginConfig}
3 */
4const cucumber = require("cypress-cucumber-preprocessor").default;
5
6module.exports = (on, config) => {
7 on("file:preprocessor", cucumber());
8};
9
ANSWER
Answered 2022-Feb-03 at 09:16For me it runs ok with Cypress@9.3.0 and cypress-cucumber-preprocessor@4.3.1 which is the latest tag on their Github repo.
But I notice that if you don't specify the version, you get cypress-cucumber-preprocessor@4.2.1, so I guess there's some catching up to do on npm.
In short, specify the latest version
1/**
2 * @type {Cypress.PluginConfig}
3 */
4const cucumber = require("cypress-cucumber-preprocessor").default;
5
6module.exports = (on, config) => {
7 on("file:preprocessor", cucumber());
8};
9yarn add cypress-cucumber-preprocessor@4.3.1
10
QUESTION
java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible:module
Asked 2022-Jan-19 at 19:22This is my first cucumber project and i followed a tutorial when setting everything up. It all seems to be the same but for some reason i get this:
java.lang.ExceptionInInitializerError. Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @74ad1f1f
Any idea how to solve this error ?
Below i have posted everything that comes out in my console as well as my pom file in case there is an issue with my dependencies eventhough the guy from the tutorial's pom file is identical.
This is everything that comes out in my Console.
1[31mFailed scenarios:[0m
2[31muni/login/Login.feature:3 [0m# Scenario: Enter the system.
31 Scenarios ([31m1 failed[0m)
45 Steps ([31m1 failed[0m, [36m4 skipped[0m)
50m0.185s
6
7java.lang.ExceptionInInitializerError
8 at cucumber.deps.com.thoughtworks.xstream.XStream.setupConverters(XStream.java:820)
9 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:574)
10 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:530)
11 at cucumber.runtime.xstream.LocalizedXStreams$LocalizedXStream.<init>(LocalizedXStreams.java:50)
12 at cucumber.runtime.xstream.LocalizedXStreams.newXStream(LocalizedXStreams.java:37)
13 at cucumber.runtime.xstream.LocalizedXStreams.get(LocalizedXStreams.java:29)
14 at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
15 at cucumber.runtime.Runtime.runStep(Runtime.java:300)
16 at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
17 at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
18 at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
19 at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
20 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
21 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
22 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
23 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
24 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
25 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
26 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
27 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
28 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
29 at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
30 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
31 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
32 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
33 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
34 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
35 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
36 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
37 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
38 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
39 at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
40 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
41 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
42 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
43 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
44 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
45 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
46 at ✽.Given Потребителят отваря екрана за вход в системата(uni/login/Login.feature:4)
47Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @74ad1f1f
48 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
49 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
50 at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
51 at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
52 at cucumber.deps.com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:39)
53 at cucumber.deps.com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50)
54 at cucumber.deps.com.thoughtworks.xstream.XStream.setupConverters(XStream.java:820)
55 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:574)
56 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:530)
57 at cucumber.runtime.xstream.LocalizedXStreams$LocalizedXStream.<init>(LocalizedXStreams.java:50)
58 at cucumber.runtime.xstream.LocalizedXStreams.newXStream(LocalizedXStreams.java:37)
59 at cucumber.runtime.xstream.LocalizedXStreams.get(LocalizedXStreams.java:29)
60 at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
61 at cucumber.runtime.Runtime.runStep(Runtime.java:300)
62 at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
63 at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
64 at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
65 at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
66 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
67 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
68 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
69 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
70 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
71 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
72 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
73 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
74 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
75 at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
76 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
77 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
78 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
79 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
80 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
81 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
82 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
83 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
84 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
85 at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
86 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
87 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
88 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
89 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
90 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
91 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
92
And this is my pom.xml
1[31mFailed scenarios:[0m
2[31muni/login/Login.feature:3 [0m# Scenario: Enter the system.
31 Scenarios ([31m1 failed[0m)
45 Steps ([31m1 failed[0m, [36m4 skipped[0m)
50m0.185s
6
7java.lang.ExceptionInInitializerError
8 at cucumber.deps.com.thoughtworks.xstream.XStream.setupConverters(XStream.java:820)
9 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:574)
10 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:530)
11 at cucumber.runtime.xstream.LocalizedXStreams$LocalizedXStream.<init>(LocalizedXStreams.java:50)
12 at cucumber.runtime.xstream.LocalizedXStreams.newXStream(LocalizedXStreams.java:37)
13 at cucumber.runtime.xstream.LocalizedXStreams.get(LocalizedXStreams.java:29)
14 at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
15 at cucumber.runtime.Runtime.runStep(Runtime.java:300)
16 at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
17 at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
18 at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
19 at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
20 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
21 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
22 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
23 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
24 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
25 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
26 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
27 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
28 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
29 at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
30 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
31 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
32 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
33 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
34 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
35 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
36 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
37 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
38 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
39 at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
40 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
41 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
42 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
43 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
44 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
45 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
46 at ✽.Given Потребителят отваря екрана за вход в системата(uni/login/Login.feature:4)
47Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @74ad1f1f
48 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
49 at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
50 at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:177)
51 at java.base/java.lang.reflect.Field.setAccessible(Field.java:171)
52 at cucumber.deps.com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:39)
53 at cucumber.deps.com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50)
54 at cucumber.deps.com.thoughtworks.xstream.XStream.setupConverters(XStream.java:820)
55 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:574)
56 at cucumber.deps.com.thoughtworks.xstream.XStream.<init>(XStream.java:530)
57 at cucumber.runtime.xstream.LocalizedXStreams$LocalizedXStream.<init>(LocalizedXStreams.java:50)
58 at cucumber.runtime.xstream.LocalizedXStreams.newXStream(LocalizedXStreams.java:37)
59 at cucumber.runtime.xstream.LocalizedXStreams.get(LocalizedXStreams.java:29)
60 at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:37)
61 at cucumber.runtime.Runtime.runStep(Runtime.java:300)
62 at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
63 at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
64 at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:44)
65 at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:102)
66 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
67 at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
68 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
69 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
70 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
71 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
72 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
73 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
74 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
75 at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
76 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:95)
77 at cucumber.api.junit.Cucumber.runChild(Cucumber.java:38)
78 at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
79 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
80 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
81 at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
82 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
83 at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
84 at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
85 at cucumber.api.junit.Cucumber.run(Cucumber.java:100)
86 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
87 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
88 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
89 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
90 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
91 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)
92<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
93 <modelVersion>4.0.0</modelVersion>
94 <groupId>uni.ais</groupId>
95 <artifactId>first-cucumber-project</artifactId>
96 <version>1.1.0-SNAPSHOT</version>
97 <name>first-cucumber-project-gr</name>
98 <properties>
99 <maven.compiler.target>1.8</maven.compiler.target>
100 <maven.compiler.source>1.8</maven.compiler.source>
101 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
102 </properties>
103 <dependencies>
104 <dependency>
105 <groupId>info.cukes</groupId>
106 <artifactId>cucumber-java</artifactId>
107 <version>1.2.5</version>
108 </dependency>
109 <dependency>
110 <groupId>info.cukes</groupId>
111 <artifactId>cucumber-junit</artifactId>
112 <version>1.2.5</version>
113 </dependency>
114 </dependencies>
115</project>
116
ANSWER
Answered 2022-Jan-19 at 19:22I solved my problem. Turns out the JRE that eclipse had automatically downloaded and was using wasn't compatible with this version of cucumber. I manually changed the path to a jre 1.8 that i had in my ProgramFilex(x86)/Java folder and now everything works fine.
QUESTION
how can I pass the cypress.json file to cypress-tags
Asked 2022-Jan-04 at 15:18I'm using cucumber preprocessor and we do not have a standard folder structure. The cypress.json file is under a e2e folder. With cypress open, it was fine because I could specify the cypress.json file location. However, with cypress-tags run, there seems to be no way to specify the location of the cypress.json file and it just fails with error:
1Failed to read cypress.json, using default configuration
2
3Could not find a Cypress configuration file, exiting.
4
Anyway to support a different folder structure with cucumber?
ANSWER
Answered 2021-Dec-16 at 16:38I also stumbled upon this problem and realized that this does not work actually.
As a workaround I therefore moved away from the approach of using cypress-tags and instead adjusted the naming of my feature files. This allowed me to avoid the use of cypress-tags and use the normal cypress run command instead specifying config and feature files like:
1Failed to read cypress.json, using default configuration
2
3Could not find a Cypress configuration file, exiting.
4cypress run --config-file some-cypress.json --spec **/*.integration.feature
5
QUESTION
Unable to build and deploy Rails 6.0.4.1 app on heroku - Throws gyp verb cli error
Asked 2022-Jan-02 at 10:07Hi i was deploying a branch on heroku and threw up this error. I also tried deploying a branch which worked perfectly, but that is also showing the same error.
local yarn verion : 1.22.17 local node version : v12.22.7 Please help !!!
Tried building without yarn.lock and package-lock same thing.
This is how it starts Heroku deployment build log through CLI
1yarn install v1.22.17
2remote: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
3remote: [1/5] Validating package.json...
4remote: [2/5] Resolving packages...
5remote: [3/5] Fetching packages...
6remote: [4/5] Linking dependencies...
7remote: warning " > webpack-dev-server@4.6.0" has unmet peer dependency "webpack@^4.37.0 || ^5.0.0".
8remote: warning "webpack-dev-server > webpack-dev-middleware@5.2.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
9remote: [5/5] Building fresh packages...
10remote: error /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass: Command failed.
11remote: Exit code: 1
12remote: Command: node scripts/build.js
13remote: Arguments:
14remote: Directory: /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass
15remote: Output:
16remote: Building: /tmp/build_df192222/bin/node /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
17remote: gyp info it worked if it ends with ok
18remote: gyp verb cli [
19remote: gyp verb cli '/tmp/build_df192222/bin/node',
20remote: gyp verb cli '/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js',
21remote: gyp verb cli 'rebuild',
22
. . . . . `
1yarn install v1.22.17
2remote: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
3remote: [1/5] Validating package.json...
4remote: [2/5] Resolving packages...
5remote: [3/5] Fetching packages...
6remote: [4/5] Linking dependencies...
7remote: warning " > webpack-dev-server@4.6.0" has unmet peer dependency "webpack@^4.37.0 || ^5.0.0".
8remote: warning "webpack-dev-server > webpack-dev-middleware@5.2.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
9remote: [5/5] Building fresh packages...
10remote: error /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass: Command failed.
11remote: Exit code: 1
12remote: Command: node scripts/build.js
13remote: Arguments:
14remote: Directory: /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass
15remote: Output:
16remote: Building: /tmp/build_df192222/bin/node /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
17remote: gyp info it worked if it ends with ok
18remote: gyp verb cli [
19remote: gyp verb cli '/tmp/build_df192222/bin/node',
20remote: gyp verb cli '/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js',
21remote: gyp verb cli 'rebuild',
22remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
23remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
24remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
25remote: | ^~~~~~~~~~~
26remote: | remove_cv
27remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
28remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
29remote: | ^~~~~~~~~~~
30remote: | remove_cv
31remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
32remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
33remote: | ^
34remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
35remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
36remote: | ^~~~~~~
37remote: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
38remote: ../src/binding.cpp:284:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
39remote: 284 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
40remote: | ^~~~~~~~~~~~
41remote: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
42remote: ../src/binding.cpp:320:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
43remote: 320 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
44remote: | ^~~~~~~~~~~~
45remote: In file included from ../../../../../nan/nan.h:58,
46remote: from ../src/binding.cpp:1:
47remote: ../src/binding.cpp: At global scope:
48remote: /app/.node-gyp/16.13.1/include/node/node.h:821:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
49remote: 821 | (node::addon_register_func) (regfunc), \
50remote: | ^
51remote: /app/.node-gyp/16.13.1/include/node/node.h:855:3: note: in expansion of macro ‘NODE_MODULE_X’
52remote: 855 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
53remote: | ^~~~~~~~~~~~~
54remote: ../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
55remote: 358 | NODE_MODULE(binding, RegisterModule);
56remote: | ^~~~~~~~~~~
57remote: make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
58remote: make: Leaving directory '/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass/build'
59remote: gyp ERR! build error
60remote: gyp ERR! stack Error: `make` failed with exit code: 2
61remote: gyp ERR! stack at ChildProcess.onExit (/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/lib/build.js:262:23)
62remote: gyp ERR! stack at ChildProcess.emit (node:events:390:28)
63remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
64remote: gyp ERR! System Linux 4.4.0-1097-aws
65remote: gyp ERR! command "/tmp/build_df192222/bin/node" "/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
66remote: gyp ERR! cwd /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass
67remote: gyp ERR! node -v v16.13.1
68remote: gyp ERR! node-gyp -v v3.8.0
69remote: gyp ERR! not ok
70remote: Build failed with error code: 1
71remote:
72remote: !
73remote: ! Precompiling assets failed.
74remote: !
75remote: ! Push rejected, failed to compile Ruby app.
76remote:
77remote: ! Push failed
78
Though it is a Rails app I added node in engines to package.json.
1yarn install v1.22.17
2remote: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
3remote: [1/5] Validating package.json...
4remote: [2/5] Resolving packages...
5remote: [3/5] Fetching packages...
6remote: [4/5] Linking dependencies...
7remote: warning " > webpack-dev-server@4.6.0" has unmet peer dependency "webpack@^4.37.0 || ^5.0.0".
8remote: warning "webpack-dev-server > webpack-dev-middleware@5.2.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
9remote: [5/5] Building fresh packages...
10remote: error /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass: Command failed.
11remote: Exit code: 1
12remote: Command: node scripts/build.js
13remote: Arguments:
14remote: Directory: /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass
15remote: Output:
16remote: Building: /tmp/build_df192222/bin/node /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
17remote: gyp info it worked if it ends with ok
18remote: gyp verb cli [
19remote: gyp verb cli '/tmp/build_df192222/bin/node',
20remote: gyp verb cli '/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js',
21remote: gyp verb cli 'rebuild',
22remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
23remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
24remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
25remote: | ^~~~~~~~~~~
26remote: | remove_cv
27remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
28remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
29remote: | ^~~~~~~~~~~
30remote: | remove_cv
31remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
32remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
33remote: | ^
34remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
35remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
36remote: | ^~~~~~~
37remote: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
38remote: ../src/binding.cpp:284:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
39remote: 284 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
40remote: | ^~~~~~~~~~~~
41remote: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
42remote: ../src/binding.cpp:320:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
43remote: 320 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
44remote: | ^~~~~~~~~~~~
45remote: In file included from ../../../../../nan/nan.h:58,
46remote: from ../src/binding.cpp:1:
47remote: ../src/binding.cpp: At global scope:
48remote: /app/.node-gyp/16.13.1/include/node/node.h:821:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
49remote: 821 | (node::addon_register_func) (regfunc), \
50remote: | ^
51remote: /app/.node-gyp/16.13.1/include/node/node.h:855:3: note: in expansion of macro ‘NODE_MODULE_X’
52remote: 855 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
53remote: | ^~~~~~~~~~~~~
54remote: ../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
55remote: 358 | NODE_MODULE(binding, RegisterModule);
56remote: | ^~~~~~~~~~~
57remote: make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
58remote: make: Leaving directory '/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass/build'
59remote: gyp ERR! build error
60remote: gyp ERR! stack Error: `make` failed with exit code: 2
61remote: gyp ERR! stack at ChildProcess.onExit (/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/lib/build.js:262:23)
62remote: gyp ERR! stack at ChildProcess.emit (node:events:390:28)
63remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
64remote: gyp ERR! System Linux 4.4.0-1097-aws
65remote: gyp ERR! command "/tmp/build_df192222/bin/node" "/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
66remote: gyp ERR! cwd /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass
67remote: gyp ERR! node -v v16.13.1
68remote: gyp ERR! node-gyp -v v3.8.0
69remote: gyp ERR! not ok
70remote: Build failed with error code: 1
71remote:
72remote: !
73remote: ! Precompiling assets failed.
74remote: !
75remote: ! Push rejected, failed to compile Ruby app.
76remote:
77remote: ! Push failed
78{
79 "name": "travel_empire",
80 "private": true,
81 "dependencies": {
82 "@fortawesome/fontawesome-free": "^5.15.4",
83 "@popperjs/core": "^2.10.2",
84 "@rails/actioncable": "^6.0.0",
85 "@rails/activestorage": "^6.0.0",
86 "@rails/ujs": "^6.0.0",
87 "@rails/webpacker": "4.3.0",
88 "bootstrap": "4.3.1",
89 "bootstrap-icons": "^1.5.0",
90 "easy-autocomplete": "^1.3.5",
91 "jquery": "^3.6.0",
92 "jquery-ui-dist": "^1.12.1",
93 "js-autocomplete": "^1.0.4",
94 "node-sass": "^7.0.0",
95 "popper.js": "^1.16.1",
96 "turbolinks": "^5.2.0"
97 },
98 "version": "0.1.0",
99 "devDependencies": {
100 "webpack-dev-server": "^4.6.0"
101 },
102 "engines": {
103 "node": "16.x"
104 }
105}
106
Gemfile
1yarn install v1.22.17
2remote: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
3remote: [1/5] Validating package.json...
4remote: [2/5] Resolving packages...
5remote: [3/5] Fetching packages...
6remote: [4/5] Linking dependencies...
7remote: warning " > webpack-dev-server@4.6.0" has unmet peer dependency "webpack@^4.37.0 || ^5.0.0".
8remote: warning "webpack-dev-server > webpack-dev-middleware@5.2.1" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
9remote: [5/5] Building fresh packages...
10remote: error /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass: Command failed.
11remote: Exit code: 1
12remote: Command: node scripts/build.js
13remote: Arguments:
14remote: Directory: /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass
15remote: Output:
16remote: Building: /tmp/build_df192222/bin/node /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
17remote: gyp info it worked if it ends with ok
18remote: gyp verb cli [
19remote: gyp verb cli '/tmp/build_df192222/bin/node',
20remote: gyp verb cli '/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js',
21remote: gyp verb cli 'rebuild',
22remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
23remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
24remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
25remote: | ^~~~~~~~~~~
26remote: | remove_cv
27remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:38: error: ‘remove_cv_t’ is not a member of ‘std’; did you mean ‘remove_cv’?
28remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
29remote: | ^~~~~~~~~~~
30remote: | remove_cv
31remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:50: error: template argument 2 is invalid
32remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
33remote: | ^
34remote: /app/.node-gyp/16.13.1/include/node/v8-internal.h:492:63: error: ‘::Perform’ has not been declared
35remote: 492 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
36remote: | ^~~~~~~
37remote: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render(Nan::NAN_METHOD_ARGS_TYPE)’:
38remote: ../src/binding.cpp:284:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
39remote: 284 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
40remote: | ^~~~~~~~~~~~
41remote: ../src/binding.cpp: In function ‘Nan::NAN_METHOD_RETURN_TYPE render_file(Nan::NAN_METHOD_ARGS_TYPE)’:
42remote: ../src/binding.cpp:320:98: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
43remote: 320 | int status = uv_queue_work(uv_default_loop(), &ctx_w->request, compile_it, (uv_after_work_cb)MakeCallback);
44remote: | ^~~~~~~~~~~~
45remote: In file included from ../../../../../nan/nan.h:58,
46remote: from ../src/binding.cpp:1:
47remote: ../src/binding.cpp: At global scope:
48remote: /app/.node-gyp/16.13.1/include/node/node.h:821:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
49remote: 821 | (node::addon_register_func) (regfunc), \
50remote: | ^
51remote: /app/.node-gyp/16.13.1/include/node/node.h:855:3: note: in expansion of macro ‘NODE_MODULE_X’
52remote: 855 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
53remote: | ^~~~~~~~~~~~~
54remote: ../src/binding.cpp:358:1: note: in expansion of macro ‘NODE_MODULE’
55remote: 358 | NODE_MODULE(binding, RegisterModule);
56remote: | ^~~~~~~~~~~
57remote: make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
58remote: make: Leaving directory '/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass/build'
59remote: gyp ERR! build error
60remote: gyp ERR! stack Error: `make` failed with exit code: 2
61remote: gyp ERR! stack at ChildProcess.onExit (/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/lib/build.js:262:23)
62remote: gyp ERR! stack at ChildProcess.emit (node:events:390:28)
63remote: gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
64remote: gyp ERR! System Linux 4.4.0-1097-aws
65remote: gyp ERR! command "/tmp/build_df192222/bin/node" "/tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
66remote: gyp ERR! cwd /tmp/build_df192222/node_modules/@rails/webpacker/node_modules/node-sass
67remote: gyp ERR! node -v v16.13.1
68remote: gyp ERR! node-gyp -v v3.8.0
69remote: gyp ERR! not ok
70remote: Build failed with error code: 1
71remote:
72remote: !
73remote: ! Precompiling assets failed.
74remote: !
75remote: ! Push rejected, failed to compile Ruby app.
76remote:
77remote: ! Push failed
78{
79 "name": "travel_empire",
80 "private": true,
81 "dependencies": {
82 "@fortawesome/fontawesome-free": "^5.15.4",
83 "@popperjs/core": "^2.10.2",
84 "@rails/actioncable": "^6.0.0",
85 "@rails/activestorage": "^6.0.0",
86 "@rails/ujs": "^6.0.0",
87 "@rails/webpacker": "4.3.0",
88 "bootstrap": "4.3.1",
89 "bootstrap-icons": "^1.5.0",
90 "easy-autocomplete": "^1.3.5",
91 "jquery": "^3.6.0",
92 "jquery-ui-dist": "^1.12.1",
93 "js-autocomplete": "^1.0.4",
94 "node-sass": "^7.0.0",
95 "popper.js": "^1.16.1",
96 "turbolinks": "^5.2.0"
97 },
98 "version": "0.1.0",
99 "devDependencies": {
100 "webpack-dev-server": "^4.6.0"
101 },
102 "engines": {
103 "node": "16.x"
104 }
105}
106source 'https://rubygems.org'
107git_source(:github) { |repo| "https://github.com/#{repo}.git" }
108
109ruby '2.7.3'
110
111# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
112gem 'rails', '~> 6.0.3', '>= 6.0.3.7'
113
114gem 'mongoid', git: 'https://github.com/mongodb/mongoid.git'
115
116
117# Use Puma as the app server
118gem 'puma', '~> 4.1'
119# Use SCSS for stylesheets
120gem 'sass-rails', '>= 6'
121# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
122gem 'webpacker', '~> 4.0'
123# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
124gem 'turbolinks', '~> 5'
125# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
126gem 'jbuilder', '~> 2.7'
127# Use Redis adapter to run Action Cable in production
128# gem 'redis', '~> 4.0'
129# Use Active Model has_secure_password
130
131
132# Use Active Storage variant
133# gem 'image_processing', '~> 1.2'
134
135
136gem 'axlsx'
137gem 'caxlsx_rails'
138
139
140#Bootstrap for UI
141gem 'bootstrap', '~> 5.1.0'
142gem 'bootstrap-timepicker-rails', '~> 0.1.3'
143gem 'bootstrap-select-rails', '~> 1.6', '>= 1.6.3'
144#JQuery Rails
145gem 'jquery-rails'
146
147 gem 'rails_12factor', group: :production
148# Reduces boot times through caching; required in config/boot.rb
149gem 'bootsnap', '>= 1.4.2', require: false
150
151group :development, :test do
152 # Call 'byebug' anywhere in the code to stop execution and get a debugger console
153 gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
154end
155
156group :development do
157 # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
158 gem 'web-console', '>= 3.3.0'
159 gem 'listen', '~> 3.2'
160 gem 'pry'
161 # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
162 gem 'spring'
163 gem 'spring-watcher-listen', '~> 2.0.0'
164end
165
166group :test do
167 # Adds support for Capybara system testing and selenium driver
168 gem 'capybara', '>= 2.15'
169 gem 'selenium-webdriver'
170 # Easy installation and use of web drivers to run system tests with browsers
171 gem 'webdrivers'
172 gem 'cucumber-rails', require: false
173 gem 'database_cleaner'
174end
175
176# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
177gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
178
179#HTTParty for RESTful API calls
180gem 'httparty'
181
182
183#Paperclip for storing files
184gem 'paperclip'
185gem "mongoid-paperclip", :require => "mongoid_paperclip"
186
187gem "letter_opener", :group => :development
188
ANSWER
Answered 2021-Dec-18 at 14:32I had a similar problem but resolved by following steps.
- Run the following command.
heroku buildpacks:add heroku/nodejs --index 1
- Update node version from
16.x
to12.16.2
in package.json.
QUESTION
Clustering in R using K-mean
Asked 2021-Dec-17 at 17:31I tried to cluster my dataset using K-mean, but there is a categorical data in column 9; so when I ran k-mean it had an error like this:
1res<-NbClust(mi[2:9],min.nc=2,max.nc=15,method="ward.D2")
2
Error in t(jeu) %*% jeu : requires numeric/complex matrix/vector arguments
So I could only run K-mean for columns from 2 to 8. I wonder if there is another way of clustering the data where I could run with column 9 as well?
Data:
1res<-NbClust(mi[2:9],min.nc=2,max.nc=15,method="ward.D2")
2df <- structure(list(Name = structure(c(58L, 188L, 40L, 155L, 32L, 88L, 92L, 55L, 135L, 31L, 139L, 26L, 126L, 10L, 166L, 104L, 75L, 180L, 35L, 175L, 77L, 99L, 4L, 71L, 141L, 176L, 53L, 39L, 172L, 196L, 123L, 107L, 16L, 96L, 82L, 185L, 30L, 15L, 94L, 129L, 187L, 151L, 33L, 23L, 28L, 44L, 157L, 69L, 132L, 83L, 131L, 11L, 182L, 181L, 54L, 115L, 116L, 183L, 150L, 195L, 45L, 144L, 1L, 110L, 17L, 114L, 9L, 117L, 112L, 70L, 34L, 169L, 27L, 66L, 3L, 73L, 133L, 91L, 154L, 130L, 160L, 105L, 90L, 165L, 67L, 100L, 162L, 98L, 29L, 68L, 189L, 192L, 102L, 190L, 134L, 136L, 52L, 12L, 81L, 59L, 63L, 122L, 93L, 109L, 178L, 138L, 5L, 43L, 140L, 95L, 2L, 174L, 76L, 51L, 156L, 60L, 149L, 128L, 177L, 142L, 103L, 7L, 8L, 14L, 164L, 74L, 145L, 148L, 113L, 86L, 108L, 48L, 163L, 6L, 186L, 89L, 36L, 191L, 125L, 120L, 62L, 65L, 124L, 168L, 147L, 79L, 173L, 84L, 193L, 25L, 146L, 121L, 127L, 153L, 13L, 106L, 119L, 161L, 49L, 97L, 101L, 61L, 137L, 24L, 85L, 194L, 78L, 41L, 170L, 47L, 118L, 184L, 179L, 72L, 42L, 111L, 87L, 57L, 38L, 37L, 171L, 22L, 50L, 80L, 159L, 18L, 152L, 64L, 56L, 158L, 167L, 46L, 19L, 21L, 20L, 143L), .Label = c("#Mashtag 2013", "#Mashtag 2014", "#Mashtag 2015", "10 Heads High", "5am Saint", "77 Lager", "AB:02", "AB:03", "AB:04", "AB:06", "AB:08", "AB:10", "AB:11", "AB:13", "AB:15", "AB:17", "AB:18", "AB:20", "Ace Of Chinook", "Ace Of Citra", "Ace Of Equinox", "Ace Of Simcoe", "Albino Squid Assasin", "Alice Porter", "All Day Long - Prototype Challenge", "Alpha Dog", "Alpha Pop", "Amarillo - IPA Is Dead", "American Ale", "Anarchist Alchemist", "Arcade Nation", "Avery Brown Dredge", "Baby Dogma", "Baby Saison - B-Sides", "Bad Pixie", "Barley Wine - Russian Doll", "Barrel Aged Albino Squid Assassin", "Barrel Aged Hinterland", "Berliner Weisse With Raspberries And Rhubarb - B-Sides", "Berliner Weisse With Yuzu - B-Sides", "Bitch Please (w/ 3 Floyds)", "Black Dog", "Black Eye Joe (w/ Stone Brewing Co)", "Black Eyed King Imp", "Black Eyed King Imp - Vietnamese Coffee Edition", "Black Hammer", "Black Jacques", "Black Tokyo Horizon (w/Nøgne Ã\230 & Mikkeller)", "Blitz Berliner Weisse", "Blitz Series", "Born To Die", "Bounty Hunter - Shareholder Brew", "Bourbon Baby", "Bracken's Porter", "Bramling X", "Brewdog Vs Beavertown", "Brixton Porter", "Buzz", "Candy Kaiser", "Cap Dog (w/ Cap Brewery)", "Catherine's Pony (w/ Beavertown)", "Challenger", "Chaos Theory", "Chili Hammer", "Chinook - IPA Is Dead", "Citra", "Clown King", "Cocoa Psycho", "Coffee Imperial Stout", "Comet", "Dana - IPA Is Dead", "Dead Metaphor", "Dead Pony Club", "Deaf Mermaid - B-Sides", "Devine Rebel (w/ Mikkeller)", "Dog A", "Dog B", "Dog C", "Dog D", "Dog E", "Dog Fight (w/ Flying Dog)", "Dog Wired (w/8 Wired)", "Dogma", "Doodlebug", "Double IPA - Russian Doll", "Edge", "El Dorado - IPA Is Dead", "Electric India", "Ella - IPA Is Dead", "Elvis Juice V2.0 - Prototype Challenge", "Everday Anarchy", "Fake Lager", "Galaxy", "Goldings - IPA Is Dead", "Growler", "Hardcore IPA", "Hardkogt IPA", "HBC 366 - IPA Is Dead", "HBC 369", "Hello My Name Is Beastie", "Hello My Name Is Holy Moose", "Hello My Name Is Ingrid", "Hello My Name Is Little Ingrid", "Hello My Name Is Mette-Marit", "Hello My Name Is PaÌ\210ivi", "Hello My Name is Sonja (w/ Evil Twin)", "Hello My Name is Vladimir", "Hello My Name Is ZeÌ\201 (w/ 2Cabeças)", "Hinterland", "Hobo Pop", "Hop Fiction - Prototype Challenge", "Hopped-Up Brown Ale - Prototype Challenge", "Hoppy Christmas", "Hops Kill Nazis", "Hunter Foundation Pale Ale", "Hype", "India Session Lager - Prototype Challenge", "International Arms Race (w/ Flying Dog)", "Interstellar", "Jack Hammer", "Jasmine IPA", "Jet Black Heart", "Kohatu - IPA Is Dead", "Konnichiwa Kitsune", "Libertine Black Ale", "Libertine Porter", "Lichtenstein Pale Ale", "Lizard Bride - Prototype Challenge", "Lost Dog (w/Lost Abbey)", "Lumberjack Stout", "Magic Stone Dog (w/Magic Rock & Stone Brewing Co.)", "Mandarina Bavaria - IPA Is Dead", "Mango Gose - B-Sides", "Melon And Cucumber IPA - B-Sides", "Misspent Youth", "Morag's Mojito - B-Sides", "Moshi Moshi 15", "Motueka", "Movember", "Mr.Miyagi's Wasabi Stout", "Nanny State", "Nelson Sauvin", "Neon Overlord", "Never Mind The Anabolics", "No Label", "Nuns With Guns", "Old World India Pale Ale", "Old World Russian Imperial Stout", "Orange Blossom - B-Sides", "Pale - Russian Doll", "Paradox Islay", "Paradox Islay 2.0", "Paradox Jura", "Peroxide Punk", "Pilsen Lager", "Pioneer - IPA Is Dead", "Prototype 27", "Prototype Helles", "Prototype Pils 2.0", "Pumpkin King", "Punk IPA 2007 - 2010", "Punk IPA 2010 - Current", "Restorative Beverage For Invalids And Convalescents", "Rhubarb Saison - B-Sides", "Riptide", "Russian Doll â\200“ India Pale Ale", "Rye Hammer", "San Diego Scotch Ale (w/Ballast Point)", "Santa Paws", "Shareholder Black IPA 2011", "Ship Wreck", "Shipwrecker Circus (w/ Oskar Blues)", "Simcoe", "Sink The Bismarck!", "Skull Candy", "Sorachi Ace", "Sorachi Bitter - B-Sides", "Spiced Cherry Sour - B-Sides", "Stereo Wolf Stout - Prototype Challenge", "Storm", "Sub Hop", "Sunk Punk", "Sunmaid Stout", "Sunshine On Rye - B-Sides", "The Physics", "This. Is. Lager", "TM10", "Trashy Blonde", "Truffle and Chocolate Stout - B-Sides", "U-Boat (w/ Victory Brewing)", "Vagabond Pale ALe - Prototype Challenge", "Vagabond Pilsner", "Vic Secret", "Waimea - IPA Is Dead", "Whisky Sour - B-Sides", "Zephyr"), class = "factor"), ABV = c(4.5, 4.1, 4.2, 6.3, 7.2, NA, 4.7, 7.5, 7.3, 5.3, 4.5, 4.5, 6.1, 11.2, 6, 8.2, 12.5, 8, 4.7, 3.5, 15, 6.7, 7.8, 6.7, 0.5, 7.5, 5.8, 3.6, 10.5, 12.5, 7.2, 8.2, 10.7, 9.2, 7.1, 5, 16.5, 12.8, 6.7, 10, NA, 10, 4.5, 7.4, 7.2, 9.5, 9.2, 9, 7.2, 7.5, NA, 10.43, 7.1, 8, 5, 5.4, 4.1, 10.2, 4, 7, 12.7, 6.5, 7.5, 4.2, 11.8, 7.6, 15, 4.4, 6.3, 7.2, NA, 4.5, 4.5, 7.5, 10, 3.8, 6.4, NA, 4, 15.2, 5.4, 8.3, 6.5, 8, 12, 8.2, 5.6, 7.2, 6.3, 10, 5.6, 4.5, 8.2, 8.4, 6, 6.7, 6.5, 11.5, 8.5, 5.2, 7.1, 4.7, 6.7, 9, 6.5, 6.7, 5, 5.8, 7.5, 4.5, 9, 41, 15, 8.5, 7.2, 9, 3.8, 5.7, 6.3, 7.5, 4.4, 18, 10.5, 11.3, NA, 5.2, 4.5, 9.5, 7.2, 2.7, 6.4, 17.2, 8.5, 4.9, 4.7, 7.2, 10, 4.5, 7.2, 7.2, 6.7, 7.2, 4.4, 9, 7.5, 16.1, 6.7, 2.5, 7.4, 2.8, 4.2, 5.8, 5.2, 10, 12.8, 8.3, 6.5, 6, 3, 7.6, 5.5, 8.8, 5.2, 5.2, 8, 6.7, 15, 11.5, 7.1, NA, 7.5, 7.2, 5.2, 6.8, 5.5, 5.2, 6.7, 5, 9, 9.2, 13.8, 4.5, 3.2, 16.1, 4.7, 14.2, 13, 7.2, 9.2, 4.9, 7.2, 7.2, 4.5, 4.5, 4.5, 7.6), IBU = c(60, 41.5, 8, 55, 59, 38, 40, 75, 30, 60, 50, 42, 45, 150, 70, 70, 100, 60, 45, 33, 90, 67, 70, 70, 55, 75, 35, 8, 85, 125, 70, 70, 100, 125, 65, 47, 20.5, 50, 70, 35, 20, 55, 35, 65, 70, 85, 149, 65, 100, 30, 30, 65, 68, 35, 50, 35, 65, 50, 35, 20, 85, 35, 50, 50, 80, 70, 80, 35, 85, 70, 9, 35, 30, 70, 85, 35, 40, 45, 40, 20, 20, 70, 60, 45, 85, 42, 40, 70, 55, 85, 30, 55, 42, 50, 50, 40, 35, 80, 65, 45, 90, 45, 67, 85, 20, 67, 30, 40, 90, 38, 50, 1085, 90, 85, 100, 80, 20, 35, 130, 75, 35, 70, 14, 50, 25, 65, 25, 80, 70, 36, 50, 75, 100, 30, 37, 100, 80, 55, 50, 250, 67, 100, 70, 70, 80, 85, 70, 35, 70, 30, 25, 40, 50, 55, 70, 70, 55, 60, 8, 175, 35, 40, 45, 55, 85, 70, 90, 50, 80, 45, 0, 130, 55, 30, 60, 40, 70, 50, 85, 65, 60, 40, 8, 100, 25, 20, 100, 250, 50, 18, 250, 250, 40, 40, 40, 70), OG = c(1044, 1041.7, 1040, 1060, 1069, 1045, 1046, 1068, 1079, 1052, 1047, 1046, 1067, 1098, 1058, 1076, 1093, 1082, 1047, 1038, 1120, 1013, 1074, 1066, 1007, 1068, 1049, 1040, 1102, 1087, 1067, 1076, 1105, 1085, 1065, 1048.5, 1112, 1096, 1066, 1080, 1048, 1090, 1048, 1069, 1067, 1095, 1083, 1080, 1064, 1080, 1043, 1095, 1056, 1077, 1049, 1050, 1042, 1026, 1041, 1081, 1113.5, 1050, 1070, 1042, 1096, 1073, 1113, 1040, 1063, 1067, 1032, 1048, 1045, 1068, 1098, 1040, 1057, 1081, 1039, 1110, 1055, 1076, 1060, 1075, 1130, 1078, 1055, 1067, 1060, 1098, 1058, 1046, 1078, 1080, 1050, 1063, 1068, 1096, 1078, 1049, 1067, 1055, 1013, 1094, 1060, 1013, 1050, 1053, 1072, 1042.9, 1084, 1085, 1120, 1072, 1064, 1083, 1039, 1053, 1060, 1068, 1045, 1150, 1093, 1098, 1052, 1048, 1043, 1075, 1067, 1033, 1061, 1156, 1068, 1047, 1043, 1064, 1097, 1045, 1068, 1065, 1064, 1064, 1045, 1090, 1069, 1125, 1063, 1027, 1069, 1032.5, 1044, 1060, 1050, 1128, 1108, 1076, 1059, 1056, 1007, 1072, 1053, 1084, 1048, 1053, 1074, 1066, 1120, 1104, 1067, 1089, 1069, 1065, 1052, 1068, 1062, 1048, 1066, 1053, 1094, 1069, 1088, 1045, 1007, 1015, 1008, 1025, 1015, 1065, 1016, 1010, 1065, 1065, 1045, 1045, 1045, 1067), EBC = c(20, 15, 8, 30, 10, 15, 12, 22, 120, 200, 140, 62, 219, 70, 25, NA, 36, 12, 8, 50, 100, 19, 90, 30, 30, 30, 44, NA, 64, 40, 30, 16, 300, 40, 13, 65, 20, 111, 30, 80, 14, 300, 40, 60, 30, 250, 19.5, 97, 12, 46, 15, 23, 14, 15, 110, 11.5, 17, 197, 45, 12, 250, 23, 40, 30, 115, 59, 400, 12, 24, 30, 2, 44, 25, 30, 130, 25, 10, 15, 18, 158, 30, 30, 25, 240, 24, 90, 15, 30, 30, 30, 54, 25, 70, 200, 8, 15, 250, 115, 31.2, 45, 15, 200, 19, 400, NA, 19, 60, 177.3, 200, 18, 20, 40, 100, 15, 12, 180, 6, 25, 14, 30, 30, 57, NA, 164, 10, 16, 10, 195, 30, 57, 20, 128, 15, 12, 10, 12, 65, 20, 150, 15, 19, 12, 30, 190, 50, 400, 30, 10, 30, 42, 19, 35, 17, 300, 79, 30, 50, 17, 9, 40, 25, 190, 35, 165, 35, 30, 100, 38, 71, 15, 50, 14, 200, 86, 230, 13, 30, 200, 400, 60, 25, 18, 8, 500, 25, 67, 300, 15, 78.8, 13, 17, 104, 18, 18, 18, 20), PH = c(4.4, 4.4, 3.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.2, 5.2, 4.4, 4.4, 4.4, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 3.2, 4.4, 4.4, 4.4, 4.4, 4.3, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.2, 4.4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.5, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 3.2, 5.2, 4.4, 4.4, 4.4, 5.2, 4.4, 4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 3.5, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.2, 4.4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.3, 3.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.4, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.2, 4.5, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.2, 4.4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.3, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 3.2, 4.4, 4.4, 4.5, 4.4, 5.2, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.3, 4.2, 4.4, 4.2, 3.2, 4.4, 4.2, 4, 4.4, 4.4, 4.2, 4.2, 4.4, 4.4, 4.2, 4.2, 4.2, 4.4), AttenuationLevel = c(75, 76, 83, 80, 67, 88.9, 78, 80.9, 74.7, 77, 74.5, 72.8, 70.1, 87, 79.3, 83, 68, 86, 79, 68.4, 98, 79.7, 79.7, 77.3, 28.6, 82.1, 90, 83, 102, 81.2, 82.1, 83, 76.2, 81.2, 85, 79.4, 100, 79.17, 77.3, 85, 89.6, 84.4, 72.9, 82.6, 82.1, 76.8, 83, 76, 84, 70, 81.4, 83.2, 82.1, 79.2, 79, 84, 76.2, 74.5, 75.6, 74, 76.8, 76, 81.4, 76.2, 79.2, 79.5, 84.1, 79.5, 82.6, 82.1, 88, 72.9, 75.6, 82.1, 79.6, 70, 87, 93.8, 76.9, 82, 74.6, 82.9, 83.3, 81.3, 102.3, 83.3, 78, 82.1, 80, 70, 74, 73.9, 83.3, 81.3, 87, 84, 70.6, 79.2, 84.6, 81.6, 80.6, 70, 79.7, 73.4, 87, 79.7, 76, 84.9, 79.2, 81, 82.1, 81.2, 98, 90.3, 84, 83.1, 87, 79.3, 83, 82.1, 73.3, 93.3, 80, 79.6, 87, 79, 79.1, 81.3, 82.1, 70.8, 80.3, 80.8, 95.6, 80.7, 83.7, 84, 79.4, 73.9, 78.6, 84.6, 79.7, 84, 82.9, 80, 82.6, 84, 81, 70.4, 82.6, 63.1, 72.7, 76.7, 80, 89, 81.5, 82.9, 81.4, 82.14, 82.5, 80.6, 79.3, 79.8, 77.1, 75.5, 82.4, 77.3, 98, 85, 79, 94.4, 81.1, 87, 73.1, 76.5, 67.7, 79.2, 77.3, 73.6, 73.4, 82.6, 83, 75.6, 78, 84, 75.6, 75.6, 84.4, 84.6, 81, 78.7, 84.6, 84.6, 75.6, 75.6, 75.6, 82), FermentationTempCelsius = c(19L, 18L, 21L, 9L, 10L, 22L, 10L, 19L, 19L, 19L, 19L, 22L, 18L, 17L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 18L, 19L, 19L, 19L, 19L, 21L, 21L, 21L, 19L, 21L, 21L, 21L, 9L, 19L, 20L, 21L, 19L, 19L, 22L, 21L, 19L, 18L, 19L, 18L, 19L, 19L, 19L, 12L, 23L, 21L, 10L, 9L, 19L, 19L, 19L, 21L, 19L, 19L, 18L, 18L, 21L, 19L, 20L, 20L, 21L, 10L, 19L, 19L, 21L, 19L, 19L, 19L, 21L, 19L, 20L, 23L, 19L, 21L, 19L, 21L, 19L, 20L, 21L, 21L, 19L, 19L, 19L, 21L, 19L, 9L, 22L, 14L, 20L, 19L, 19L, 20L, 18L, 14L, 19L, 19L, 19L, 21L, 20L, 19L, 19L, 19L, 21L, 10L, 21L, 21L, 19L, 18L, 19L, 21L, 20L, 17L, 20L, 19L, 19L, 22L, 19L, 20L, 20L, 19L, 15L, 19L, 19L, 19L, 19L, 21L, 21L, 10L, 12L, 19L, 21L, 19L, 19L, 21L, 19L, 19L, 20L, 21L, 22L, 21L, 99L, 19L, 19L, 22L, 16L, 19L, 19L, 21L, 18L, 21L, 19L, 19L, 19L, 21L, 17L, 21L, 19L, 19L, 19L, 19L, 19L, 21L, 19L, 23L, 19L, 20L, 19L, 19L, 19L, 19L, 19L, 19L, 21L, 18L, 21L, 19L, 21L, 21L, 12L, 21L, 21L, 21L, 21L, 12L, 21L, 21L, 19L, 19L, 19L, 21L), Yeast = structure(c(1L, 1L, 1L, 3L, 3L, 4L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 3L, 1L, 2L, 2L, 1L, 2L, 4L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 3L, 4L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 3L, 1L, 1L, 4L, 1L, 1L, 1L, 2L, 1L, 1L, 4L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 3L, 2L, 3L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 3L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 4L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 3L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 3L, 2L, 2L, 2L, 2L, 3L, 2L, 2L, 1L, 1L, 1L, 2L), .Label = c("Wyeast 1056 - American Ale", "Wyeast 1272 - American Ale II", "Wyeast 2007 - Pilsen Lager", "Wyeast 3711 - French Saison"), class = "factor")), class = "data.frame", row.names = c(NA, -196L))
3df
4
ANSWER
Answered 2021-Dec-17 at 17:31To solve your specific issue, you can generate dummy variables to run your desired clustering.
One way to do it is using the dummy_columns()
function from the fastDummies
package.
1res<-NbClust(mi[2:9],min.nc=2,max.nc=15,method="ward.D2")
2df <- structure(list(Name = structure(c(58L, 188L, 40L, 155L, 32L, 88L, 92L, 55L, 135L, 31L, 139L, 26L, 126L, 10L, 166L, 104L, 75L, 180L, 35L, 175L, 77L, 99L, 4L, 71L, 141L, 176L, 53L, 39L, 172L, 196L, 123L, 107L, 16L, 96L, 82L, 185L, 30L, 15L, 94L, 129L, 187L, 151L, 33L, 23L, 28L, 44L, 157L, 69L, 132L, 83L, 131L, 11L, 182L, 181L, 54L, 115L, 116L, 183L, 150L, 195L, 45L, 144L, 1L, 110L, 17L, 114L, 9L, 117L, 112L, 70L, 34L, 169L, 27L, 66L, 3L, 73L, 133L, 91L, 154L, 130L, 160L, 105L, 90L, 165L, 67L, 100L, 162L, 98L, 29L, 68L, 189L, 192L, 102L, 190L, 134L, 136L, 52L, 12L, 81L, 59L, 63L, 122L, 93L, 109L, 178L, 138L, 5L, 43L, 140L, 95L, 2L, 174L, 76L, 51L, 156L, 60L, 149L, 128L, 177L, 142L, 103L, 7L, 8L, 14L, 164L, 74L, 145L, 148L, 113L, 86L, 108L, 48L, 163L, 6L, 186L, 89L, 36L, 191L, 125L, 120L, 62L, 65L, 124L, 168L, 147L, 79L, 173L, 84L, 193L, 25L, 146L, 121L, 127L, 153L, 13L, 106L, 119L, 161L, 49L, 97L, 101L, 61L, 137L, 24L, 85L, 194L, 78L, 41L, 170L, 47L, 118L, 184L, 179L, 72L, 42L, 111L, 87L, 57L, 38L, 37L, 171L, 22L, 50L, 80L, 159L, 18L, 152L, 64L, 56L, 158L, 167L, 46L, 19L, 21L, 20L, 143L), .Label = c("#Mashtag 2013", "#Mashtag 2014", "#Mashtag 2015", "10 Heads High", "5am Saint", "77 Lager", "AB:02", "AB:03", "AB:04", "AB:06", "AB:08", "AB:10", "AB:11", "AB:13", "AB:15", "AB:17", "AB:18", "AB:20", "Ace Of Chinook", "Ace Of Citra", "Ace Of Equinox", "Ace Of Simcoe", "Albino Squid Assasin", "Alice Porter", "All Day Long - Prototype Challenge", "Alpha Dog", "Alpha Pop", "Amarillo - IPA Is Dead", "American Ale", "Anarchist Alchemist", "Arcade Nation", "Avery Brown Dredge", "Baby Dogma", "Baby Saison - B-Sides", "Bad Pixie", "Barley Wine - Russian Doll", "Barrel Aged Albino Squid Assassin", "Barrel Aged Hinterland", "Berliner Weisse With Raspberries And Rhubarb - B-Sides", "Berliner Weisse With Yuzu - B-Sides", "Bitch Please (w/ 3 Floyds)", "Black Dog", "Black Eye Joe (w/ Stone Brewing Co)", "Black Eyed King Imp", "Black Eyed King Imp - Vietnamese Coffee Edition", "Black Hammer", "Black Jacques", "Black Tokyo Horizon (w/Nøgne Ã\230 & Mikkeller)", "Blitz Berliner Weisse", "Blitz Series", "Born To Die", "Bounty Hunter - Shareholder Brew", "Bourbon Baby", "Bracken's Porter", "Bramling X", "Brewdog Vs Beavertown", "Brixton Porter", "Buzz", "Candy Kaiser", "Cap Dog (w/ Cap Brewery)", "Catherine's Pony (w/ Beavertown)", "Challenger", "Chaos Theory", "Chili Hammer", "Chinook - IPA Is Dead", "Citra", "Clown King", "Cocoa Psycho", "Coffee Imperial Stout", "Comet", "Dana - IPA Is Dead", "Dead Metaphor", "Dead Pony Club", "Deaf Mermaid - B-Sides", "Devine Rebel (w/ Mikkeller)", "Dog A", "Dog B", "Dog C", "Dog D", "Dog E", "Dog Fight (w/ Flying Dog)", "Dog Wired (w/8 Wired)", "Dogma", "Doodlebug", "Double IPA - Russian Doll", "Edge", "El Dorado - IPA Is Dead", "Electric India", "Ella - IPA Is Dead", "Elvis Juice V2.0 - Prototype Challenge", "Everday Anarchy", "Fake Lager", "Galaxy", "Goldings - IPA Is Dead", "Growler", "Hardcore IPA", "Hardkogt IPA", "HBC 366 - IPA Is Dead", "HBC 369", "Hello My Name Is Beastie", "Hello My Name Is Holy Moose", "Hello My Name Is Ingrid", "Hello My Name Is Little Ingrid", "Hello My Name Is Mette-Marit", "Hello My Name Is PaÌ\210ivi", "Hello My Name is Sonja (w/ Evil Twin)", "Hello My Name is Vladimir", "Hello My Name Is ZeÌ\201 (w/ 2Cabeças)", "Hinterland", "Hobo Pop", "Hop Fiction - Prototype Challenge", "Hopped-Up Brown Ale - Prototype Challenge", "Hoppy Christmas", "Hops Kill Nazis", "Hunter Foundation Pale Ale", "Hype", "India Session Lager - Prototype Challenge", "International Arms Race (w/ Flying Dog)", "Interstellar", "Jack Hammer", "Jasmine IPA", "Jet Black Heart", "Kohatu - IPA Is Dead", "Konnichiwa Kitsune", "Libertine Black Ale", "Libertine Porter", "Lichtenstein Pale Ale", "Lizard Bride - Prototype Challenge", "Lost Dog (w/Lost Abbey)", "Lumberjack Stout", "Magic Stone Dog (w/Magic Rock & Stone Brewing Co.)", "Mandarina Bavaria - IPA Is Dead", "Mango Gose - B-Sides", "Melon And Cucumber IPA - B-Sides", "Misspent Youth", "Morag's Mojito - B-Sides", "Moshi Moshi 15", "Motueka", "Movember", "Mr.Miyagi's Wasabi Stout", "Nanny State", "Nelson Sauvin", "Neon Overlord", "Never Mind The Anabolics", "No Label", "Nuns With Guns", "Old World India Pale Ale", "Old World Russian Imperial Stout", "Orange Blossom - B-Sides", "Pale - Russian Doll", "Paradox Islay", "Paradox Islay 2.0", "Paradox Jura", "Peroxide Punk", "Pilsen Lager", "Pioneer - IPA Is Dead", "Prototype 27", "Prototype Helles", "Prototype Pils 2.0", "Pumpkin King", "Punk IPA 2007 - 2010", "Punk IPA 2010 - Current", "Restorative Beverage For Invalids And Convalescents", "Rhubarb Saison - B-Sides", "Riptide", "Russian Doll â\200“ India Pale Ale", "Rye Hammer", "San Diego Scotch Ale (w/Ballast Point)", "Santa Paws", "Shareholder Black IPA 2011", "Ship Wreck", "Shipwrecker Circus (w/ Oskar Blues)", "Simcoe", "Sink The Bismarck!", "Skull Candy", "Sorachi Ace", "Sorachi Bitter - B-Sides", "Spiced Cherry Sour - B-Sides", "Stereo Wolf Stout - Prototype Challenge", "Storm", "Sub Hop", "Sunk Punk", "Sunmaid Stout", "Sunshine On Rye - B-Sides", "The Physics", "This. Is. Lager", "TM10", "Trashy Blonde", "Truffle and Chocolate Stout - B-Sides", "U-Boat (w/ Victory Brewing)", "Vagabond Pale ALe - Prototype Challenge", "Vagabond Pilsner", "Vic Secret", "Waimea - IPA Is Dead", "Whisky Sour - B-Sides", "Zephyr"), class = "factor"), ABV = c(4.5, 4.1, 4.2, 6.3, 7.2, NA, 4.7, 7.5, 7.3, 5.3, 4.5, 4.5, 6.1, 11.2, 6, 8.2, 12.5, 8, 4.7, 3.5, 15, 6.7, 7.8, 6.7, 0.5, 7.5, 5.8, 3.6, 10.5, 12.5, 7.2, 8.2, 10.7, 9.2, 7.1, 5, 16.5, 12.8, 6.7, 10, NA, 10, 4.5, 7.4, 7.2, 9.5, 9.2, 9, 7.2, 7.5, NA, 10.43, 7.1, 8, 5, 5.4, 4.1, 10.2, 4, 7, 12.7, 6.5, 7.5, 4.2, 11.8, 7.6, 15, 4.4, 6.3, 7.2, NA, 4.5, 4.5, 7.5, 10, 3.8, 6.4, NA, 4, 15.2, 5.4, 8.3, 6.5, 8, 12, 8.2, 5.6, 7.2, 6.3, 10, 5.6, 4.5, 8.2, 8.4, 6, 6.7, 6.5, 11.5, 8.5, 5.2, 7.1, 4.7, 6.7, 9, 6.5, 6.7, 5, 5.8, 7.5, 4.5, 9, 41, 15, 8.5, 7.2, 9, 3.8, 5.7, 6.3, 7.5, 4.4, 18, 10.5, 11.3, NA, 5.2, 4.5, 9.5, 7.2, 2.7, 6.4, 17.2, 8.5, 4.9, 4.7, 7.2, 10, 4.5, 7.2, 7.2, 6.7, 7.2, 4.4, 9, 7.5, 16.1, 6.7, 2.5, 7.4, 2.8, 4.2, 5.8, 5.2, 10, 12.8, 8.3, 6.5, 6, 3, 7.6, 5.5, 8.8, 5.2, 5.2, 8, 6.7, 15, 11.5, 7.1, NA, 7.5, 7.2, 5.2, 6.8, 5.5, 5.2, 6.7, 5, 9, 9.2, 13.8, 4.5, 3.2, 16.1, 4.7, 14.2, 13, 7.2, 9.2, 4.9, 7.2, 7.2, 4.5, 4.5, 4.5, 7.6), IBU = c(60, 41.5, 8, 55, 59, 38, 40, 75, 30, 60, 50, 42, 45, 150, 70, 70, 100, 60, 45, 33, 90, 67, 70, 70, 55, 75, 35, 8, 85, 125, 70, 70, 100, 125, 65, 47, 20.5, 50, 70, 35, 20, 55, 35, 65, 70, 85, 149, 65, 100, 30, 30, 65, 68, 35, 50, 35, 65, 50, 35, 20, 85, 35, 50, 50, 80, 70, 80, 35, 85, 70, 9, 35, 30, 70, 85, 35, 40, 45, 40, 20, 20, 70, 60, 45, 85, 42, 40, 70, 55, 85, 30, 55, 42, 50, 50, 40, 35, 80, 65, 45, 90, 45, 67, 85, 20, 67, 30, 40, 90, 38, 50, 1085, 90, 85, 100, 80, 20, 35, 130, 75, 35, 70, 14, 50, 25, 65, 25, 80, 70, 36, 50, 75, 100, 30, 37, 100, 80, 55, 50, 250, 67, 100, 70, 70, 80, 85, 70, 35, 70, 30, 25, 40, 50, 55, 70, 70, 55, 60, 8, 175, 35, 40, 45, 55, 85, 70, 90, 50, 80, 45, 0, 130, 55, 30, 60, 40, 70, 50, 85, 65, 60, 40, 8, 100, 25, 20, 100, 250, 50, 18, 250, 250, 40, 40, 40, 70), OG = c(1044, 1041.7, 1040, 1060, 1069, 1045, 1046, 1068, 1079, 1052, 1047, 1046, 1067, 1098, 1058, 1076, 1093, 1082, 1047, 1038, 1120, 1013, 1074, 1066, 1007, 1068, 1049, 1040, 1102, 1087, 1067, 1076, 1105, 1085, 1065, 1048.5, 1112, 1096, 1066, 1080, 1048, 1090, 1048, 1069, 1067, 1095, 1083, 1080, 1064, 1080, 1043, 1095, 1056, 1077, 1049, 1050, 1042, 1026, 1041, 1081, 1113.5, 1050, 1070, 1042, 1096, 1073, 1113, 1040, 1063, 1067, 1032, 1048, 1045, 1068, 1098, 1040, 1057, 1081, 1039, 1110, 1055, 1076, 1060, 1075, 1130, 1078, 1055, 1067, 1060, 1098, 1058, 1046, 1078, 1080, 1050, 1063, 1068, 1096, 1078, 1049, 1067, 1055, 1013, 1094, 1060, 1013, 1050, 1053, 1072, 1042.9, 1084, 1085, 1120, 1072, 1064, 1083, 1039, 1053, 1060, 1068, 1045, 1150, 1093, 1098, 1052, 1048, 1043, 1075, 1067, 1033, 1061, 1156, 1068, 1047, 1043, 1064, 1097, 1045, 1068, 1065, 1064, 1064, 1045, 1090, 1069, 1125, 1063, 1027, 1069, 1032.5, 1044, 1060, 1050, 1128, 1108, 1076, 1059, 1056, 1007, 1072, 1053, 1084, 1048, 1053, 1074, 1066, 1120, 1104, 1067, 1089, 1069, 1065, 1052, 1068, 1062, 1048, 1066, 1053, 1094, 1069, 1088, 1045, 1007, 1015, 1008, 1025, 1015, 1065, 1016, 1010, 1065, 1065, 1045, 1045, 1045, 1067), EBC = c(20, 15, 8, 30, 10, 15, 12, 22, 120, 200, 140, 62, 219, 70, 25, NA, 36, 12, 8, 50, 100, 19, 90, 30, 30, 30, 44, NA, 64, 40, 30, 16, 300, 40, 13, 65, 20, 111, 30, 80, 14, 300, 40, 60, 30, 250, 19.5, 97, 12, 46, 15, 23, 14, 15, 110, 11.5, 17, 197, 45, 12, 250, 23, 40, 30, 115, 59, 400, 12, 24, 30, 2, 44, 25, 30, 130, 25, 10, 15, 18, 158, 30, 30, 25, 240, 24, 90, 15, 30, 30, 30, 54, 25, 70, 200, 8, 15, 250, 115, 31.2, 45, 15, 200, 19, 400, NA, 19, 60, 177.3, 200, 18, 20, 40, 100, 15, 12, 180, 6, 25, 14, 30, 30, 57, NA, 164, 10, 16, 10, 195, 30, 57, 20, 128, 15, 12, 10, 12, 65, 20, 150, 15, 19, 12, 30, 190, 50, 400, 30, 10, 30, 42, 19, 35, 17, 300, 79, 30, 50, 17, 9, 40, 25, 190, 35, 165, 35, 30, 100, 38, 71, 15, 50, 14, 200, 86, 230, 13, 30, 200, 400, 60, 25, 18, 8, 500, 25, 67, 300, 15, 78.8, 13, 17, 104, 18, 18, 18, 20), PH = c(4.4, 4.4, 3.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.2, 5.2, 4.4, 4.4, 4.4, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 3.2, 4.4, 4.4, 4.4, 4.4, 4.3, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.2, 4.4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.5, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 3.2, 5.2, 4.4, 4.4, 4.4, 5.2, 4.4, 4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 3.5, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.2, 4.4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.3, 3.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.4, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.2, 4.5, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.2, 4.4, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.3, 4.4, 4.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 3.2, 4.4, 4.4, 4.5, 4.4, 5.2, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.4, 5.2, 5.2, 4.4, 4.4, 4.4, 4.4, 4.4, 4.3, 4.2, 4.4, 4.2, 3.2, 4.4, 4.2, 4, 4.4, 4.4, 4.2, 4.2, 4.4, 4.4, 4.2, 4.2, 4.2, 4.4), AttenuationLevel = c(75, 76, 83, 80, 67, 88.9, 78, 80.9, 74.7, 77, 74.5, 72.8, 70.1, 87, 79.3, 83, 68, 86, 79, 68.4, 98, 79.7, 79.7, 77.3, 28.6, 82.1, 90, 83, 102, 81.2, 82.1, 83, 76.2, 81.2, 85, 79.4, 100, 79.17, 77.3, 85, 89.6, 84.4, 72.9, 82.6, 82.1, 76.8, 83, 76, 84, 70, 81.4, 83.2, 82.1, 79.2, 79, 84, 76.2, 74.5, 75.6, 74, 76.8, 76, 81.4, 76.2, 79.2, 79.5, 84.1, 79.5, 82.6, 82.1, 88, 72.9, 75.6, 82.1, 79.6, 70, 87, 93.8, 76.9, 82, 74.6, 82.9, 83.3, 81.3, 102.3, 83.3, 78, 82.1, 80, 70, 74, 73.9, 83.3, 81.3, 87, 84, 70.6, 79.2, 84.6, 81.6, 80.6, 70, 79.7, 73.4, 87, 79.7, 76, 84.9, 79.2, 81, 82.1, 81.2, 98, 90.3, 84, 83.1, 87, 79.3, 83, 82.1, 73.3, 93.3, 80, 79.6, 87, 79, 79.1, 81.3, 82.1, 70.8, 80.3, 80.8, 95.6, 80.7, 83.7, 84, 79.4, 73.9, 78.6, 84.6, 79.7, 84, 82.9, 80, 82.6, 84, 81, 70.4, 82.6, 63.1, 72.7, 76.7, 80, 89, 81.5, 82.9, 81.4, 82.14, 82.5, 80.6, 79.3, 79.8, 77.1, 75.5, 82.4, 77.3, 98, 85, 79, 94.4, 81.1, 87, 73.1, 76.5, 67.7, 79.2, 77.3, 73.6, 73.4, 82.6, 83, 75.6, 78, 84, 75.6, 75.6, 84.4, 84.6, 81, 78.7, 84.6, 84.6, 75.6, 75.6, 75.6, 82), FermentationTempCelsius = c(19L, 18L, 21L, 9L, 10L, 22L, 10L, 19L, 19L, 19L, 19L, 22L, 18L, 17L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 18L, 19L, 19L, 19L, 19L, 21L, 21L, 21L, 19L, 21L, 21L, 21L, 9L, 19L, 20L, 21L, 19L, 19L, 22L, 21L, 19L, 18L, 19L, 18L, 19L, 19L, 19L, 12L, 23L, 21L, 10L, 9L, 19L, 19L, 19L, 21L, 19L, 19L, 18L, 18L, 21L, 19L, 20L, 20L, 21L, 10L, 19L, 19L, 21L, 19L, 19L, 19L, 21L, 19L, 20L, 23L, 19L, 21L, 19L, 21L, 19L, 20L, 21L, 21L, 19L, 19L, 19L, 21L, 19L, 9L, 22L, 14L, 20L, 19L, 19L, 20L, 18L, 14L, 19L, 19L, 19L, 21L, 20L, 19L, 19L, 19L, 21L, 10L, 21L, 21L, 19L, 18L, 19L, 21L, 20L, 17L, 20L, 19L, 19L, 22L, 19L, 20L, 20L, 19L, 15L, 19L, 19L, 19L, 19L, 21L, 21L, 10L, 12L, 19L, 21L, 19L, 19L, 21L, 19L, 19L, 20L, 21L, 22L, 21L, 99L, 19L, 19L, 22L, 16L, 19L, 19L, 21L, 18L, 21L, 19L, 19L, 19L, 21L, 17L, 21L, 19L, 19L, 19L, 19L, 19L, 21L, 19L, 23L, 19L, 20L, 19L, 19L, 19L, 19L, 19L, 19L, 21L, 18L, 21L, 19L, 21L, 21L, 12L, 21L, 21L, 21L, 21L, 12L, 21L, 21L, 19L, 19L, 19L, 21L), Yeast = structure(c(1L, 1L, 1L, 3L, 3L, 4L, 3L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 3L, 1L, 2L, 2L, 1L, 2L, 4L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 3L, 4L, 2L, 3L, 3L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 3L, 1L, 1L, 4L, 1L, 1L, 1L, 2L, 1L, 1L, 4L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 3L, 2L, 3L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 3L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 4L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 3L, 3L, 1L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 3L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 3L, 2L, 2L, 2L, 2L, 3L, 2L, 2L, 1L, 1L, 1L, 2L), .Label = c("Wyeast 1056 - American Ale", "Wyeast 1272 - American Ale II", "Wyeast 2007 - Pilsen Lager", "Wyeast 3711 - French Saison"), class = "factor")), class = "data.frame", row.names = c(NA, -196L))
3df
4library(fastDummies)
5
6df_dummy <- dummy_columns(df, select_columns = "Yeast", remove_selected_columns = TRUE)
7
8res <- NbClust(df_dummy[2:9], min.nc = 2, max.nc = 15, method = "ward.D2")
9
As noted in the comments, the better practices for conduncting clustering analysis are more questions for CrossValidated.
QUESTION
Selenium / Java : How to write element locator for an element with aria-selected=false
Asked 2021-Nov-23 at 03:51We are unable to locate and click at an element with "aria-selected" = "false" on an HTML page. We have tried different way to write xpath locator and css selector but none of them worked. While inspecting a bit more on page, we found that this element has a "aria-selected="false" in it and when we click on it and it shows results then this value changes to "aria-selected="true"
We have tried with below xpath:
1(".//*/span[@class='tab-button-text'][contains(text(),'Orders')]")
2
Note: Even though it does not matter which framework, we are using to use this element. However i would like to mention that, we have been trying it for two separate framework such as
- Karate framework and other one,
- Selenium, Cucumber BDD with java
ANSWER
Answered 2021-Nov-23 at 03:51The ariaSelected property of the Element interface reflects the value of the aria-selected
attribute, which indicates the current "selected" state of elements that have a selected state.
Value: A DOMString with one of the following values:
- true: The item is selected.
- false: The item is not selected.
Selected/unselected state of this WebElement attribute doesn't effects your tests.
To locate the element you can you can use either of the following Locator Strategies:
xpath:
1(".//*/span[@class='tab-button-text'][contains(text(),'Orders')]")
2("//span[@class='tab-button-text' and contains(text(),'Orders')]")
3
cssSelector:
1(".//*/span[@class='tab-button-text'][contains(text(),'Orders')]")
2("//span[@class='tab-button-text' and contains(text(),'Orders')]")
3("div.tabbar.show-tabbar > a.tab-button.has-title.has-icon span.tab-button-text")
4
QUESTION
Could not create a cucumber expression for scenario step
Asked 2021-Nov-17 at 14:43I have run into a problem that my custom cucumber configuration works in the same test project, but doesn't work as a dependency in other test project
CustomTypeRegistry class:
1public class CustomTypeRegistry {
2
3 @ParameterType("customEx\\([0-9]+\\)")
4 public Integer custom(String original) {
5 return new Random().nextInt();
6 }
7}
8
Java glue step:
1public class CustomTypeRegistry {
2
3 @ParameterType("customEx\\([0-9]+\\)")
4 public Integer custom(String original) {
5 return new Random().nextInt();
6 }
7}
8@When("generate {custom} for test")
9public void testStep(int randomNumber) {
10 System.out.println(randomNumber);
11}
12
Scenario step:
1public class CustomTypeRegistry {
2
3 @ParameterType("customEx\\([0-9]+\\)")
4 public Integer custom(String original) {
5 return new Random().nextInt();
6 }
7}
8@When("generate {custom} for test")
9public void testStep(int randomNumber) {
10 System.out.println(randomNumber);
11}
12When generate customEx(5) for test
13
When I create tests in the same project where cucumber configurations are present this works perfectly.
When I pack project to a jar and add it as dependency to another test project it recognizes the step but in runtime I got the error:
17-11-2021 14:15:55.592 [main] ERROR io.cucumber.core.runtime.Runtime.log - Exception while executing pickle java.util.concurrent.ExecutionException: io.cucumber.core.exception.CucumberException: Could not create a cucumber expression for 'generate {custom} for test'. It appears you did not register a parameter type. at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at io.cucumber.core.runtime.Runtime.run(Runtime.java:93) at io.cucumber.core.cli.Main.run(Main.java:92) at io.cucumber.core.cli.Main.main(Main.java:34) Caused by: io.cucumber.core.exception.CucumberException: Could not create a cucumber expression for 'generate {custom} for test'. It appears you did not register a parameter type. at io.cucumber.core.stepexpression.StepExpressionFactory.registerTypeInConfiguration(StepExpressionFactory.java:101) at io.cucumber.core.stepexpression.StepExpressionFactory.crateExpression(StepExpressionFactory.java:95) at io.cucumber.core.stepexpression.StepExpressionFactory.createExpression(StepExpressionFactory.java:61) at io.cucumber.core.stepexpression.StepExpressionFactory.createExpression(StepExpressionFactory.java:49) at io.cucumber.core.runner.CachingGlue.lambda$prepareGlue$3(CachingGlue.java:244) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at io.cucumber.core.runner.CachingGlue.prepareGlue(CachingGlue.java:243) at io.cucumber.core.runner.Runner.runPickle(Runner.java:68) at io.cucumber.core.runtime.Runtime.lambda$execute$5(Runtime.java:110) at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:117) at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233) at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118) at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195) at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:199) at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578) at io.cucumber.core.runtime.Runtime.run(Runtime.java:87) ... 2 common frames omitted Caused by: io.cucumber.cucumberexpressions.UndefinedParameterTypeException: Undefined parameter type {custom}. Please register a ParameterType for {custom}. at io.cucumber.cucumberexpressions.CucumberExpression.processParameters(CucumberExpression.java:103) at io.cucumber.cucumberexpressions.CucumberExpression.(CucumberExpression.java:35) at io.cucumber.cucumberexpressions.ExpressionFactory.createExpression(ExpressionFactory.java:34) at io.cucumber.core.stepexpression.StepExpressionFactory.crateExpression(StepExpressionFactory.java:88)
Cucumber version: 6.8.1
Build tool: Maven
What can cause the problem?
ANSWER
Answered 2021-Nov-17 at 14:43The likely reason you can observe such behavior is that there is a thing called "glue path" that is basically a package where Cucumber looks up the code (including custom parameter definitions).
By default cucmber uses glue path taken as the package that contains your runner class. So I assume that when you were having your code in original project that condition was met.
But when you made a library and used it as a dependency in another project Cucumber stopped seeing that since conditions stopped being met.
You need to specify glue path manually like it is mentioned in cucumber docs
By default Cucumber-JVM will search in the package (or sub-packages) of the runner class. You can also tell Cucumber-JVM explicitly which packages (and sub-packages) to search, with:
1public class CustomTypeRegistry {
2
3 @ParameterType("customEx\\([0-9]+\\)")
4 public Integer custom(String original) {
5 return new Random().nextInt();
6 }
7}
8@When("generate {custom} for test")
9public void testStep(int randomNumber) {
10 System.out.println(randomNumber);
11}
12When generate customEx(5) for test
13 @CucumberOptions(glue = {"<package>", "<package>", "<etc>"})
14 public class RunCucumberTest{}
15
Community Discussions contain sources that include Stack Exchange Network
Tutorials and Learning Resources in Cucumber
Tutorials and Learning Resources are not available at this moment for Cucumber