Bug 196842 - Debugger does not want to start (spaces in path)
Debugger does not want to start (spaces in path)
Status: NEW
Product: python
Classification: Unclassified
Component: Debugger
8.1
All All
: P3 with 1 vote (vote)
: 8.1
Assigned To: Lou Dasaro
issues@python
: SPACE_IN_PATH
: 171724 173501 175116 175200 186827 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-18 10:54 UTC by Tabs
Modified: 2015-05-25 02:54 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
logfile jpydbg.log (4.02 KB, application/octet-stream)
2011-03-31 13:28 UTC, kenorb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tabs 2011-03-18 10:54:14 UTC
When trying to debug my python script (which does not report any exception during normal run) I got the following error:

[LOG]PythonDebugger : overall Starting
[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ...
[LOG]This window is an interactive debugging context aware Python Shell 
[LOG]where you can enter python console commands while debugging 
c:\users\MyName\.netbeans\6.9\config\nbpython\debug\nbpythondebug\jpydaemon.py
args =  ['C:\\Users\\MyName\\.netbeans\\6.9\\config\\nbPython\\debug\\nbpythondebug\\jpydaemon.py', 'localhost', '29100']
localDebuggee= None
JPyDbg connecting  localhost  on in=  29100 /out= 29101
JPyDbgI0001 : connected to  localhost
Exception in thread MainThread:
Traceback (most recent call last):
  File "C:\Coding\Python26\lib\threading.py", line 532, in __bootstrap_inner
    self.run()
  File "C:\Users\MyName\.netbeans\6.9\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 593, in run
    exec self._cmd in self._myglobals,self._mylocals
  File "<string>", line 1, in <module>
  File "C:/Users/MyName/My Dropbox/Work/Codes/Python/EmoPlay/src/sigphysio.py", line 4, in <module>
    __author__="MyName"
  File "C:/Users/MyName/My Dropbox/Work/Codes/Python/EmoPlay/src/sigphysio.py", line 4, in <module>
    __author__="MyName"
  File "C:\Users\MyName\.netbeans\6.9\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 727, in trace_dispatch
    self.dispatchLineAndBreak(mainDebugger, frame , lthread )
  File "C:\Users\MyName\.netbeans\6.9\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 607, in dispatchLineAndBreak
    lthread.additionalInfo.breakHere(frame,lthread)
  File "C:\Users\MyName\.netbeans\6.9\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 813, in breakHere
    while ( self.dbg.parseSubCommand(  self.dbg._connection.getNextDebuggerCommand() , frame , lthread ) == FREEZE ):
  File "C:\Users\MyName\.netbeans\6.9\config\nbPython\debug\nbpythondebug\jpydaemon.py", line 1455, in parseSubCommand
    hits = int(hits)
ValueError: invalid literal for int() with base 10: ''

Debug session normal end

I tried to change the debugger listening starting port without success. It seems to be better when I use a very high port like 300001. However it not not stop at the first line or any breakpoint and seems to be idle in that case (not possible to stop the debugging process with the stop button). Following the precedent reports on similar errors I tried to debug a project in a path without spaces. This did not change anything. Commenting the __author__ line did not change anything either.

Any help welcome !

Tabs
Comment 1 Tabs 2011-03-21 07:48:48 UTC
I just noticed that this occurs only if there is a break point set in the code, or if a breakpoint is set when debugging (in this case the error occurs as soon as the breakpoint is set). Otherwise the debugger is working perfectly.
Comment 2 kenorb 2011-03-31 10:50:13 UTC
The same problem on Mac.

>>>[LOG]PythonDebugger : overall Starting
[LOG]PythonDebugger.taskStarted : I am Starting a new Debugging Session ...
[LOG]This window is an interactive debugging context aware Python Shell 
[LOG]where you can enter python console commands while debugging 
Exception in thread MainThread:
Traceback (most recent call last):
/Users/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py
args =  ['/Users/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py', 'localhost', '29100']
localDebuggee= None
JPyDbg connecting  localhost  on in=  29100 /out= 29101
JPyDbgI0001 : connected to  localhost
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/threading.py", line 522, in __bootstrap_inner
    self.run()
  File "/Users/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 593, in run
    exec self._cmd in self._myglobals,self._mylocals
  File "<string>", line 1, in <module>
  File "/Volumes/Users HD/rwieczor/Sites/ants/aichallenge/ants/playgame.py", line 3, in <module>
    import sys
  File "/Volumes/Users HD/rwieczor/Sites/ants/aichallenge/ants/playgame.py", line 3, in <module>
    import sys
  File "/Users/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 727, in trace_dispatch
    self.dispatchLineAndBreak(mainDebugger, frame , lthread )
  File "/Users/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 607, in dispatchLineAndBreak
    lthread.additionalInfo.breakHere(frame,lthread)
  File "/Users/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 813, in breakHere
    while ( self.dbg.parseSubCommand(  self.dbg._connection.getNextDebuggerCommand() , frame , lthread ) == FREEZE ):
  File "/Users/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydaemon.py", line 1455, in parseSubCommand
    hits = int(hits)
ValueError: invalid literal for int() with base 10: ''

Debug session normal end

Debugging works with default behavior (auto-break on 1st line of code), but if I want to continue to Cursor, or I'll set any custom breakpoint, it throw above error.
NetBeans 6.9.1
Python 2.6.1
Comment 3 kenorb 2011-03-31 10:55:04 UTC
*** Bug 175116 has been marked as a duplicate of this bug. ***
Comment 4 kenorb 2011-03-31 10:57:20 UTC
*** Bug 171724 has been marked as a duplicate of this bug. ***
Comment 5 kenorb 2011-03-31 11:14:06 UTC
*** Bug 186827 has been marked as a duplicate of this bug. ***
Comment 6 kenorb 2011-03-31 11:14:53 UTC
*** Bug 173501 has been marked as a duplicate of this bug. ***
Comment 7 kenorb 2011-03-31 11:15:16 UTC
*** Bug 175200 has been marked as a duplicate of this bug. ***
Comment 8 kenorb 2011-03-31 11:15:54 UTC
*** Bug 170078 has been marked as a duplicate of this bug. ***
Comment 9 Tabs 2011-03-31 11:40:00 UTC
Thanks to kenorb I noticed I forgot to give the basics:
Windows 7 version 6.1 running on x86; Cp1252; fr_CH (nb)
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
NetBeans IDE 6.9.1 (Build 201011082200)
Java: 1.6.0_24; Java HotSpot(TM) Client VM 19.1-b02
Comment 10 kenorb 2011-03-31 11:45:34 UTC
Try:
$ touch "~/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydbg.log"
Run again.
And show this file.

Mine is:

$ tail "/Volumes/Users HD/rwieczor/.netbeans/6.9/config/nbPython/debug/nbpythondebug/jpydbg.log"
not CONTINUE
before STEP(None) or DEBUG(31)
STEP reached
populateToClient --> <JPY> <LINE cmd="31" fn="/Volumes/Users HD/rwieczor/Sites/ants/playgame.py" lineno="2" name="&lt;module&gt;" line="import traceback" /></JPY>

sent --> <JPY> <LINE cmd="31" fn="/Volumes/Users HD/rwieczor/Sites/ants/playgame.py" lineno="2" name="&lt;module&gt;" line="import traceback" /></JPY>

THREAD Dispatch before checkdbgAction
<-- DBG CMD = BP+ /Volumes/Users HD/rwieczor/Sites/ants/aichallenge/ants/my_file.py 107 0 '' 
BP+=/Volumes/Users HD/rwieczor/Sites/ants/aichallenge/ants/my_file.py 107 0 ''
Comment 11 kenorb 2011-03-31 13:28:29 UTC
Created attachment 107404 [details]
logfile jpydbg.log
Comment 12 kenorb 2011-03-31 13:42:04 UTC
*** Bug 175116 has been marked as a duplicate of this bug. ***
Comment 13 kenorb 2011-03-31 13:46:33 UTC
I wanted to debug the script, I spend my time by debugging NetBeans, F*!

Basically the problem is with spaces.

This is the command:
<-- DBG CMD = BP+ /Volumes/Users HD/rwieczor/Sites/bla/bla/bla/bla.py 107 0 '' 

This is how arguments are parsed:
            _DEBUG( 'BP+=%s' %(arg))
            file , optarg = _utils.nextArg(arg)
            line ,optarg= _utils.nextArg(optarg)
            temp , optarg = _utils.nextArg(optarg)
            condition , optarg = _utils.nextArg(optarg)
            hits , optarg = _utils.nextArg(optarg)
            hitsStyle , optarg = _utils.nextArg(optarg)
...

    def nextArg( self , toParse ):
        """ get next arg back on command buffer """
        if toParse == None :
            return None , None
        toParse = string.strip(toParse)
        separator = " "
...

In this case my line is: HD/rwieczor/Sites/bla/bla/bla/bla.py
temp is: 107
condition is 0
and hits is empty string

Please FIX it.
Most of the Mac users has spaces in their path.
Comment 14 kenorb 2011-03-31 14:13:05 UTC
Try some workaround:
$ sudo ln -s "/Volumes/Users HD/rwieczor" /Volumes/Users
And somehow change Project Path or create new one using path without spaces.
Comment 15 moconnell 2014-07-16 13:00:08 UTC
Still affects Netbeans 8 on win 8 64-Bit.
My Project py file was in a project folder that's leaf folder name had a space in it. Removing this fixed it.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo