Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'string.': 0.04; 'none,': 0.05; 'skip:" 60': 0.05; 'character,': 0.07; 'keys,': 0.07; 'main()': 0.07; 'debugger': 0.09; 'input,': 0.09; 'typeerror:': 0.09; 'python': 0.11; '1))': 0.16; 'fname,': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'received:192.168.1.4': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'wrote:': 0.16; 'string': 0.17; 'skip:" 30': 0.20; 'exec': 0.22; 'keys': 0.22; 'header:In-Reply- To:1': 0.24; '(most': 0.24; 'header:User-Agent:1': 0.26; 'raw': 0.27; "i'm": 0.29; '**kwargs)': 0.29; 'dialog': 0.29; 'guess': 0.29; "i'd": 0.31; 'skip:s 30': 0.31; 'code': 0.31; 'skip:d 20': 0.32; 'skip:_ 10': 0.32; 'received:84': 0.32; 'interaction': 0.33; 'traceback': 0.33; 'file': 0.34; 'to:addr:python-list': 0.35; 'returning': 0.35; 'skip:" 50': 0.35; 'expected': 0.35; 'but': 0.36; 'hi,': 0.37; 'subject:: ': 0.37; 'skip:g 20': 0.37; 'say': 0.38; 'end': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'reached': 0.60; '30,': 0.63; 'f(*args,': 0.84 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.1 cv=cblcrxzM c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=QrohdLjRRo4A:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=xAHt7FsyncScwdIXwTUA:9 a=QEXdDO2ut3YA:10 X-AUTH: mrabarnett@:2500 Date: Thu, 28 May 2015 00:11:11 +0100 From: MRAB User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: PUDB Traceback References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 64 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432768274 news.xs4all.nl 2933 [2001:888:2000:d::a6]:59733 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91332 On 2015-05-27 21:01, Piyush Verma wrote: > Hi, > > I'm facing traceback when using pudb python debugger to debug. Any help > to resolve it. > > # python -m pudb file.py Traceback (most recent call last): > File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main > "__main__", fname, loader, pkg_name) > File "/usr/lib/python2.7/runpy.py", line 72, in _run_code > exec code in run_globals > File "/usr/local/lib/python2.7/dist-packages/pudb/__main__.py", line > 3, in > main() > File "/usr/local/lib/python2.7/dist-packages/pudb/run.py", line 30, > in main > steal_output=options.steal_output) > File "/usr/local/lib/python2.7/dist-packages/pudb/__init__.py", line > 84, in runscript > dbg.interaction(None, sys.exc_info()) > File "/usr/local/lib/python2.7/dist-packages/pudb/debugger.py", line > 338, in interaction > show_exc_dialog=show_exc_dialog) > File "/usr/local/lib/python2.7/dist-packages/pudb/debugger.py", line > 2020, in call_with_ui > return f(*args, **kwargs) > File "/usr/local/lib/python2.7/dist-packages/pudb/debugger.py", line > 2212, in interaction > self.show_exception_dialog(exc_tuple) > File "/usr/local/lib/python2.7/dist-packages/pudb/debugger.py", line > 1966, in show_exception_dialog > ("Save traceback", "save"), > File "/usr/local/lib/python2.7/dist-packages/pudb/debugger.py", line > 1939, in dialog > return self.event_loop(w)[0] > File "/usr/local/lib/python2.7/dist-packages/pudb/debugger.py", line > 2185, in event_loop > keys = self.screen.get_input() > File "/usr/local/lib/python2.7/dist-packages/urwid/raw_display.py", > line 324, in get_input > keys, raw = self.parse_input(None, None, > self.get_available_raw_input()) > File "/usr/local/lib/python2.7/dist-packages/urwid/raw_display.py", > line 426, in get_available_raw_input > codes = self._get_gpm_codes() + self._get_keyboard_codes() > File "/usr/local/lib/python2.7/dist-packages/urwid/raw_display.py", > line 500, in _get_keyboard_codes > code = self._getch_nodelay() > File "/usr/local/lib/python2.7/dist-packages/urwid/raw_display.py", > line 634, in _getch_nodelay > return self._getch(0) > File "/usr/local/lib/python2.7/dist-packages/urwid/raw_display.py", > line 544, in _getch > return ord(os.read(self._term_input_file.fileno(), 1)) > TypeError: ord() expected a character, but string of length 0 found > > Regards, > ~Piyush > > At a guess I'd say it has reached the end of the input, so os.read(...) is returning an empty string.