I am quite new to cake and ran through a tutorial and had everything working however i am developing for real now.
I have a database set-up and the cake intro page says i am connecting to it, however when i do a “cake bake” on a table i get the following errors.
2018-06-13 20:06:44 Error: [Error] Call to a member function getSchemaCollection() on null in C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\ORM\Table.php on line 547
I don’t usually like to ask for help but i have searched and search for info on getSchemaCollection and can’t find anything!
The stack trace was
The stack trace was
One moment while associations are detected.
Exception: Call to a member function getSchemaCollection() on null in [C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\ORM\Table.php, line 547]
2018-06-15 11:45:46 Error: [Error] Call to a member function getSchemaCollection() on null in C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\ORM\Table.php on line 547
Stack Trace:
0 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(415): Cake\ORM\Table->getSchema()
1 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(231): Bake\Shell\Task\ModelTask->findHasMany(Object(App\Model\Table\PurchaseTable), Array)
2 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(130): Bake\Shell\Task\ModelTask->getAssociations(Object(App\Model\Table\PurchaseTable))
3 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(113): Bake\Shell\Task\ModelTask->getTableContext(Object(App\Model\Table\PurchaseTable), ‘purchase’, ‘Purchase’)
4 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\Task\ModelTask.php(100): Bake\Shell\Task\ModelTask->bake(‘Purchase’)
5 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\BakeShell.php(272): Bake\Shell\Task\ModelTask->main(‘Purchase’)
6 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Collection\CollectionTrait.php(51): Bake\Shell\BakeShell->Bake\Shell{closure}(‘Purchase’, 0)
7 C:\xampp\htdocs\bookmarker\vendor\cakephp\bake\src\Shell\BakeShell.php(273): Cake\Collection\Collection->each(Object(Closure))
8 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Console\Shell.php(518): Bake\Shell\BakeShell->all(‘purchase’)
9 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Console\CommandRunner.php(342): Cake\Console\Shell->runCommand(Array, true)
10 C:\xampp\htdocs\bookmarker\vendor\cakephp\cakephp\src\Console\CommandRunner.php(164): Cake\Console\CommandRunner->runShell(Object(Bake\Shell\BakeShell), Array)
11 C:\xampp\htdocs\bookmarker\bin\cake.php(12): Cake\Console\CommandRunner->run(Array)
12 {main}
And the version is 3.6.4
Jon
Did your table name is purchase and not purchases ?
Related
I am trying to align 4 difference sequences using MuscleCommandLine. This code works perfectly on Anaconda and Mac but I am trying to make it work on Windows and I am having several issues.
muscle_exe = r'../muscle3.8.31_i86darwin64.exe'
in_file = r'../infile.fasta'
out_file = r'../aln_out.fasta'
muscle_cline = MuscleCommandline(muscle_exe, input=in_file, out=out_file)
muscle_cline()
When I try this using Anaconda on Mac, I get the result. However, when running the same code on Window, I get the following error:
---------------------------------------------------------------------------
ApplicationError Traceback (most recent call last)
<ipython-input-3-70ad09443dc6> in <module>
3 genome = genome_location(before, after, alignment)
4
----> 5 filename = custom_fasta(genome, alignment)
6
7 info = AlignIO.read(r'../aln_out.fasta','fasta')
<ipython-input-1-655071c8d454> in custom_fasta(locations_dict, names)
185
186 muscle_cline = MuscleCommandline(muscle_exe, input=in_file, out=out_file)
--> 187 muscle_cline()
188
189 return(filename)
~\Anaconda3\lib\site-packages\Bio\Application\__init__.py in __call__(self, stdin, stdout, stderr, cwd, env)
567
568 if return_code:
--> 569 raise ApplicationError(return_code, str(self), stdout_str, stderr_str)
570 return stdout_str, stderr_str
571
ApplicationError: Non-zero return code 1 from '../muscle3.8.31_i86darwin64.exe -in ../infile.fasta -out ../aln_out.fasta', message "'..' is not recognized as an internal or external command,"
I have read the documentation but this is not listed as an issue. This same question has been asked before but no solution has been offered. People keep asking to install muscle, but the way it works with Biopython and Anaconda is that you do not need to install it.
So why does this keep happening?
I'm trying to insert an image in a FPDF fancytable.
I tried to put inside the fancytable function the following :
$this->Cell($w[1],6,$pdf->Image('lettre.jpg',0,0,20,0),'LRB',0,'C',$fill);
but I have (of course) the following error message :
PHP Notice: Undefined variable: pdf in /MyScript.php on line 143
Notice: Undefined variable: pdf in /MyScript.php on line 143
PHP Fatal error: Uncaught Error: Call to a member function Image() on
null in /MyScript.php:143
Stack trace:
0 /MyScript.php(172): PDF->FancyTable(Array, Array)
1 {main} thrown in /MyScript.php on line 143
I understand that I call the pdf function inside the fancytable function (part of the pdf function), so do I have a solution ?
Thanks !
Damn, the answer was in the question : just replaced $pdf by $this and it fixed my problem..
I let the question here just in case somebody have the same error one day ^^
I need some help in understanding the following things,
I am using composer for elasticsearch php integration. I have created a html page to post form data into elasticsearch. I am trying to access the html page from another pc by changing the localhost ip to the system ip where i have hosted the html page. But i'm getting error.
Fatal error: Uncaught Elasticsearch\Common\Exceptions\NoNodesAvailableException: No alive nodes found in your cluster in C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php:50 Stack trace: #0 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(77): Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() #1 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Transport.php(94): Elasticsearch\Transport->getConnection() #2 C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\Connections\Connection.php(269): Elasticsearch\Transport->performRequest('POST', '/sib_api/_doc', Array, '{"requestid":"#...', Array) #3 C:\xampp\htdocs\Client_portal\vendor\react\promise\src\FulfilledPromise.php(25): Elasticsearch\Connections\Connection->Elasticsearch\Connections{closure}(Array) #4 C:\xampp\htdocs\Client_portal\vendor\guzzlehttp\ringphp\sr in C:\xampp\htdocs\Client_portal\vendor\elasticsearch\elasticsearch\src\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool.php on line 50
To resolve the above issue i tried to call the autoload.php file using the complete path (i.e) http://localhost:8080/client_portal/vendor/autoload.php
But now I am getting another error
Fatal error: Uncaught Error: Class 'Elasticsearch\ClientBuilder' not found in C:\xampp\htdocs\Client_portal\Elastic_api.php:19 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Client_portal\Elastic_api.php on line 19
Could someone help me to resolve this issue... and also guide me how to access my html page from another system without any isssues.
<?php
session_start();
$Engagement = $_SESSION["Engagement"];
$Application = $_SESSION["Application"];
$Priority = $_SESSION["Priority"];
$Requestid = $_SESSION["Requestid"];
$_SESSION["URL"] = $_POST['url'];
$_SESSION["REQ"] = $_POST['request'];
$_SESSION["RES"] = $_POST['response'];
$_SESSION["yn"] = $_POST['YN'];
$_SESSION["START"] = $_POST['start'];
$_SESSION["END"] = $_POST['end'];
if (isset($_POST['Submit2']))
{
require 'http://localhost:8080/client_portal/vendor/autoload.php';
$client = Elasticsearch\ClientBuilder::create()->build();
// the above line is where i'm getting the error...
I am very new to NativeScript (few hours) and I am trying to follow the tutorial on their site. When running the code at step 12 of the tutorial, the app is failing (when I submit the login form only) and crashes with the following error stack:
2018-10-10 20:35:06.321 nsplaydev[2295:419329] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: TypeError: user.login is not a function. (In 'user.login()', 'user.login' is undefined)
at
1 signIn#file:///app/views/login/login-page.js:17:15
2 notify#file:///app/tns_modules/tns-core-modules/data/observable/observable.js:110:31
3 _emit#file:///app/tns_modules/tns-core-modules/data/observable/observable.js:127:24
4 tap#file:///app/tns_modules/tns-core-modules/ui/button/button.js:207:24
5 UIApplicationMain#[native code]
6 start#file:///app/tns_modules/tns-core-modules/application/application.js:272:26
7 run#file:///app/tns_modules/tns-core-modules/application/application.js:300:10
8 anonymous#file:///app/app.js:2:22
9 evaluate#[native code]
10 moduleEvaluation#[native code]
11 #[native code]
12 promiseReactionJob#[native code]
', reason: '(null)'
*** First throw call stack:
(0x211e5bf78 0x211054284 0x102e67e60 0x102e8d2e4 0x10378f088 0x1037901b4 0x21104f900 0x23f731a98 0x23f19be18 0x23f19c14c 0x23f19b0ec 0x23f76d208 0x23f76e468 0x23f74cb70 0x23f81d024 0x23f81fb50 0x23f81fec8 0x23f81854c 0x211de8a50 0x211de89cc 0x211de8284 0x211de2f64 0x211de2844 0x214091be8 0x23f73031c 0x103790044 0x10378e7a4 0x10378e26c 0x102e45630 0x103440e14 0x103449a24 0x103449a34 0x103449a34 0x103442ee0 0x1033dc198 0x1033b1e94 0x103546b9c 0x102e5a354 0x1035e2964 0x10344a494 0x103449a34 0x103449a34 0x103449a34 0x103442ee0 0x1033dc198 0x1033b1e94 0x103546c80 0x1035de8e0 0x102e51898 0x102e97f50 0x102ac8198 0x10257d3dc 0x211898020)
libc++abi.dylib: terminating with uncaught exception of type NSException
2018-10-10 20:35:06.321 nsplaydev[2295:419329] PlayLiveSync: Uncaught Exception
To learn the framework, I was purposefully typing each line manually to learn. Thought that could have introduced the error, so I went back and copy pasted their exact code. Still getting an issue.
Update: The link to the tutorial is here
Thanks
Based on the error log it looks like you haven't defined login function in your view model.
I was getting deprecated constructor error when I tried installing postgres with xampp. Though I was able to resolve those issues but I am unable to solve the one below. Kindly help to solve this.
Fatal error: Uncaught Error: Call to undefined method ADORecordSet_postgres7::ADORecordSet_postgres64() in C:\xampp\phppgadmin\libraries\adodb\drivers\adodb-postgres7.inc.php:220 Stack trace:
#0 C:\xampp\phppgadmin\libraries\adodb\adodb.inc.php(1055): ADORecordSet_postgres7->__construct(Resource id #19, 2)
#1 C:\xampp\phppgadmin\libraries\adodb\adodb.inc.php(1015): ADOConnection->_Execute('select version(...', false)
#2 C:\xampp\phppgadmin\libraries\adodb\adodb.inc.php(1427): ADOConnection->Execute('select version(...', false)
#3 C:\xampp\phppgadmin\libraries\adodb\drivers\adodb-postgres64.inc.php(129): ADOConnection->GetOne('select version(...')
#4 C:\xampp\phppgadmin\libraries\adodb\drivers\adodb-postgres64.inc.php(697): ADODB_postgres64->ServerInfo()
#5 C:\xampp\phppgadmin\libraries\adodb\adodb.inc.php(525): ADODB_postgres64->_connect('host='localhost...', ''postgres'', ''password'', ''template1'')
#6 C:\xampp\phppgadmin\classes\database\Connection.php(42): ADOConnection->Connect('localhost:5432:...', 'postgres', ' in C:\xampp\phppgadmin\libraries\adodb\drivers\adodb-postgres7.inc.php on line 220
You should also change the constructor in adodb-postgres7.inc.php by replacing
function ADODB_postgres7()
with
function __construct()