pdb up gives pdbtrack: Not found: <module>()

Bug #897437 reported by Ricopan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

When entering pdb within python source with:

import pdb
pdb.set_trace()

pdb stepping successfully follows code to imported modules, automatically switching and opening to these as expected, but does not follow back with up command, most recently yielding:

pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py

Note that after this error, pdb down will return to correct code (ignoring one line off issue).

This is a new version of python-mode (downloaded today Nov 28 2011):
py-version: 6.0.3

After reading Bug #857003 I verified sole uncommented py-pdbtrack-stack-entry-regexp is as follows:

;; pdbtrack constants
(defconst py-pdbtrack-stack-entry-regexp
; "^> \\([^(]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()"
  "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
  "Regular expression pdbtrack uses to find a stack trace entry.")

Bug Report:
In GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-04-04 on rothera, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11001000
configured using `configure '--build' 'i686-linux-gnu' '--build' 'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i686-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-c ! <help-echo> <down-mouse-1> <mouse-1> C-c C-c
s <return> s <return> s <return> s <return> s <return>
u <return> u <return> <help-echo> <help-echo> <menu-bar>
<buffer> C-d <down-mouse-1> <mouse-movement> <mouse-movement>
<drag-mouse-1> <help-echo> <help-echo> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <edit>
<copy> <help-echo> <help-echo> <down-mouse-1> <mouse-1>
<help-echo> <down-mouse-1> <mouse-1> C-x b <return>
h e l p <return> u p <return> d o w n <return> d o
w n <return> n <return> u p <return> <help-echo> <help-echo>
<help-echo> <menu-bar> <buffer> C-b <up> <S-down> <help-echo>
<help-echo> <help-echo> <help-echo> <menu-bar> <edit>
<copy> <help-echo> M-x p y - <tab> v e r <tab> <return>
M-x r e p o r t - e m <tab> <return>

Recent messages:
pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
pdbtrack: Traceback cue not found
pdbtrack: (Non-file source: '<stdin>')
pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
pdbtrack: line 21, file /home/richard/workspace/gendarme/gendarme/xbase.py
pdbtrack: line 58, file /home/richard/workspace/gendarme/gendarme/xbase.py
pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
Mark set
Making completion list...
Using `python-mode' version 6.0.3

Load-path shadows:
/usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.2/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.2/lisp/textmodes/ispell

Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc
time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1
hex-util hashcash mail-utils emacsbug help-mode view vc-hg imenu
python-mode info-look info py-shell-complete derived easymenu edmacro
kmacro cl cl-19 cc-cmds cc-engine cc-vars cc-defs regexp-opt ansi-color
compile comint ring tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode
register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse
jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
loaddefs button minibuffer faces cus-face files text-properties overlay
md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs)

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 897437] [NEW] pdb up gives pdbtrack: Not found: <module>()

Am 28.11.2011 23:00, schrieb Ricopan:
> Public bug reported:
>
> When entering pdb within python source with:
>
> import pdb
> pdb.set_trace()
>
> pdb stepping successfully follows code to imported modules,

Hi,

thanks for the report.

Still need some example code which triggers the bug.

Andreas

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.4
importance: Undecided → Medium
Revision history for this message
Ricopan (ricopan) wrote : Re: [Bug 897437] Re: pdb up gives pdbtrack: Not found: <module>()
Download full text (7.1 KiB)

Ok triggering code -- requires two files, test1 imports test_pdb_up.

test1.py below

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#test1
# start here by executing buffer
import pdb
pdb.set_trace()

# use pdb step (s) to track to imported module
import test_pdb_up

print "back to test1"

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

test_pdb_up.py
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# test_pdb_up is imported by test1

for x in range(3):
    y = x**2
    # try pdb up (u) here to return to test1.py
    # I get pdbtrack: Not found: <module>(), /tmp/Python323167MgP.py
    # and no switching to test1.py
    # however, pdb down (d) then returns focus here.
    print "y = ", y

On Mon, Nov 28, 2011 at 11:30 PM, Andreas Roehler <<email address hidden>
> wrote:

> Am 28.11.2011 23:00, schrieb Ricopan:
> > Public bug reported:
> >
> > When entering pdb within python source with:
> >
> > import pdb
> > pdb.set_trace()
> >
> > pdb stepping successfully follows code to imported modules,
>
>
> Hi,
>
> thanks for the report.
>
> Still need some example code which triggers the bug.
>
> Andreas
>
>
> ** Changed in: python-mode
> Assignee: (unassigned) => Andreas Roehler (a-roehler)
>
> ** Changed in: python-mode
> Milestone: None => 6.0.4
>
> ** Changed in: python-mode
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/897437
>
> Title:
> pdb up gives pdbtrack: Not found: <module>()
>
> Status in An Emacs mode for editing Python code:
> New
>
> Bug description:
> When entering pdb within python source with:
>
> import pdb
> pdb.set_trace()
>
> pdb stepping successfully follows code to imported modules,
> automatically switching and opening to these as expected, but does not
> follow back with up command, most recently yielding:
>
> pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
>
> Note that after this error, pdb down will return to correct code
> (ignoring one line off issue).
>
>
> This is a new version of python-mode (downloaded today Nov 28 2011):
> py-version: 6.0.3
>
> After reading Bug #857003 I verified sole uncommented py-pdbtrack-
> stack-entry-regexp is as follows:
>
> ;; pdbtrack constants
> (defconst py-pdbtrack-stack-entry-regexp
> ; "^> \\([^(]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()"
> "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
> "Regular expression pdbtrack uses to find a stack trace entry.")
>
>
> Bug Report:
> In GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
> of 2011-04-04 on rothera, modified by Debian
> Windowing system distributor `The X.Org Foundation', version 11.0.11001000
> configured using `configure '--build' 'i686-linux-gnu' '--build'
> 'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
> '--libexecdir=/usr/lib' '--localstatedir=/var/lib'
> '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
> '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/e...

Read more...

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Hi,

can follow your description now.

The bug however --as you remarked already-- only occurs when code
execution finished.

IMO a kind of pdb messaging bug.
AFAIU not Emacs or python-mode related.
Get basically the same when pdb is started from a common shell.

Will close this report, unless some comment provides a different
perspective.

Thanks,

Andreas

Revision history for this message
Ricopan (ricopan) wrote :
Download full text (6.8 KiB)

Hi,

For me this is a bug occurs when I am stepping through code via pdb only in
emacs. In a normal python shell (here Python 2.7.1) pdb down and up works
for me to follow code to either imported file or back up to test1.

In emacs python-mode (unlike in an earlier version that worked although I'm
not sure exactly sure which, from about a year ago), pdb step successfully
opens buffer for test_pdb_up and switches to this frame, but a subsequent
pdb up gives the error pdbtrack: Not found: <module>, and the window is not
switched to the test1 buffer.

Does pdb up work differently for you? I wonder what else could be causing
this....

On Tue, Nov 29, 2011 at 12:31 PM, Andreas Roehler <<email address hidden>
> wrote:

> Hi,
>
> can follow your description now.
>
> The bug however --as you remarked already-- only occurs when code
> execution finished.
>
> IMO a kind of pdb messaging bug.
> AFAIU not Emacs or python-mode related.
> Get basically the same when pdb is started from a common shell.
>
> Will close this report, unless some comment provides a different
> perspective.
>
> Thanks,
>
> Andreas
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/897437
>
> Title:
> pdb up gives pdbtrack: Not found: <module>()
>
> Status in An Emacs mode for editing Python code:
> New
>
> Bug description:
> When entering pdb within python source with:
>
> import pdb
> pdb.set_trace()
>
> pdb stepping successfully follows code to imported modules,
> automatically switching and opening to these as expected, but does not
> follow back with up command, most recently yielding:
>
> pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
>
> Note that after this error, pdb down will return to correct code
> (ignoring one line off issue).
>
>
> This is a new version of python-mode (downloaded today Nov 28 2011):
> py-version: 6.0.3
>
> After reading Bug #857003 I verified sole uncommented py-pdbtrack-
> stack-entry-regexp is as follows:
>
> ;; pdbtrack constants
> (defconst py-pdbtrack-stack-entry-regexp
> ; "^> \\([^(]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()"
> "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
> "Regular expression pdbtrack uses to find a stack trace entry.")
>
>
> Bug Report:
> In GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
> of 2011-04-04 on rothera, modified by Debian
> Windowing system distributor `The X.Org Foundation', version 11.0.11001000
> configured using `configure '--build' 'i686-linux-gnu' '--build'
> 'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
> '--libexecdir=/usr/lib' '--localstatedir=/var/lib'
> '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
> '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim'
> '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
> 'build_alias=i686-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g'
> 'CPPFLAGS=''
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLL...

