How to debug the error thrown by Doctrine - sql

What ?
This is the error thrown by my doctrine when writing my query
[Semantical Error] line 0, col 971 near '(\n ': Error: Class '(' is not defined.
How can i detect the exact position where the error occurs in my doctrine style of writing, in short how to read this error ?
my Query pattern
$qb1 = $this->_em->createQueryBuilder();
$qb1->select('
count(case when (boolShit) then id end)
')
->from(someTable);
$qb1->getQuery()->getResult();

Assuming that you have Symfony2, you can debug it with using app_dev.php. If you do so, you are able to press plus button beneath the error output that you've shown. This pus button is on the end of the line starting with [QueryException].
If you'll find this magic "plus button" you will find the exact line of getting result (i.e. getResult(), getArrayResult()...)
Example output with "plus button":

Related

An error occurred when executing Randomwalk2dmobility in NS3

I am a newbie to NS3. I want to understand the execution status of handover in the Randomwalk2d module and visualize it. The default is two Ue and two enb, but errors will always occur during execution. Can anyone help me solve the problem?
This is my code link:https://drive.google.com/file/d/163NQOyvs0bTh2J4P9_vpS4Y7iqocB3HJ/view?usp=sharing
When I execute the command : ./waf --run scratch/lte_handover --visualize, the following error appear
../scratch/lte_handover.cc:In funtion 'int main(int, char**)':
../scratch/lte_handover.cc:296:78: error: expected ')' before ';' token
"Bounds",RectangleValue (Rectangle (0,2000,0,2000)));
^
Build failed
->task in 'lte_handover' failed with exit status 1 (run with -v to display more information)
Follow the instructions to enter the command :./waf --run scratch/lte_handover -v, and the following information appears
Several tasks use the same identifier. Please check the information on
https://waf.io/apidocs/Task.html?highlight=uid#waflib.Task.Task.uid
object 'SuidBuild_task'(
{task 139759060979784: SuidBuild_task -> }) defined in 'tap-creator'
object 'SuidBuild_task'(
{task 139759060980008: SuidBuild_task -> }) defined in 'tap-creator'
object 'SuidBuild_task'(
{task 139759065638504: SuidBuild_task -> }) defined in 'tap-creator'
Seems that you have an extra ) in that line above. You are not closing this command as you commented all the lines
ueMobility.SetPositionAllocator ("ns3::RandomRectanglePositionAllocator", // <-- close
ueMobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel","Bounds", RectangleValue (Rectangle (0,2000,0,2000)));

Octave - Fetch function

I would like to use the Fecth function to get some data, looking at the example in the .m file I can't seem to run the function with the following command;
fetch(yahoo(), "yhoo", "01-Jul-2015", "10-Jul-2015", "w")
This gives me the following error;
error: dates(_,4): but dates has size 0x0
error: called from
fetch_yahoo at line 69 column 12
fetch at line 124 column 18
Does anyone have any idea what's going wrong here? I've tried changing the 'w' to 'd' but have no idea what's going wrong?

EOF error using input Python 3

I keep getting an EOF error but unsure as to why. I have tried with and without int() but it makes no difference. I'm using Pycharm 3.4 and Python 3.
Thanks,
Chris
while True:
try:
number = int(input("what's your favourite number?"))
print (number)
break
You must close a try statement because you are declaring that there might be an error and you want to handle it
while True:
try:
number = int(input("what's your favourite number?"))
print(number)
break
except ValueError as e:
print("Woah, there is an error: {0}".format(e))

Pig Filter Syntax error, unexpected symbol

inputData = LOAD '$input' AS (line:chararray);
statusLineFilter = FILTER smallData BY (line MATHCES '^.* AppWrite-Dispatcher: Status code: [0-9]+$');
This code, when I run it, yields this error: ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1200: Syntax error, unexpected symbol at or near 'line'
The log file says the exact same thing. I'm at a loss, because the exact same syntax is working in other scripts I've written.
In order to avoid misspelling of key words I recommend you to use an IDE or a Text-Editor like emacs with the pig-mode.el which add syntax highlight ;)

Syntax error when storing Pig output

I am having some issues with storing my pig output to a file. This is what I am using to store:
'STORE rel INTO 'simple'; '
If I Dump 'rel' I get:
>(car,0.5,(door,tire,jello,truck,random))
(toy,0.5,(jeep,bunny toy))
(door,0.5,(car,jello,random))
>(jeep,0.5,(toy,bunny toy))
What I get in the file is:
<Yulias-MacBook-Pro:~ yuliatolskaya$ /Users/yuliatolskaya/Documents/misc/pig_clustering/simple/part-r-00000 ; exit;
/Users/yuliatolskaya/Documents/misc/pig_clustering/simple/part-r-00000: line 1: syntax error near unexpected token `('
/Users/yuliatolskaya/Documents/misc/pig_clustering/simple/part-r-00000: line 1: `car 0.5 (door,tire,jello,truck,random)'
logout
[Process completed] >
I am really not sure what the problem is, as there are no errors in the logfiles...Please Help!