Codeception and Selenium 2 warning - selenium-webdriver

I have a lot of warning when trying to run Selenium2 tests through codeception. The tests work though.
These are the warning if someone can lead me on the right way to correct :
C:\Users\Bebop\Documents\Site Internet\Sites\prestashop1.5.6\modules\paypal>php
codecept.phar run Selenium
Codeception PHP Testing Framework v1.7.0.2
Powered by PHPUnit 3.7.27 by Sebastian Bergmann.
PHP Warning: array_merge(): Argument #2 is not an array in phar://C:/Users/Bebo
p/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src
/Codeception/Module/Selenium2.php on line 70
PHP Stack trace:
PHP 1. {main}() C:\Users\Bebop\Documents\Site Internet\Sites\prestashop1.5.6\m
odules\paypal\codecept.phar:0
PHP 2. require_once() C:\Users\Bebop\Documents\Site Internet\Sites\prestashop1
.5.6\modules\paypal\codecept.phar:7
PHP 3. Symfony\Component\Console\Application->run() phar://C:/Users/Bebop/Docu
ments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/codecept:
29
PHP 4. Symfony\Component\Console\Application->doRun() phar://C:/Users/Bebop/Do
cuments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/vendor/
symfony/console/Symfony/Component/Console/Application.php:121
PHP 5. Symfony\Component\Console\Application->doRunCommand() phar://C:/Users/B
ebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/
vendor/symfony/console/Symfony/Component/Console/Application.php:191
PHP 6. Symfony\Component\Console\Command\Command->run() phar://C:/Users/Bebop/
Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/vendo
r/symfony/console/Symfony/Component/Console/Application.php:897
PHP 7. Codeception\Command\Run->execute() phar://C:/Users/Bebop/Documents/Site
Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/vendor/symfony/cons
ole/Symfony/Component/Console/Command/Command.php:244
PHP 8. Codeception\Command\Run->runSuites() phar://C:/Users/Bebop/Documents/Si
te Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeception/C
ommand/Run.php:83
PHP 9. Codeception\Codecept->runSuite() phar://C:/Users/Bebop/Documents/Site I
nternet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeception/Comma
nd/Run.php:115
PHP 10. Codeception\SuiteManager->__construct() phar://C:/Users/Bebop/Documents
/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeceptio
n/Codecept.php:124
PHP 11. Codeception\SuiteManager->initializeModules() phar://C:/Users/Bebop/Doc
uments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Code
ception/SuiteManager.php:48
PHP 12. Codeception\Module\Selenium2->_initialize() phar://C:/Users/Bebop/Docum
ents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codece
ption/SuiteManager.php:62
PHP 13. array_merge() phar://C:/Users/Bebop/Documents/Site Internet/Sites/prest
ashop1.5.6/modules/paypal/codecept.phar/src/Codeception/Module/Selenium2.php:70
Warning: array_merge(): Argument #2 is not an array in phar://C:/Users/Bebop/Doc
uments/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Code
ception/Module/Selenium2.php on line 70
Call Stack:
0.0117 1074720 1. {main}() C:\Users\Bebop\Documents\Site Internet\Sites
\prestashop1.5.6\modules\paypal\codecept.phar:0
0.0208 1373568 2. require_once('phar://C:/Users/Bebop/Documents/Site In
ternet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/codecept') C:\Users\Be
bop\Documents\Site Internet\Sites\prestashop1.5.6\modules\paypal\codecept.phar:7
0.0667 4331624 3. Symfony\Component\Console\Application->run() phar://C
:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codec
ept.phar/codecept:29
0.0785 4941624 4. Symfony\Component\Console\Application->doRun() phar:/
/C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/cod
ecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:121
0.0791 4941624 5. Symfony\Component\Console\Application->doRunCommand()
phar://C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/pay
pal/codecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.p
hp:191
0.0792 4941624 6. Symfony\Component\Console\Command\Command->run() phar
://C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/c
odecept.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:89
7
0.0802 4941992 7. Codeception\Command\Run->execute() phar://C:/Users/Be
bop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/v
endor/symfony/console/Symfony/Component/Console/Command/Command.php:244
0.1596 9010384 8. Codeception\Command\Run->runSuites() phar://C:/Users/
Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar
/src/Codeception/Command/Run.php:83
0.1597 9010720 9. Codeception\Codecept->runSuite() phar://C:/Users/Bebo
p/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src
/Codeception/Command/Run.php:115
0.1675 9175200 10. Codeception\SuiteManager->__construct() phar://C:/Use
rs/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codecept.p
har/src/Codeception/Codecept.php:124
0.1756 10263064 11. Codeception\SuiteManager->initializeModules() phar://
C:/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/code
cept.phar/src/Codeception/SuiteManager.php:48
0.1867 11096264 12. Codeception\Module\Selenium2->_initialize() phar://C:
/Users/Bebop/Documents/Site Internet/Sites/prestashop1.5.6/modules/paypal/codece
pt.phar/src/Codeception/SuiteManager.php:62
0.1914 11529024 13. array_merge() phar://C:/Users/Bebop/Documents/Site In
ternet/Sites/prestashop1.5.6/modules/paypal/codecept.phar/src/Codeception/Module
/Selenium2.php:70
============= At this time the tests begins
←[1mSelenium Tests (1) ←[0m-----------------------------------------------------
--------------
Trying to ←[35;1mlogin in backoffice←[0m (PrestaShopModuleListCest.install_the_m
odule) Ok
--------------------------------------------------------------------------------
-------
Time: 27.79 seconds, Memory: 16.25Mb
←[30;42m←[2KOK (1 test, 0 assertions)
←[0m←[2K

Ok, Found out what was wrong :
I had a missing space in my Selenium.suite.yml which did not convert my capabilities in an array :
capabilities:
unexpectedAlertBehaviour: 'accept'
This was the good thing to do

Related

ClientError: Annotation value 10 found in labels. This is greater than number of classes., exit code: 2

My total number of classes is 10
1-"Button_damage"
2-"Cracks"
3-"Edge_damage"
4-"Frame_damage"
5-"Hinge_damage"
6-"Screen_damage"
7-"Good_Button"
8-"Good_Hinge"
9-"Good_screen"
10-"Good_frame"
When I give num_classes=10 in hyperparameter it throws a error.
ClientError: Annotation value 10 found in labels. This is greater than number of classes., exit code: 2
I changed num_classes=9 and tried, it shows same error.
It was worked when I changed the num_classes=11. Because it adds one label "0" by default.
0-"BACKGROUND"
1-"Button_damage"
2-"Cracks"
3-"Edge_damage"
4-"Frame_damage"
5-"Hinge_damage"
6-"Screen_damage"
7-"Good_Button"
8-"Good_Hinge"
9-"Good_screen"
10-"Good_frame"

`vespa` tutorial : ./src/python/user_search.py U33527 10 KeyError: 'children'

I'm following step by step the Vespa tutorials: https://docs.vespa.ai/en/tutorials/news-5-recommendation.html
(vespa) raphy#pc:~/vespa/sample-apps/news$ python3 src/python/train_cold_start.py mind 10
Total loss after epoch 9: 534.6995239257812 (0.4087916910648346 avg)
{'auc': 0.8578, 'mrr': 0.4789, 'ndcg#5': 0.5482, 'ndcg#10': 0.6013}
{'auc': 0.6265, 'mrr': 0.2846, 'ndcg#5': 0.3117, 'ndcg#10': 0.3747}
Total loss after epoch 10: 517.1571044921875 (0.39538004994392395 avg)
{'auc': 0.8758, 'mrr': 0.5073, 'ndcg#5': 0.5817, 'ndcg#10': 0.6315}
{'auc': 0.6246, 'mrr': 0.2843, 'ndcg#5': 0.3113, 'ndcg#10': 0.3732}
(vespa) raphy#pc:~/vespa/sample-apps/news$
But I'm encountering this problem:
(vespa) raphy#pc:~/vespa/sample-apps/news$ ./src/python/user_search.py U33527 10
Traceback (most recent call last):
File "./src/python/user_search.py", line 58, in <module>
main()
File "./src/python/user_search.py", line 51, in main
user_vector = query_user_embedding(user_id)
File "./src/python/user_search.py", line 21, in query_user_embedding
embedding = parse_embedding(result["root"]["children"][0])
KeyError: 'children'
(vespa) raphy#pc:~/vespa/sample-apps/news$
(vespa) raphy#pc:~/vespa/sample-apps/news$ grep "U33527" mind/vespa_user_embeddings.json
{"put": "id:user:user::U33527", "fields": {"user_id":"U33527", "embedding": {"values": [0.000000,0.060903,0.158397,0.003585,0.230960,0.005171,-0.300856,-0.295116,-0.042150,-0.416067,-0.173345,-0.241960,-0.140207,-0.000399,0.463869,-0.294422,-0.080257,-0.208765,-0.070218,0.189583,0.031040,-0.073909,-0.147883,-0.164819,-0.229605,-0.248327,0.174647,-0.168265,-0.370106,-0.209611,-0.206252,-0.288447,0.091576,-0.122662,0.000394,0.172982,-0.147844,0.326629,-0.103831,-0.312612,-0.209032,0.190745,-0.335539,0.261593,0.699852,0.041234,0.241921,0.052331,0.103968,-0.216830,-0.279406]} }},
OS: Ubuntu 20.04
How to solve it ?
The Vespa index has no user documents here, so most likely the user and news embeddings have not been fed to the system. After they are calculated in the previous step (https://docs.vespa.ai/en/tutorials/news-4-embeddings.html), be sure to feed them to Vespa:
$ java -jar vespa-http-client-jar-with-dependencies.jar \
--file mind/vespa_user_embeddings.json \
--endpoint http://localhost:8080
$ java -jar vespa-http-client-jar-with-dependencies.jar \
--file mind/vespa_news_embeddings.json \
--endpoint http://localhost:8080
That will solve the problem.

How to build stream expression with StreamFactory

I am trying to build let expression for solr stream but it gives error saying
Caused by: java.io.IOException: Invalid stream expression col(samples,score) - function 'col' is unknown (not mapped to a valid TupleStream)
StreamFactory = new StreamFactory().withDefaultZkHost(zookeeper)
.withFunctionName("search", CloudSolrStream.class)
.withFunctionName("select", SelectStream.class)
.withFunctionName("merge", MergeStream.class)
.withFunctionName("sort", SortStream.class)
.withFunctionName("tuple", TupStream.class)
.withFunctionName("rollup", RollupStream.class)
.withFunctionName("hashJoin", HashJoinStream.class)
.withFunctionName("count", CountMetric.class)
.withFunctionName("facet", FacetStream.class)
.withFunctionName("sum", SumMetric.class)
.withFunctionName("unique", UniqueStream.class)
.withFunctionName("significantTerms", SignificantTermsStream.class)
.withFunctionName("stats", StatsStream.class)
.withFunctionName("innerJoin", InnerJoinStream.class)
.withFunctionName("issnMerge", IssnMergeStream.class)
.withFunctionName("intersect", IntersectStream.class)
.withFunctionName("boostByEra", BoostBooksByEraExpression.class)
.withFunctionName("determineRRec", DetermineRepresentativeRecord.class)
.withFunctionName("plist", ParallelListStream.class)
.withFunctionName("let", LetStream.class);
My expression is as below:
let(samples=search(wc_art,qt="/select",q="al:next AND al:generation",fq="_delete:false",fq="_namespace:default",fl="score,numdocs(),id",rows=10,fq="{!lucene q.op=OR}pa:(medline)",defType=edismax,q.op=AND,sort="score desc"),responses=col(samples,score),summary=describe(responses))
The col function was added in Solr 7, so if your Solr installation is older than that the function won't be available. Upgrade to a more recent version.

Error 500 CakePHP 3

I've an error 500 that I don't understand. The error was here before I begin to work on this project so it's complicated. When I click on button to open a PDF (with html2pdf), the error 500 appear. I've tried all I've found, but nothings works.
I can't send you code, or maybe few lines.
Output from error log:
2017-07-03 14:04:28 Error: Fatal Error (1): Maximum execution time of
60 seconds exceeded in [C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\Error\BaseErrorHandler.php,
line 126] Request URL: /fra/my-leads/view/aekt.pdf Referer URL:
http://localhost:8765/fra/my-leads Trace:
Cake\Error\BaseErrorHandler::handleFatalError() -
CORE\src\Error\BaseErrorHandler.php, line 223
Cake\Error\BaseErrorHandler::Cake\Error{closure}() -
CORE\src\Error\BaseErrorHandler.php, line 105 [main] - [internal],
line ??
2017-07-03 14:04:28 Error: [Cake\Error\FatalErrorException] Maximum
execution time of 60 seconds exceeded Request URL:
/fra/my-leads/view/aekt.pdf Referer URL:
http://localhost:8765/fra/my-leads Stack Trace: 0 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\Error\BaseErrorHandler.php(105):
Cake\Error\BaseErrorHandler->handleFatalError(1, 'Maximum executi...',
'C:\Users\JCP 2...', 126) 1 [internal function]:
Cake\Error\BaseErrorHandler->Cake\Error{closure}() 2 {main}
More precision : when I just write "hello" in pdf, I don't have error. It's only when I try to get datas. And when I set this pdf to another view (so without pdf format) it works :/
Log output after increasing execution time
2017-07-04 08:19:08 Error: [Spipu\Html2Pdf\Exception\ImageException]
Unable to get the size of the image
[http://localhost:8765/img/logo.png?1497859287] Request URL:
/fra/my-leads/view/trkkdz.pdf Referer URL:
http://localhost:8765/fra/my-leads
I try to comment the logo and now, it says this :
2017-07-04 08:23:06 Error: [Exception] TCPDF ERROR: Some data has
already been output, can't send PDF file Request URL:
/fra/my-leads/view/trkkdz.pdf Referer URL: ... Stack Trace: 0
C:\Users\JCP
2\Documents\buyers\vendor\tecnickcom\tcpdf\tcpdf.php(7620):
TCPDF->Error('Some data has a...') 1 C:\Users\JCP
2\Documents\buyers\vendor\spipu\html2pdf\src\Html2Pdf.php(506):
TCPDF->Output('MLC_Lead-trkkdz...', 'I') 2 C:\Users\JCP
2\Documents\buyers\src\Template\Layout\pdf\default.ctp(10):
Spipu\Html2Pdf\Html2Pdf->output('MLC_Lead-trkkdz...') 3 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\View\View.php(1010):
include('C:\Users\JCP 2...') 4 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\View\View.php(971):
Cake\View\View->_evaluate('C:\Users\JCP 2...', Array) 5 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\View\View.php(642):
Cake\View\View->_render('C:\Users\JCP 2...') 6 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\View\View.php(600):
Cake\View\View->renderLayout('', 'default') 7 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\Controller\Controller.php(623):
Cake\View\View->render(NULL, NULL) 8 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\Http\ActionDispatcher.php(125):
Cake\Controller\Controller->render() 9 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\Http\ActionDispatcher.php(93):
Cake\Http\ActionDispatcher->_invoke(Object(App\Controller\MyLeadsController))
10 C:\Users\JCP
2\Documents\buyers\vendor\cakephp\cakephp\src\Routing\Dispatcher.php(60):
Cake\Http\ActionDispatcher->dispatch(Object(Cake\Http\ServerRequest),
Object(Cake\Http\Response)) 11 C:\Users\JCP
2\Documents\buyers\webroot\index.php(37):
Cake\Routing\Dispatcher->dispatch(Object(Cake\Http\ServerRequest),
Object(Cake\Http\Response)) 12 {main}
This means your application is taking more than 60 seconds to run. That is why it is crushing. Add the code below to index.php in webroot directory
<?php
set_time_limit ( 60 * 5 ); // 5 minutes
?>
or in your php.ini :
max_execution_time=300

Understand elements of the gdb core print

I have a core generated. /var/log/messages displays this line:
Jan 29 07:50:40 NetAcc-02 kernel: LR.exe[15326]: segfault at 51473861 ip 081e2dba sp 00240030 error 4 in LR.exe[8048000+34c000]
Jan 29 07:50:52 NetAcc-02 abrt[20696]: saved core dump of pid 15252 (/home/netacc/active/LR.exe) to /var/spool/abrt/ccpp-2015-01-29-07:50:40-15252.new/coredump (1642938368 bytes)
Jan 29 07:50:52 NetAcc-02 abrtd: Directory 'ccpp-2015-01-29-07:50:40-15252' creation detected
Jan 29 07:50:54 NetAcc-02 abrtd: Executable '/home/netacc/active/LR.exe' doesn't belong to any package
Jan 29 07:50:54 NetAcc-02 abrtd: Corrupted or bad dump /var/spool/abrt/ccpp-2015-01-29-07:50:40-15252 (res:2), deleting
Does the last line mean that the core is corrupted? Because a bt of my corefile seems to be corrupted:
#0 0x081e2dba in CfaPepDecision (pBuf=0xa0d6735, pIp=0x5147384d, u2DirectFlag=1, ppepserver=0x67684e6f, paccl=0x45517377, pPepMode=0x6a31396c "") at /home/TAN/release/rel/idu-sw/pep/pep/src/pepcfa.c:498
#1 0x52367331 in ?? ()
#2 0x0a0d6735 in gProfileVsatTable ()
#3 0x5147384d in ?? ()
#4 0x75417875 in ?? ()
#5 0x38000200 in ?? ()
Strangely the gProfileVsatTable is a global array!
The address pIp = 0x5147384d is out of bounds in gdb.
Any inputs are helpful.
Because a bt of my corefile seems to be corrupted:
This is usually the result of analyzing the wrong binary. Invoke GDB like this:
gdb /home/netacc/active/LR.exe \
/var/spool/abrt/ccpp-2015-01-29-07:50:40-15252.new/coredump
Make sure that you have not updated the binary since Jan 29 07:50:52. In particular, make sure you did not rebuild the binary with different options after the crash.

Resources