Yii, yiic throws an exception CConsoleApplication.defaultController - yii

exception 'CException' with message 'Property "CConsoleApplication.defaultContro
ller" is not defined.' in ..\yiisoft\yii\framework\base\CComponent.php:173
Have someone stucked with this error?
What's the solution?
Thanks for responce.
exception 'CException' with message 'Property "CConsoleApplication.defaultContro
ller" is not defined.' in C:\xampp\htdocs\projects...\vend
or\yiisoft\yii\framework\base\CComponent.php:173
Stack trace:
0 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CModule.php(513): CComponent->__set('defaultControll...', 'users/user')
1 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CApplication.php(150): CModule->configure(Array)
2 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\YiiBase.php(125): CApplication->__construct('C:\xampp\htdocs...')
3 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\YiiBase.php(113): YiiBase::createApplication('CConsoleApplica...', 'C:\xampp\htdocs...')
4 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\yiic.php(23): YiiBase::createConsoleApplication('C:\xampp\htdocs...')
5 C:\xampp\htdocs\projects...\app\yiic.php(7): require_on
in additional if I remove defaultController I recieve this error:
exception 'CException' with message 'CConsoleApplication and its behaviors do no
t have a method or closure named "getSession".' in C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CComponent.php:266
Stack trace:
0 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\web\auth\CWebUser.php(193): CComponent>__call('getSession', Array)
1 C:\xampp\htdocs\projects...vendor\yiisoft\yii\framework\web\auth\CWebUser.php(193): CConsoleApplication->getSession()
2 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CModule.php(387): CWebUser->init()
3 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CModule.php(103): CModule->getComponent('user')
4 C:\xampp\htdocs\projects...\app\modules\users\UsersModule.php(30): CModule->__get('user')
5 C:\xampp\htdocs\projects...\app\components\RequestHandler.php(23): UsersModule->menu()
6 [internal function]: RequestHandler::onBeginRequest(Object(CEvent))
7 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CComponent.php(559):call_user_func(Array,Object(CEvent))
8 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CApplication.php(196): CComponent->raiseEvent('onBeginRequest', Object(CEvent))
9 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\base\CApplication.php(167): CApplication->onBeginRequest(Object(CEvent))
10 C:\xampp\htdocs\projects...\vendor\yiisoft\yii\framework\yiic.php(33): CApplication->run()
11 C:\xampp\htdocs\projects...\app\yiic.php(7): require_oonce

CConsoleApplication.defaultController <- Error
console.php = config To CConsoleApplication
Check root/protected/config/console.php is set defaultController

Related

Bing API exception: The formatter threw an exception while trying to deserialize the message

I am requesting compaign data via bing api using Python SDK, and this line of code throws a suds.WebFault error
get_keyword_ideas_response = adinsight_service.GetAuctionInsightData(EntityType ='Campaign',EntityIds =entityIds, SearchParameters=search_parameters)
the EntityIds is np.array of accounts. and the search parameters are
(ArrayOfSearchParameter){
SearchParameter[] =
(DateRangeSearchParameter){
EndDate =
(DayMonthAndYear){
Day = 30
Month = 8
Year = 2022
}
StartDate =
(DayMonthAndYear){
Day = 1
Month = 8
Year = 2022
}
},
(AuctionSegmentSearchParameter){
Segment = "Week"
},,
}
the full message of exception is : suds.WebFault: Server raised fault: 'The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter https://bingads.microsoft.com/AdInsight/v13:EntityIds. The InnerException message was 'Error in line 6 position 51. Expecting state 'Element'.. Encountered 'Text' with name '', namespace ''. '. Please see InnerException for more details.'

I am getting EXC_GUARD when launching app using NSTask launchedTaskWithLaunchPath

Faulting code:
myTask = [NSTask launchedTaskWithLaunchPath: appPath arguments: initArray];
Where myTask is a global static NSTask* myTask = NULL; and initArray is a global static NSMutableArray *initArray = NULL; and appPath is a local NSString*
Exception Type: EXC_GUARD
Exception Codes: 0x4000000200000001, 0x326e91a2a5c769eb
Exception Subtype: GUARD_TYPE_FD, id=0x326e91a2a5c769eb, fd=1, flavor=0x00000002 (DUP)
Top of stack:
0 libsystem_kernel.dylib 0x00007fff2033848e dup + 10
1 com.apple.Foundation 0x00007fff2126df14 -[NSConcreteTask launchWithDictionary:error:] + 2491
2 com.apple.Foundation 0x00007fff21294c89 +[NSTask launchedTaskWithLaunchPath:arguments:] + 146
This issue is not reproducible and this code has not been changed since years. Please suggest some ways to debug this.
Additional info: Parent app which is launching this task has its output stream and error stream set to a log file but both the streams have been set after this app gets launched.

NativeScript-Vue [node-rsa] TypeError: util.inherits is not a function

