sgzwiz / pyscripter

Automatically exported from code.google.com/p/pyscripter
1 stars 2 forks source link

PyScripter reports error on line 1 instead of correct line number #735

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Make a new py file and use no special main method or indentation.
2.Write some code without an error on the first line of the script.
(e.g.:asdf = "qwerty")
3.Write something with an error on a later line
(e.g.:range())[with no indentation!]

What is the expected output? What do you see instead?
-It says that the error is on line 1 (and highlights that line)
-I think it should say that the error is on the line where the actual error is 
:)

What version of the product are you using? On what operating system?
Windows 7 x64 SP1, PyScripter 2.5.3.0 x64, Either internal interpreter, or 
external Python 3.3.0 (x64)

Please provide any additional information below.

-The only thing I found is that if I put the error in a function, then it shows 
it at the correct line.

(e.g.:
asdf = "qwerty"

def somefunction():
    range()

somefunction()
)

Original issue reported on code.google.com by istvan.d...@gmail.com on 9 May 2013 at 5:29

Attachments:

GoogleCodeExporter commented 9 years ago
One other thing is that I tried to run the script from IDLE and from the plain 
python interpreter too, and both of those showed the good line number.

Original comment by istvan.d...@gmail.com on 9 May 2013 at 5:31

GoogleCodeExporter commented 9 years ago
Am I misinterpreting what you say?

I typed 

a=1
range())

into an editor.  Run the script and I got

  File "<module5>", line 2
    range())
           ^
SyntaxError: invalid syntax

which is what I was expecting.

Original comment by pyscripter on 23 Mar 2015 at 4:03