Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get wrong line (16) when setting a breakpoint at line 29 #43

Open
jfongattw opened this issue Dec 21, 2022 · 1 comment
Open

Get wrong line (16) when setting a breakpoint at line 29 #43

jfongattw opened this issue Dec 21, 2022 · 1 comment

Comments

@jfongattw
Copy link

It runs under Python 3.8 and Windows 8.1 x64. Although it's running a previous version here, but the same result in ver 2.0.0.1 too.
The followings are the result of after adding print() in the function CalcScopeLine() to show what errors I had got:

def CalcScopeLine(self, lineno):
    print(lineno)
    rvl = copy.copy(self.m_valid_lines)  # m_valid_lines has strange result
    rvl.reverse()
    print(rvl)

    for l in rvl:  # JF@21DEC2022, this will cause a correct lineno (29) changes to an incorrect l (16)?
        if lineno >= l:
            break
    return l

-----the main window
e:\Works\Python\ttkwidgets-master\examples>py ....\rpdb2.py example_calendar.py
....\rpdb2.py:296: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's
documentation for alternative uses
import imp
RPDB2 - The Remote Python Debugger, version RPDB_2_5_0,
Copyright (C) 2005-2009 Nir Aides, 2013-2017 Philippe Fremy
Type "help", "copyright", "license", "credits" for more information.

*** Password has been set to a random password.
*** Starting debuggee...
*** Attaching to debuggee...
*** Debug Channel is NOT encrypted.
*** Successfully attached to
*** 'e:\works\python\ttkwidgets-master\examples\example_calendar.py'.
*** Debuggee is waiting at break point for further commands.
bl
List of breakpoints:

Id State Line Filename-Scope-Condition-Encoding

bp 29

bl
List of breakpoints:

Id State Line Filename-Scope-Condition-Encoding

0 enabled 16 ...\examples\example_calendar.py

list
Source lines for thread 111776 from file 'e:\works\python\ttkwidgets-master\examples\example_calendar.py':

      1  # -*- coding: utf-8 -*-
      2
      3  # Copyright (c) Juliette Monsel 2018
      4  # For license see LICENSE
      5

C> 6 from ttkwidgets import Calendar
7 import tkinter as tk
8
9 def validate():
10 sel = calendar.selection
11 if sel is not None:
12 label.configure(text='Selected date: %s' % sel.st...
13
14 window = tk.Tk()
15 calendar = Calendar(window, year=2022, month=10, selectfo...
B 16 selectbackground='red')
17 calendar.pack()
18
19 tk.Button(window, text='Select', command=validate).pack()
20 label = tk.Label(window, text='Selected date:')


-----the other window
e:\Works\Python\rpdb2.py:296: DeprecationWarning: the imp module is deprecated in favour of importlib; see the
module's documentation for alternative uses
import imp
6
[285, 284, 277, 276, 275, 273, 271, 16, 15, 14, 9, 7, 6]
29
[285, 284, 277, 276, 275, 273, 271, 16, 15, 14, 9, 7, 6]

The example_calendar.py file has only 30 lines long. What is the line 271 and aboves?
and line 29 is missing obviously

@jfongattw
Copy link
Author

Run it under Python 3.4 and this error is gone!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant