expected ')' got '.' !!! How to detect the file with error? - less

I recently upgraded less to 1.3.3v began to encounter this error
expected ')' got '.'
during less to css compilation...
This is the error trace of the
at error (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:198:15)
at expect (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:190:13)
at Object. (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:884:25)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
at Object.primary (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:527:32)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
at Object.block (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:1121:42)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
at Object.ruleset (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:1144:54)
at $ (/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/js/lib/less/parser.js:133:24)
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/parser.rb:103:in block in to_css'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:90:inblock in do_lock'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:88:in do_lock'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:60:inlock'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script/v8_context.rb:30:in exec'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/java_script.rb:26:inexec'
/.rvm/gems/ruby-1.9.3-p286/gems/less-2.3.2/lib/less/parser.rb:103:in `to_css'
guess its some syntax error... My question is how to detect the file and the line number of the error ??? I'm not sure how to debug ???
Any Suggestions ????
PS : havent encountered this before upgrading

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)));

Errors in October CMS installation via cPanel

I just installed October CMS on my hosting platform via cPanel's Softaculous utility. I do not believe installation method has anything to do with my errors but mentioning it just in case I am wrong.
October CMS Version: 1.0.458
Sever PHP Version: 7.3.3
After installing in the designated directory it is showing "HTTP 500" generic error so I checked the error log. Following error was being shown
"[28-Sep-2019 11:09:04 Etc/GMT] PHP Parse error: syntax error, unexpected '[', expecting ')' in /home/XYZ/public_html/XYZ/vendor/october/rain/src/Support/helpers.php on line 149"
There is absolutely no online resource which describes occurance of such an error and possible solution. So I opened the helper.php to look at line 149. The code on this line was,
$query = str_replace(['%', '?'], ['%%', '%s'], $query);
Now there is nothing seemingly wrong with this line but I thought may be the "str_replace" function is not able to understand the array arguments. So I removed the array arguments and wrote it two times like
$query = str_replace('%', '%%', $query);
$query = str_replace('?', '%s', $query);
Now the error on this line disappears but a new error appears on another line as follows
PHP Parse error: syntax error, unexpected '[' in /home/XYZ/public_html/XYZ/vendor/october/rain/src/Support/helpers.php on line 238
The code on this line is
function trans($id = null, $parameters = [], $domain = 'messages', $locale = null)
Now here I am not sure if removing brackets would make everything alright. Why should such strange errors appears? Can someone help?
Are you 100% sure the PHP version you're using is 7.3.3?
The short array syntax of using [ ... ] instead of array( ... ) was introduced in PHP 5.4 and the errors you are getting are the errors that will happen if you are using an older version of PHP. I'm not sure how cPanel Softaculous works, but perhaps somehow it set you up to use a different version of PHP then you expect.
I would try running phpinfo() to double check your PHP setup.

redirecting sql output to a file in a shell script

I am facing an issue while executing the following script snippet.
$ORACLEHOME/bin/sqlplus -s $DBUSER/$DBPASSWORD <<EOF
set pages 0 feedback off
SELECT * FROM ERR_STG_ROAMING_PARTNER;
EOF > Err_File.txt
The following error message appears.
./Roaming.sh: line 213: warning: here-document at line 206 delimited by end-of-file (wanted `EOF')
./Roaming.sh: line 214: syntax error: unexpected end of file
Any help will be appreciated.
Try this:
$ORACLEHOME/bin/sqlplus -s $DBUSER/$DBPASSWORD > Err_File.txt <<EOF
set pages 0 feedback off
SELECT * FROM ERR_STG_ROAMING_PARTNER;
EOF
That is, specify the output redirection before the input heredoc redirection. The shell expects EOF to be on its own on the line terminating the heredoc.
The error message you are getting is the shell complaining about finding end-of-file (of the script file) before finding EOF. The usage of EOF for the heredoc delimiter might lead to some confusion here!

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!