Read more...

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 29.11.2011 20:56, schrieb Ricopan:
> Hi,
>
> For me this is a bug occurs when I am stepping through code via pdb only in
> emacs. In a normal python shell (here Python 2.7.1) pdb down and up works
> for me to follow code to either imported file or back up to test1.
>
> In emacs python-mode (unlike in an earlier version that worked although I'm
> not sure exactly sure which, from about a year ago), pdb step successfully
> opens buffer for test_pdb_up and switches to this frame, but a subsequent
> pdb up gives the error pdbtrack: Not found:<module>, and the window is not
> switched to the test1 buffer.
>
> Does pdb up work differently for you? I wonder what else could be causing
> this....

send 2 screenshots, one from shell
looks pretty the same for me

Revision history for this message
Ricopan (ricopan) wrote :
Download full text (7.8 KiB)

Hi, and thanks much for this attention.

My issue is that pdb up, after stepping into the imported code, does not
sync with the original code test1 and gives error:

pdbtrack: Not found: <module>(), /tmp/Python4143irY.py.

the temp file is made automatically by pdb -- a process I do not understand.

Sorry if this seems like a detail -- I had relied on this functionality
during debugging.

I've attached a series of screenshots from within emacs -- my python-mode
opens an additional frame on starting python interpreter. Desired behavior
is that after using pdb up (u), code screen (left) returns to test1.py (or
a generated temp file).

My original guess was that this problem was due to changes in
py-pdbtrack-stack-entry-regexp but I've substituted it for a number of
values from older python-mode sources without solving problem (generally
made worse w/o syncing on first step to imported module).

Apologies for a small gotcha -- here imported file is named test_import
instead of test_pdb_up.

Rich

On Tue, Nov 29, 2011 at 2:00 PM, Andreas Roehler
<email address hidden>wrote:

