Quantcast
Channel: Active questions tagged syntax-error - Stack Overflow
Browsing index pages (639 articles)
↧

discord.py - Error command with DM member

I wanted to make an error command for my code, that gets shown when the dms are turned off or the user wasn't found, here's my code:@client.command()async def DM(ctx, user: discord.User, *,...

View Article


Why do I get "SyntaxError: cannot assign to function call"?

The error messageSyntaxError: cannot assign to function callis produced by all of the following examples:foo() = 3mydict = {}mydict('key') = 3for i() in [1, 2, 3]: pass[x for int(x) in '123']with...

View Article


Why am I getting a syntax error when using goto? [duplicate]

I have this error:Parse error: syntax error, unexpected T_STRING in /home/u1/public_html/scripts/easypanel.php on line 192When i run that on the local it's work, but on the real server it's not:line...

View Article

Why do I get "SyntaxError: invalid syntax" on a line with perfectly valid...

This is the line of code:guess = Pmin+(Pmax-Pmin)*((1-w**2)*fi1+(w**2)*fi2)Pmin, Pmax, w, fi1 and fi2 have all been assigned finite values at this point, so why is there an error?When I remove that...

View Article

In a Python 2 REPL, I get a SyntaxError when entering an un-indented...

This code works when I try it from a .py file, but fails in the command line interpreter and Idle.>>> try:... fsock = open("/bla")... except IOError:... print "Caught"... print "continue" File...

View Article


Why do I get a SyntaxError when I type in a “python” command at the chevron...

I am just getting started with Python and wrote a simple perimeter program. However whenever I type python perimeter.py in my terminal I get the following error I don't know how to solve...

View Article

Visual Studio thinks correct SQL syntax is incorrect

In Visual Studio 2013, I have created a database project and imported an existing database. At first all was fine, and the project built and produced create scripts.However, now Visual Studio seems to...

View Article

Syntax error:' Expression expected' error in Swift code [closed]

This is a piece of code from a Good textbook on making Swift & Spritekit games.Any suggestions or observations on why I got the errorExpression expectedplease.import Foundationimport...

View Article


Can I get my compiler to complain about namespaces spanning the end of an...

One of the more annoying syntax gaffes one can make in C++ is opening a namespace within an include file, and neglecting to close it (with a }) by the end of the file. While this is not technically a...

View Article


Syntax error on confusing compound Python statement

I'm try to run a quadtree example (first bit of code on that page) from pygame but am getting a syntax error on a very confusing line:in_nw = item.left <= cx and item.top <= cyThe syntax...

View Article

Image may be NSFW.
Clik here to view.

Using $this->$propertyName to access class property emits "Array to String...

I am trying to use 1 model for many controller and views as the model has everything in common except for 4 variables, so as to do this I tried to initialize the variables in the model using a...

View Article

TCL 8.3: syntax error in expression "a eq b"

I have to run TCL code written for version 8.5 with the interpreter of version 8.3.I am having problems with eq. Seems 8.3 doesn't recognize it. A simple code:% expr { "a" eq "b" }returns an error...

View Article

Don't understand the error message : Invalid syntax in for statement

I am writing a very simple program to output the 0-10 in numbers using a for loop. However it comes up with a syntax error when I click run, highlighting in red the "=" in the 8th line. I don't...

View Article


"Missing semicolon" error raised when mocking a class in Jest using Typescript

I'm using Typescript and trying to test my code with Jest, and I made a type casting on a class so I can mock it.Unfortunately, when I ran the test suite I got the following error: SyntaxError:...

View Article

this library isn't working with python 3: SyntaxError: Missing parentheses in...

So I'm trying to install SimpleCV on my Mac which is running OS X 10.10.3 (Yosemite). I have python 3.4.3 installed and pygame is also installed (which I apparently need for SimpleCV). I have installed...

View Article


Image may be NSFW.
Clik here to view.

Making Dijkstra's in c++ - priority queue iterator problems

I've just learnt Dijkstra's in school but i wanted to try and code it. I'm having a problem with an iterator and changing a specific point in a vector, but most likely my implementation is wrong. The...

View Article

Error when i run my laravel code it said boostrap.js on a server

guys when i run my laravel projectit shows boostrap.js or somethinghow do i fix this??Im sorry for code dumpingso what i didcomposer create-project laravel/laravel file-namecomposer require...

View Article


Image may be NSFW.
Clik here to view.

Making Dijkstra's in c++ - priority queue iterator problems

I've just learnt Dijkstra's in school but i wanted to try and code it. I'm having a problem with an iterator and changing a specific point in a vector, but most likely my implementation is wrong. The...

View Article

How do I fix this: Syntax error near "begin"?

module booth(num1,num2,prod);input [22:0] num1,num2;output [45:0] prod;reg [22:0]num1_bar;reg [46:0]sub_1;reg [22:0]temp;reg [22:0]result;reg [1:0]sel;reg [22:0]add;reg [22:0]zeros;assign temp = ~...

View Article

How do I fix: "Syntax error near always"?

I am trying to run this code, and it is giving these errors:Syntax error near "always"Syntax error near "endmodule"I don't understand what is wrong in this code:module fortran_v2( input clk );parameter...

View Article
Browsing index pages (639 articles)


Latest Images