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

An error occurs when exiting (BdbQuit) #506

Open
brucmao opened this issue Sep 27, 2022 · 2 comments
Open

An error occurs when exiting (BdbQuit) #506

brucmao opened this issue Sep 27, 2022 · 2 comments

Comments

@brucmao
Copy link

brucmao commented Sep 27, 2022

I update pyreadline to pyreadline3 with following command

pip install --upgrade https://github.com/pyreadline3/pyreadline3/tarball/master

Now,it works in windows with python3.10,but it raise a error when i use q to quit

image

window terminal,powershell7.2.6,python3.10.4

@blueyed
Copy link
Collaborator

blueyed commented Oct 25, 2022

Can you reproduce it with a smaller example?

In general, BdbQuit is what is used to quit pdb/bdb, and it might be shown although it should not.

@blueyed blueyed changed the title An error occurs when exiting An error occurs when exiting (BdbQuit) Oct 25, 2022
@brucmao
Copy link
Author

brucmao commented Oct 26, 2022

this is my code in quiz.py

import pdb

a = 5
b = 10

pdb.set_trace()

c = a + b

print(c)

There is an error when i test in terminal

❯ python quiz.py
[0] > c:\users\brucm\desktop\quiz.py(8)<module>()
-> c = a + b
(Pdb++) q
Traceback (most recent call last):
  File "C:\Users\brucm\Desktop\quiz.py", line 8, in <module>
    c = a + b
  File "C:\Users\brucm\Desktop\quiz.py", line 8, in <module>
    c = a + b
  File "C:\Users\brucm\scoop\apps\python\current\lib\bdb.py", line 90, in trace_dispatch
    return self.dispatch_line(frame)
  File "C:\Users\brucm\scoop\apps\python\current\lib\bdb.py", line 115, in dispatch_line
    if self.quitting: raise BdbQuit
bdb.BdbQuit

another error when I use run

❯ python quiz.py
[0] > c:\users\brucm\desktop\quiz.py(8)<module>()
-> c = a + b
(Pdb++) run
Traceback (most recent call last):
  File "C:\Users\brucm\Desktop\quiz.py", line 8, in <module>
    c = a + b
  File "C:\Users\brucm\Desktop\quiz.py", line 8, in <module>
    c = a + b
  File "C:\Users\brucm\scoop\apps\python\current\lib\bdb.py", line 90, in trace_dispatch
    return self.dispatch_line(frame)
  File "C:\Users\brucm\scoop\apps\python\current\lib\bdb.py", line 114, in dispatch_line
    self.user_line(frame)
  File "C:\Users\brucm\scoop\apps\python\current\lib\pdb.py", line 262, in user_line
    self.interaction(frame, None)
  File "C:\Users\brucm\scoop\apps\python\current\lib\site-packages\pdb.py", line 231, in interaction
    self._cmdloop()
  File "C:\Users\brucm\scoop\apps\python\current\lib\pdb.py", line 322, in _cmdloop
    self.cmdloop()
  File "C:\Users\brucm\scoop\apps\python\current\lib\cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "C:\Users\brucm\scoop\apps\python\current\lib\pdb.py", line 422, in onecmd
    return cmd.Cmd.onecmd(self, line)
  File "C:\Users\brucm\scoop\apps\python\current\lib\cmd.py", line 217, in onecmd
    return func(arg)
  File "C:\Users\brucm\scoop\apps\python\current\lib\pdb.py", line 1036, in do_run
    raise Restart
pdb.Restart

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

No branches or pull requests

2 participants