Ask Experts » General Questions » Other Questions »

Problem of non display of syntax errors within a python program

Date: 07 Jan 2016   Posted By: andrew dikdik     Group: General Questions    Category: Other Questions   

I am working with dinosaur program of python, which is a very good work base for me. I am in severe problems at present, with the syntax errors not showing me the red lines to tell where the problem is. Can somebody explain why there is a non-display of such errors and what I can do about it?

Cannot see what are syntax errors in a python program? Check out with expert advice why this is so & how to resolve the issue.

Author: Mahesh    11 Jan 2016      Member Level: Diamond     Points : 7  (Rs 7)    Voting Score: 0

Python errors usually show the error in numbers on command line. I assume you're running the program on command line. So in such case you have to check the error written in the console.

For example, check the code failed on console with message such as following :

File "", line 1, in ?
while True print 'Hello world'
SyntaxError: invalid syntax

In the above example the error is after or near line 1. The error in question could be because of the loop.

If you're using IDE like Pycharm from Netbrains then you'll be able to debug upto the error point. There is also feature of step wise debugging to check where is the source of error.

I suggest you to use IDE like Pycharm or Eclipse Python IDE plugin. That way you can view and read about the errors.

Author: andrew dikdik    12 Jan 2016      Member Level: Bronze     Points : 0    Voting Score: 0

thank you for the helpings.

many good days komrade

Post Answer

You must Sign In to post a response.

Post Answer        

Related Questions
  • Return to Question Index
  • Ask Question to Experts

  • Top Contributors
    TodayLast 7 Daysmore...