[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Line number problem in python-mode Errors

From: Tomas Nordin
Subject: Re: Line number problem in python-mode Errors
Date: Sun, 02 Oct 2016 13:04:51 +0200
User-agent: Notmuch/0.22 ( Emacs/24.4.1 (i586-pc-linux-gnu)

Amir Teymuri <> writes:

>    Hello,
>    i am using emacs in python mode. There is a problem with the line
>    numbers each time the python interpreter shows an Error:
>    each time an error occurs inside my, the error message shows
>    always the actual line number + 1. Here is an example:
> #
> 1 from tst import *
> # the interpreter error message:
>>>> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File "/home/amir/programming/python/c_m/", line 2, in <module>
> AttributeError: 'module' object has no attribute 'foo'

I don't understand properly what you are doing. But after this
traceback, if you go to the file, line 2, do you not find there
a reference to foo which is not defined?

A little tip also, if you are dealing with learning python, importing
things with the star import, like `from tst import *` is not
recommended. Makes it harder to read code later.

>    How can i fix this problem?
>    Kind regards,
>    Amir

reply via email to

[Prev in Thread] Current Thread [Next in Thread]