From: Tomas Nordin <tomasn@posteo.net>
To: Amir Teymuri <amirteymuri@gmx.de>, help-gnu-emacs@gnu.org
Subject: Re: Line number problem in python-mode Errors
Date: Sun, 02 Oct 2016 13:04:51 +0200 [thread overview]
Message-ID: <87r37z3tbg.fsf@debian.tompa.tv> (raw)
In-Reply-To: <trinity-fd761d9e-a63b-4041-9724-86d3c6cad5d9-1475340630576@3capp-gmx-bs48>
Amir Teymuri <amirteymuri@gmx.de> 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 file.py, the error message shows
> always the actual line number + 1. Here is an example:
> # file.py
> 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/lern.py", 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 lern.py, 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
prev parent reply other threads:[~2016-10-02 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-01 16:50 Line number problem in python-mode Errors Amir Teymuri
2016-10-02 11:04 ` Tomas Nordin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r37z3tbg.fsf@debian.tompa.tv \
--to=tomasn@posteo.net \
--cc=amirteymuri@gmx.de \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).