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

beginner question #14

Closed
anentropic opened this issue Nov 22, 2011 · 10 comments
Closed

beginner question #14

anentropic opened this issue Nov 22, 2011 · 10 comments

Comments

@anentropic
Copy link

I just installed ipdb and I get weird output like this, what am I doing wrong?

I'm on Win 7, Python 2.6 running in a bash shell. IPython itself works fine though.

←[1;32m 12 ←[1;33m ←[1;32mimport←[0m ←[1;37mipdb←[0m←[1;33m;←[0m ←[1;37mipdb←[0m←[1;33m.←[0m←[1;37mset_trace←[0m←[1;33m(←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[0m←[1;32m---> 13 ←[1;33m ←[1;37msuper←[0m←[1;33m(←[0m←[1;37mCheckoutApp←[0m←[1;33m,←[0m ←[1;37mself←[0m←[1;33m)←[0m←[1;33m.←[0m←[1;37mprepare_order←[0m←[1;33m(←[0m←[1;37mrequest←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[0m←[1;32m 14 ←[1;33m←[1;33m←[0m←[0m ←[0m ipdb> p self.order_model <class 'satchless.order.models.Order'> ipdb> l ←[0;32m 8 ←[0m ←[1;37mcart_model←[0m ←[1;33m=←[0m ←[1;37mcart_models←[0m←[1;33m.←[0m←[1;37mCart←[0m←[1;33m←[0m←[0m ←[0;32m 9 ←[0m ←[1;37morder_model←[0m ←[1;33m=←[0m ←[1;37morder_models←[0m←[1;33m.←[0m←[1;37mOrder←[0m←[1;33m←[0m←[0m ←[0;32m 10 ←[0m←[1;33m←[0m←[0m ←[0;32m 11 ←[0m ←[1;32mdef←[0m ←[1;37mprepare_order←[0m←[1;33m(←[0m←[1;37mself←[0m←[1;33m,←[0m ←[1;37mrequest←[0m←[1;33m)←[0m←[1;33m:←[0m←[1;33m←[0m←[0m ←[0;32m 12 ←[0m ←[1;32mimport←[0m ←[1;37mipdb←[0m←[1;33m;←[0m ←[1;37mipdb←[0m←[1;33m.←[0m←[1;37mset_trace←[0m←[1;33m(←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[1;32m---> 13 ←[1;33m ←[1;37msuper←[0m←[1;33m(←[0m←[1;37mCheckoutApp←[0m←[1;33m,←[0m ←[1;37mself←[0m←[1;33m)←[0m←[1;33m.←[0m←[1;37mprepare_order←[0m←[1;33m(←[0m←[1;37mrequest←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[0m←[0;32m 14 ←[0m←[1;33m←[0m←[0m ←[0;32m 15 ←[0m←[1;33m←[0m←[0m ←[0;32m 16 ←[0m←[1;37mcheckout_app←[0m ←[1;33m=←[0m ←[1;37mCheckoutApp←[0m←[1;33m(←[0m←[1;33m)←[0m←[1;33m←[0m←[0m

@rabio
Copy link

rabio commented Nov 22, 2011

You are running ipdb in terminal that do not understand escape sequences.

@anentropic
Copy link
Author

ok, thanks very much that sounds like the problem.

interestingly though, IPython itself works fine with colour coding etc in the same terminal+shell combination (Console2+git-bash)... the IPython colour-coding uses ansi escape codes I guess?

I wonder if they're getting double-escaped or something...

@gotcha
Copy link
Owner

gotcha commented Nov 23, 2011

Le 22/11/11 17:57, anentropic a écrit :

I just installed ipdb and I get weird output like this, what am I doing wrong?

←[1;32m 12 ←[1;33m ←[1;32mimport←[0m ←[1;37mipdb←[0m←[1;33m;←[0m ←[1;37mipdb←[0m←[1;33m.←[0m←[1;37mset_trace←[0m←[1;33m(←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[0m←[1;32m---> 13 ←[1;33m ←[1;37msuper←[0m←[1;33m(←[0m←[1;37mCheckoutApp←[0m←[1;33m,←[0m ←[1;37mself←[0m←[1;33m)←[0m←[1;33m.←[0m←[1;37mprepare_order←[0m←[1;33m(←[0m←[1;37mrequest←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[0m←[1;32m 14 ←[1;33m←[1;33m←[0m←[0m ←[0m ipdb> p self.order_model <class 'satchless.order.models.Order'> ipdb> l ←[0;32m 8 ←[0m ←[1;37mcart_model←[0m ←[1;33m=←[0m ←[1;37mcart_models←[0m←[1;33m.←[0m←[1;37mCart←[0m←[1;33m←[0m←[0m ←[0;32m 9 ←[0m ←[1;37morder_model←[0m ←[1;33m=←[0m ←[1;37morder_models←[0m←[1;33m.←[0m←[1;37mOrder←[0m←[1;33m←[0m←[0m ←[0;32m 10 ←[0m←[1;33m←[0m←[0m ←[0;32m 11 ←[0m ←[1;32mdef←[0m ←[1;37mprepare_order←[0m←[1;33m(←[0m←[1;37mself←[0m←[1;33m,←[0m ←[1;37mrequest←[0m←[1;33m)←[0m←[1;33m:←[0m←[1;33m←[0m←[0m ←[0;32m 12 ←[0m ←[1;32mimport←[0m ←[1;37mipdb←[0m←[1;33m;←[0m ←[1;37mipdb←[0m←[1;33m.←[0m←[1;37mset_trace←[0m←[1;33m(←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[1;32m---> 13 ←[1;33m ←[1;37msuper←[0m←[1;33m(←[0m←[1;37mCheckoutApp←[0m←[1;33m,←[0m ←[1;37mself←[0m←[1;33m)←[0m←[1;33m.←[0m←[1;37mprepare_order←[0m←[1;33m(←[0m←[1;37mrequest←[0m←[1;33m)←[0m←[1;33m←[0m←[0m ←[0m←[0;32m 14 ←[0m←[1;33m←[0m←[0m ←[0;32m 15 ←[0m←[1;33m←[0m←[0m ←[0;32m 16 ←[0m←[1;37mcheckout_app←[0m ←[1;33m=←[0m ←[1;37mCheckoutApp←[0m←[1;33m(←[0m←[1;33m)←[0m←[1;33m←[0m←[0m

I guess there is an issue with the way IPython interacts with your terminal.

Have you tried IPython interpreter alone ? Does it work for you ?

Godefroid Chapelle (aka __gotcha) http://bubblenet.be

@anentropic
Copy link
Author

@gotcha... see above, ipython works fine in the terminal+shell combination I'm using (Console2+git-bash), it's only in ipdb I see the problem.

@gotcha
Copy link
Owner

gotcha commented Nov 23, 2011

Then I guess it is Windows related. I must say I did not test ipdb under Windows recently. I'll look at this when I find some time.

@gotcha
Copy link
Owner

gotcha commented Jul 6, 2012

Which versions did you use ?

Python, Ipython and ipdb

@rafaelolg
Copy link

Same here. Windows 7, Python 2.6.5, ipython 0.13 ipddb 0.7

The bug only happens when a second trace is activated after the first:

import ipdb;ipdb.set_trace()
import ipdb;ipdb.set_trace()

press 'c' for the first and then the bug happens.

@dusans
Copy link

dusans commented Jul 15, 2013

Console2 unfortunately also breaks ipdb autocomplete.

@gotcha
Copy link
Owner

gotcha commented Dec 22, 2014

I do not have access to Console2.
Won't fix for now

@gotcha gotcha closed this as completed Dec 22, 2014
@dusans
Copy link

dusans commented Dec 24, 2014

Note: i now use ConEmu. Works perfectly with ipdb.
https://code.google.com/p/conemu-maximus5/

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

5 participants