question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import ipdb causes weird output to stdio

See original GitHub issue
~$ python -c "import IPython; print(IPython.sys_info())"
{'commit_hash': u'5a894b9',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': '/home/bboerner/.local/lib/python2.7/site-packages/IPython',
 'ipython_version': '5.3.0',
 'os_name': 'posix',
 'platform': 'Linux-4.4.0-36-generic-x86_64-with-Ubuntu-14.04-trusty',
 'sys_executable': '/usr/bin/python',
 'sys_platform': 'linux2',
 'sys_version': '2.7.6 (default, Jun 22 2015, 17:58:13) \n[GCC 4.8.2]'}

iPython was previously 4.0.0.

Was on ipdb v0.8.1, upgraded to v0.10.2 and this showed up.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import print_function
import sys, os

import ipdb

print('foo')

Seems to run ok:

$ ./ipdb_bug01.py
foo

But do this instead:

$ ./ipdb_bug01.py > delme

and edit delme and find this:

]0;IPython: sandbox/sandbox]0;IPython: sandbox/sandboxfoo

Note that this does not reproduce when run under screen v4.01.00devel (GNU) 2-May-06.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
nicfitcommented, Jul 30, 2019

@bboerner @nicfit Can you confirm it is fixed by https://pypi.org/project/ipdb/0.12.2/ ?

I verified using method above that garbage.out is now empty with 0.12.2. Thanks @gotcha and @steinnes

0reactions
gotchacommented, Jul 30, 2019

@bboerner @nicfit Can you confirm it is fixed by https://pypi.org/project/ipdb/0.12.2/ ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ipdb no longer works with airflow test command #26352 - GitHub
I just tested ipdb in an airflow task with the following code with the latest Open Source Airflow 2.4.0, and it does not...
Read more >
ipdb / set_trace() bug on Windows? - python - Stack Overflow
I am getting a really strange output when running a python script and setting a break point with ipdb as in this program:...
Read more >
Guide to Python Debugging | Hacker News
This is a bit of a weird article. It spends most of the time talking about logging, which is somewhat useful for debugging...
Read more >
Release 7.25.0 The IPython Development Team
Fixed PyQt 5.11 backwards incompatibility causing sip import failure. ... Consecutive stream (stdout/stderr) output is merged into a single ...
Read more >
Top 5 ipdb Code Examples - Snyk
To help you get started, we've selected a few ipdb examples, based on popular ways it is used in public projects. Secure your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found