When trying to include node-rsa got:
TypeError: util.inherits is not a function.
Repro steps:
vue init nativescript-vue/vue-cli-template repro
cd repro
npm install --save node-rsa
npm install
Add this line to HelloWorld.vue:
<script>
import * as NodeRSA from "node-rsa"; // add this line
export default {
data () {
return {
surprise: false,
};
},
};
</script>
npm run watch:ios
Got this error:
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x104692c1f NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool, bool)
2 0x1046c7caf -[TNSRuntime executeModule:referredBy:]
3 0x10414b441 main
4 0x10a137955 start
5 0x1
JavaScript stack trace:
1 #file:///app/app.js:13604:14
2 __webpack_require__#file:///app/app.js:20:34
3 #file:///app/app.js:36341:33
4 #file:///app/app.js:36601:34
5 __webpack_require__#file:///app/app.js:20:34
6 #file:///app/app.js:36311:33
7 __webpack_require__#file:///app/app.js:20:34
8 #file:///app/app.js:9649:30
9 __webpack_require__#file:///app/app.js:20:34
10 #file:///app/app.js:27449:30
11 #file:///app/app.js:27838:34
12 __webpack_require__#file:///app/app.js:20:34
13 #file:///app/app.js:27406:35
14 __webpack_require__#file:///app/app.js:20:34
15 #file:///app/app.js:27228:176
16 __webpack_require__#file:///app/app.js:20:34
17 #file:///app/app.js:13948:38
18 __webpack_require__#file:///app/app.js:20:34
19 #file:///app/app.js:63:37
20 anonymous#file:///app/app.js:64:12
21 evaluate#[native code]
22 moduleEvaluation#[native code]
23 #[native code]
24 promiseReactionJob#[native code]
JavaScript error:
file:///app/app.js:13604:14: JS ERROR TypeError: util.inherits is not a function. (In 'util.inherits(assert.AssertionError, Error)', 'util.inherits' is an instance of Object)

Uncaught PodioBadRequestError: "Must specify either 'embed' or 'url'"

I need to set value for an embed field in Podio, and this is my code:
$field_id='pdf-property-information';
$options=$item->fields[$field_id]->values;
if(empty($options))
$item->fields[$field_id] = new PodioEmbedItemField($field_id);
// Create embed
$embed = PodioEmbed::create(array('url' => $pdf_property_information));
// Set using object
$item->fields[$field_id]->values = $embed;
// Set using associative array
$item->fields[$field_id]->values = array('embed_id' => $embed->embed_id);
And this is the error I get:
Fatal error: Uncaught PodioBadRequestError: "Must specify either
'embed' or 'url'" Request URL: http://api.podio.com/item/826141668
Stack Trace: #0
/home/apibind/public_html/mail_chimp/podio-php-4.3.0/lib/Podio.php(355):
Podio::request('PUT', '/item/826141668', Array) #1
/home/apibind/public_html/mail_chimp/podio-php-4.3.0/models/PodioItem.php(183):
Podio::put('/item/826141668', Array) #2
/home/apibind/public_html/mail_chimp/podio-php-4.3.0/models/PodioItem.php(66):
PodioItem::update(826141668, Array, Array) #3
/home/apibind/public_html/sourcingplatform/trunk/add.php(403):
PodioItem->save() #4 {main} thrown in /podio-php-4.3.0/lib/Podio.php
on line 289
You have to pass the embed_id with array key "embed". Here your final line will be like,
// Set using associative array
$item->fields[$field_id]->values = array('embed' => $embed->embed_id);

Making a delete DAO -> Uncaught exception 'PDOException'

I'm trying to make a dao which can delete a specific item once you click on the X
How did I try this? I'll begin with showing you the DAO:
public function delete($iddelete){
$sql = "DELETE FROM `wanthave`.`wanthave_items` WHERE `wanthave_items`.`id` = `iddelete` = :iddelete LIMIT 1";
$stmt = $this->pdo->prepare($sql);
$stmt->bindValue(':iddelete', $iddelete);
$stmt->execute();
return $stmt->fetch(PDO::FETCH_ASSOC);
}
This is how I setup my if structure in a controller:
if(isset($_GET['iddelete'])){
$this->itemDAO->delete($_GET['iddelete']);
}
Once I click on the X near the item I want to delete it goes to a page with in the end "&iddelete=(id of the item)". So actually when iddelete is set it's going to delete it.
But unfortunately I get this error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'iddelete' in 'where clause'' in /Applications/MAMP/htdocs/wanthave/dao/ItemDAO.php:56 Stack trace:
#0 /Applications/MAMP/htdocs/wanthave/dao/ItemDAO.php(56): PDO->prepare('DELETE FROM `wa...')
#1 /Applications/MAMP/htdocs/wanthave/controller/ItemController.php(198): ItemDAO->delete('89')
#2 [internal function]: ItemController->delete()
#3 /Applications/MAMP/htdocs/wanthave/controller/Controller.php(9): call_user_func(Array) #4 /Applications/MAMP/htdocs/wanthave/index.php(69): Controller->filter()
#5 {main} thrown in /Applications/MAMP/htdocs/wanthave/dao/ItemDAO.php on line 56
Line 56 = $stmt = $this->pdo->prepare($sql);
Any help?
public function delete($id){
$stmt = $this->pdo->prepare("DELETE FROM wanthave_items WHERE id = ?");
return $stmt->execute([$id]);
}