> Am 29.11.2011 20:56, schrieb Ricopan:
> > Hi,
> >
> > For me this is a bug occurs when I am stepping through code via pdb only
> in
> > emacs. In a normal python shell (here Python 2.7.1) pdb down and up
> works
> > for me to follow code to either imported file or back up to test1.
> >
> > In emacs python-mode (unlike in an earlier version that worked although
> I'm
> > not sure exactly sure which, from about a year ago), pdb step
> successfully
> > opens buffer for test_pdb_up and switches to this frame, but a subsequent
> > pdb up gives the error pdbtrack: Not found:<module>, and the window is
> not
> > switched to the test1 buffer.
> >
> > Does pdb up work differently for you? I wonder what else could be
> causing
> > this....
>
> send 2 screenshots, one from shell
> looks pretty the same for me
>
>
> ** Attachment added: "pdb-emacs.png"
>
> https://bugs.launchpad.net/bugs/897437/+attachment/2612836/+files/pdb-emacs.png
>
> ** Attachment added: "pdb-shell.png"
>
> https://bugs.launchpad.net/bugs/897437/+attachment/2612837/+files/pdb-shell.png
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/897437
>
> Title:
> pdb up gives pdbtrack: Not found: <module>()
>
> Status in An Emacs mode for editing Python code:
> New
>
> Bug description:
> When entering pdb within python source with:
>
> import pdb
> pdb.set_trace()
>
> pdb stepping successfully follows code to imported modules,
> automatically switching and opening to these as expected, but does not
> follow back with up command, most recently yielding:
>
> pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
>
> Note that after this error, pdb down will return to correct code
> (ignoring one line off issue).
>
>
> This is a new version of python-mode (downloaded today Nov 28 2011):
> py-version: 6.0.3
>
> After reading Bug #857003 I verified sole uncommented py-pdbtrack-
> stack-entry-regexp is as follows:
>
> ;; pdbtrack constants
> (defconst py-pdbtrack-stack-entry-regexp
> ; "^> \\([^(]+\\)(\\([0-9]+\\))\\([?a-zA-...

Read more...

Revision history for this message
Ricopan (ricopan) wrote :
Download full text (8.2 KiB)

those shots had too small fonts, resending a similar series of 4.

-Rich

On Tue, Nov 29, 2011 at 3:00 PM, Richard Llewellyn <email address hidden>wrote:

> Hi, and thanks much for this attention.
>
> My issue is that pdb up, after stepping into the imported code, does not
> sync with the original code test1 and gives error:
>
> pdbtrack: Not found: <module>(), /tmp/Python4143irY.py.
>
> the temp file is made automatically by pdb -- a process I do not
> understand.
>
> Sorry if this seems like a detail -- I had relied on this functionality
> during debugging.
>
> I've attached a series of screenshots from within emacs -- my python-mode
> opens an additional frame on starting python interpreter. Desired behavior
> is that after using pdb up (u), code screen (left) returns to test1.py (or
> a generated temp file).
>
> My original guess was that this problem was due to changes in
> py-pdbtrack-stack-entry-regexp but I've substituted it for a number of
> values from older python-mode sources without solving problem (generally
> made worse w/o syncing on first step to imported module).
>
> Apologies for a small gotcha -- here imported file is named test_import
> instead of test_pdb_up.
>
> Rich
>
>
> On Tue, Nov 29, 2011 at 2:00 PM, Andreas Roehler <
> <email address hidden>> wrote:
>
>> Am 29.11.2011 20:56, schrieb Ricopan:
>> > Hi,
>> >
>> > For me this is a bug occurs when I am stepping through code via pdb
>> only in
>> > emacs. In a normal python shell (here Python 2.7.1) pdb down and up
>> works
>> > for me to follow code to either imported file or back up to test1.
>> >
>> > In emacs python-mode (unlike in an earlier version that worked although
>> I'm
>> > not sure exactly sure which, from about a year ago), pdb step
>> successfully
>> > opens buffer for test_pdb_up and switches to this frame, but a
>> subsequent
>> > pdb up gives the error pdbtrack: Not found:<module>, and the window is
>> not
>> > switched to the test1 buffer.
>> >
>> > Does pdb up work differently for you? I wonder what else could be
>> causing
>> > this....
>>
>> send 2 screenshots, one from shell
>> looks pretty the same for me
>>
>>
>> ** Attachment added: "pdb-emacs.png"
>>
>> https://bugs.launchpad.net/bugs/897437/+attachment/2612836/+files/pdb-emacs.png
>>
>> ** Attachment added: "pdb-shell.png"
>>
>> https://bugs.launchpad.net/bugs/897437/+attachment/2612837/+files/pdb-shell.png
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/897437
>>
>> Title:
>> pdb up gives pdbtrack: Not found: <module>()
>>
>> Status in An Emacs mode for editing Python code:
>> New
>>
>> Bug description:
>> When entering pdb within python source with:
>>
>> import pdb
>> pdb.set_trace()
>>
>> pdb stepping successfully follows code to imported modules,
>> automatically switching and opening to these as expected, but does not
>> follow back with up command, most recently yielding:
>>
>> pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
>>
>> Note that after this error, pdb down will return to correct code
>> (ignoring one line off issue).
>>
>>
>> This is a new version of python-mode (downl...

Read more...

Revision history for this message
Andreas Roehler (a-roehler) wrote :

okay, used a different command:

M-x pdb

could you try that?

Might that help for the moment?

Revision history for this message
Ricopan (ricopan) wrote :
Download full text (6.2 KiB)

Hi Andreas,

Sure. Need to learn some other solution for debugging multiprocessing
anyway.

Thanks much for all your work on python-mode. I took it for granted for
many years, then recently tried other python IDE's (eg Eclipse), but keep
coming back. Maybe time for me to learn a little emacs lisp.

Rich

On Tue, Nov 29, 2011 at 11:46 PM, Andreas Roehler <<email address hidden>
> wrote:

> okay, used a different command:
>
> M-x pdb
>
> could you try that?
>
> Might that help for the moment?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/897437
>
> Title:
> pdb up gives pdbtrack: Not found: <module>()
>
> Status in An Emacs mode for editing Python code:
> New
>
> Bug description:
> When entering pdb within python source with:
>
> import pdb
> pdb.set_trace()
>
> pdb stepping successfully follows code to imported modules,
> automatically switching and opening to these as expected, but does not
> follow back with up command, most recently yielding:
>
> pdbtrack: Not found: <module>(), /tmp/Python37218CEA.py
>
> Note that after this error, pdb down will return to correct code
> (ignoring one line off issue).
>
>
> This is a new version of python-mode (downloaded today Nov 28 2011):
> py-version: 6.0.3
>
> After reading Bug #857003 I verified sole uncommented py-pdbtrack-
> stack-entry-regexp is as follows:
>
> ;; pdbtrack constants
> (defconst py-pdbtrack-stack-entry-regexp
> ; "^> \\([^(]+\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_]+\\)()"
> "^> \\(.*\\)(\\([0-9]+\\))\\([?a-zA-Z0-9_<>]+\\)()"
> "Regular expression pdbtrack uses to find a stack trace entry.")
>
>
> Bug Report:
> In GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
> of 2011-04-04 on rothera, modified by Debian
> Windowing system distributor `The X.Org Foundation', version 11.0.11001000
> configured using `configure '--build' 'i686-linux-gnu' '--build'
> 'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
> '--libexecdir=/usr/lib' '--localstatedir=/var/lib'
> '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
> '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim'
> '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
> 'build_alias=i686-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g'
> 'CPPFLAGS=''
>
> Important settings:
> value of $LC_ALL: nil
> value of $LC_COLLATE: nil
> value of $LC_CTYPE: nil
> value of $LC_MESSAGES: nil
> value of $LC_MONETARY: nil
> value of $LC_NUMERIC: nil
> value of $LC_TIME: nil
> value of $LANG: en_US.UTF-8
> value of $XMODIFIERS: nil
> locale-coding-system: utf-8-unix
> default enable-multibyte-characters: t
>
> Major mode: Fundamental
>
> Minor modes in effect:
> tooltip-mode: t
> mouse-wheel-mode: t
> tool-bar-mode: t
> menu-bar-mode: t
> file-name-shadow-mode: t
> global-font-lock-mode: t
> font-lock-mode: t
> blink-cursor-mode: t
> auto-encryption-mode: t
> auto-compression-m...

Read more...

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 30.11.2011 15:17, schrieb Ricopan:
> Hi Andreas,
>
> Sure. Need to learn some other solution for debugging multiprocessing
> anyway.
>
> Thanks much for all your work on python-mode. I took it for granted for
> many years, then recently tried other python IDE's (eg Eclipse), but keep
> coming back. Maybe time for me to learn a little emacs lisp.
>
> Rich
>

Hi,

think we should get it working.

Committed some changes which should make work pdb again from py-execute-...

Pdb then still refers to a temporary file instead of the original, but
that's to change in a next step.

Would be helpful if you could tell, if pdb itself now sends the message
as expected.

Andreas

Revision history for this message
Ricopan (ricopan) wrote :
Download full text (10.7 KiB)

Error message is a different -- truncated, but still fails to sync on pdb
up. Did notice though that the pdb arrow now points to the correct line in
code.

Thanks,
Richard

Attached screenshots.
Latest branch as of 1/2 hour ago.
Using `python-mode' version 6.0.4

bug report:

In GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-04-04 on rothera, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11001000
configured using `configure '--build' 'i686-linux-gnu' '--build'
'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var/lib'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim'
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=i686-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g'
'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Python

Minor modes in effect:
  text-scale-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
C-c ! C-x C-= C-x C-= <down-mouse-1> <mouse-1> C-x
C-= C-x C-= <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-1> C-c C-c <down-mouse-1> <mouse-1> C-x C-=
C-x C-= <down-mouse-1> <mouse-1> s <return> <down-mouse-1>
<mouse-1> C-x C-= C-x C-= <down-mouse-1> <mouse-1>
n <return> n <return> u <return> d <return> <help-echo>
<help-echo> <help-echo> <help-echo> <down-mouse-1>
<mouse-1> M-x r e p o r t - <tab> <return>

Recent messages:
pdbtrack: line 3, file /home/richard/pdb_bug/test_import.py
pdbtrack: Not found: 3(), >
pdbtrack: line 3, file /home/richard/pdb_bug/test_import.py
pdbtrack: Not found: 3(), >
pdbtrack: line 4, file /home/richard/pdb_bug/test_import.py
pdbtrack: Not found: 4(), >
pdbtrack: Not found: <module>(), /tmp/Python18192K_m.py
pdbtrack: Not found: 10(), >
pdbtrack: line 4, file /home/richard/pdb_bug/test_import.py
pdbtrack: Not found: 4(), >

Load-path shadows:
/usr/share/emacs/23.2/site-lisp/debian-startup hides
/usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides
/usr/share/emacs/23.2/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides
/usr/share/emacs/23.2/lisp/textmodes/ispell

Features:
(shadow sort mail-extr message sendmail ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util n...

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 30.11.2011 19:14, schrieb Ricopan:
> Error message is a different -- truncated, but still fails to sync on pdb
> up. Did notice though that the pdb arrow now points to the correct line in
> code.
>

should got it now basically.
Please try

M-x py-execute-import-or-reload

some minor bugs remain around
   pdb-shell starts with a
   wrong error message - pdbtrack: Traceback cue not found
   please ignore, pdbtrack should work afterwards

[ ... ]
> Thanks,
> Richard
>

Thanks being patient :)

Andreas

Revision history for this message
Ricopan (ricopan) wrote :
Download full text (11.2 KiB)

When I use my habitual python-mode command 'execute-buffer', now pdb up now
syncs to the temp file successfully, which should work for me. Thanks for
that!

However, when I use py-execute-import-or-reload (I am unfamiliar with this
command) as you asked, I get:

Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> ## executing temporary file /tmp/Python8156q05.py...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/Python8156q05.py", line 10, in <module>
    import test1
ImportError: No module named test1
>>>

emacs-bug-report

In GNU Emacs 23.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-04-04 on rothera, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11001000
configured using `configure '--build' 'i686-linux-gnu' '--build'
'i686-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var/lib'
'--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim'
'--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars'
'build_alias=i686-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g'
'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Comint

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x p y - e x e <tab> u t e <tab> i m <tab> <return>
<help-echo> <down-mouse-1> <mouse-movement> <mouse-movement>
<drag-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1>
<mouse-movement> <mouse-movement> <mouse-movement>
<mouse-movement> <mouse-movement> <mouse-movement>
<drag-mouse-1> <help-echo> <help-echo> <help-echo>
<help-echo> <menu-bar> <edit> <copy> <help-echo> M-x
e m a c s - b u <tab> g <tab> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> b u g <tab> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> r e p <tab> o r <tab> <ret
urn>

Recent messages:
Loading debian-ispell...
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el
(source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el
(source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Note: file is writ...

Revision history for this message
Andreas Roehler (a-roehler) wrote :

Am 01.12.2011 16:34, schrieb Ricopan:
> When I use my habitual python-mode command 'execute-buffer', now pdb up now
> syncs to the temp file successfully, which should work for me. Thanks for
> that!
>
> However, when I use py-execute-import-or-reload (I am unfamiliar with this
> command) as you asked, I get:
>
> Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24)
> [GCC 4.5.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> ## executing temporary file /tmp/Python8156q05.py...
> Traceback (most recent call last):
> File "<stdin>", line 1, in<module>
> File "/tmp/Python8156q05.py", line 10, in<module>
> import test1
> ImportError: No module named test1
>

probably because your test1.py is not in the Python-path.

are two different proceedings - execute buffer or execute file.

The first writes a temporary file and executes it - therefor you have
seen that temp-buffer.

The backside of this proceeding - if the temp-file is executed, pdb will
point to it.

So made the original file being executed with pdb - it must be in the
path then.

At least that are my conclusions for the moment :)

stay tuned,

Andreas

Changed in python-mode:
status: New → In Progress
Changed in python-mode:
status: In Progress → Fix Committed
Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.