List Info

Thread: eric 4.1.1 interactive python console problem




eric 4.1.1 interactive python console problem
country flaguser name
Poland
2008-03-04 16:58:29
Hello. I've just upgrade after reinstall my PyQT to new Eric
4.1.1.

Unfortunately, just after start I got in my log viewer:

Traceback (most recent call last):
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClient.py", 
line 38, in <module>
     debugClient.main()
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 1897, in main
     self.connectDebugger(port, remoteAddress, redirect)
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 980, in connectDebugger
     sock.connect((DebugAddress,port))
   File "<string>", line 1, in connect
socket.error: (10061, 'Connection refused')
Traceback (most recent call last):
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClient.py", 
line 38, in <module>
     debugClient.main()
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 1897, in main
     self.connectDebugger(port, remoteAddress, redirect)
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 980, in connectDebugger
     sock.connect((DebugAddress,port))
   File "<string>", line 1, in connect
socket.error: (10061, 'Connection refused')


And another in python shell:

StdErr: Traceback (most recent call last):
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClient.py", 
line 38, in <module>
     debugClient.main()
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 1897, in main
     self.connectDebugger(port, remoteAddress, redirect)
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 980, in connectDebugger
     sock.connect((DebugAddress,port))
   File "<string>", line 1, in connect
socket.error: (10061, 'Connection refused')
StdErr: Traceback (most recent call last):
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClient.py", 
line 38, in <module>
     debugClient.main()
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 1897, in main
     self.connectDebugger(port, remoteAddress, redirect)
   File 
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
line 980, in connectDebugger
     sock.connect((DebugAddress,port))
   File "<string>", line 1, in connect
socket.error: (10061, 'Connection refused')



The main problem is that actually I haven't any working
python shell in 
Eric4.

Before reinstall i had the same problem...

Cheers,

bluszcz
_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: eric 4.1.1 interactive python console problem
country flaguser name
Finland
2008-03-05 00:31:57
Hi,

Rafa³ Zawadzki wrote:
> Hello. I've just upgrade after reinstall my PyQT to new
Eric 4.1.1.

>
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.py", 
> line 980, in connectDebugger
>     sock.connect((DebugAddress,port))
>   File "<string>", line 1, in connect
> socket.error: (10061, 'Connection refused')
> 
> 
This is the real error. The debug-client wants to connect
via a TCP-socket to the
DebugServer.
The reasons could be that

* the DebugServer is not runnning at all
* some firewall-stuff prevents you from opening local
sockets
* the DebugServer is listening on a different port

> 
> The main problem is that actually I haven't any working
python shell in 
> Eric4.
> 
> Before reinstall i had the same problem...
> 
Hmm,
I don't know windows, but you can try to see if there are
any
open TCP connections from "localhost" to
"localhost" ?
A quick googling pointed me to "TCPView"
http://technet.microsoft.com/en-us/sysinternals/bb8
97437.aspx
which might help.

Cheers,

T/Christof




_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: eric 4.1.1 interactive python console problem
user name
2008-03-06 12:25:38
On Mittwoch, 5. März 2008, Christof Hanke wrote:
> Hi,
>
> Rafa³ Zawadzki wrote:
> > Hello. I've just upgrade after reinstall my PyQT
to new Eric 4.1.1.
> >
> >
"c:Python25Libsite-packageseric4DebugClientsPytho
nDebugClientBase.
> >py", line 980, in connectDebugger
> >     sock.connect((DebugAddress,port))
> >   File "<string>", line 1, in
connect
> > socket.error: (10061, 'Connection refused')
>
> This is the real error. The debug-client wants to
connect via a TCP-socket
> to the DebugServer.
> The reasons could be that
>
> * the DebugServer is not runnning at all

If the IDE is running, the debug server is running as well.

> * some firewall-stuff prevents you from opening local
sockets

That is the most probable error. Please open the
configuration dialog and 
select an appropriate interface to listen on. If just
loopback is selected 
(127.0.0.1), the firewall will not interfere (as far as I
know). If a real 
network card is used, the firewall might disallow.

Another possible problem could be, if you haven't allowed
localhost to connect 
to the server.

However, this functionality hasn't been changed and is there
since 4.0.0.

> * the DebugServer is listening on a different port

That cannot happen because the debug server is handing it's
port to the debug 
client at startup of the client.

>
> > The main problem is that actually I haven't any
working python shell in
> > Eric4.
> >
> > Before reinstall i had the same problem...
>
> Hmm,
> I don't know windows, but you can try to see if there
are any
> open TCP connections from "localhost" to
"localhost" ?
> A quick googling pointed me to "TCPView"
> http://technet.microsoft.com/en-us/sysinternals/bb8
97437.aspx
> which might help.
>
> Cheers,
>
> T/Christof
>


Regards,
Detlev
-- 
Detlev Offenbach
detlevdie-offenbachs.de

_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: eric 4.1.1 interactive python console problem
country flaguser name
United States
2008-04-09 16:57:17
I am having the same socket error (see traceback below) on
my recent
installation of Eric4 on Windows Vista upon launching. In
the configuration
panel: Debugger > General (Part 1), I have selected:

Only selected network interface: 127.0.0.1
Passive Debugger is unchecked
Remote Debugger is unchecked

Nothing is checked on the General (Part 2) configuration
page.

The problem does not seem to be the firewall since I
deactivated the firewall
and launched Eric4 and have the same error message.

Does anyone have an idea what the problem might be?

Here's the traceback:

Traceback (most recent call last):
  File
"C:appsPythonLibsite-packageseric4DebugClientsPy
thon
DebugClientThreads.py",line 194, in ?
    debugClient.main()
  File
"C:appsPythonLibsite-packageseric4DebugClientsPy
thonDebugClientBase.py",
line 1899, in main
    self.connectDebugger(port, remoteAddress, redirect)
  File
"C:appsPythonLibsite-packageseric4DebugClientsPy
thonDebugClientBase.py",
line 980, in connectDebugger
    sock.connect((DebugAddress,port))
  File "<string>", line 1, in connect
socket.error: (10061, 'Connection refused')

Thanks,

Melissa


_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: eric 4.1.1 interactive python console problem
country flaguser name
United States
2008-04-12 03:04:41
Detlev Offenbach <detlev...> writes:

> 
> On Mittwoch, 9. April 2008, Melissa wrote:
> > I am having the same socket error (see traceback
below) on my recent
> > installation of Eric4 on Windows Vista upon
launching. In the configuration
> > panel: Debugger > General (Part 1), I have
selected:
> >
> > Only selected network interface: 127.0.0.1
> > Passive Debugger is unchecked
> > Remote Debugger is unchecked
> >
> > Nothing is checked on the General (Part 2)
configuration page.
> >
> > The problem does not seem to be the firewall since
I deactivated the
> > firewall and launched Eric4 and have the same
error message.
>
> Please check the settings of your firewall. Maybe it is
too prohibitive. 
> Except from this I have no idea. Unfortunately I cannot
test on Windows 
> Vista. Maybe somebody else can help out.
> 
> Regards,
> Detlev

I turned the firewall off and still have this error. I'm
only using the loopback
anyway, not connecting remotely. I've got MySQL installed as
well and don't have
any trouble opening the database on localhost. 

The shell is essentially disabled by this error. I can hit
return and it goes to
a new line, but no prompt and I can't type anything in.  

Can anyone give me another clue as to a diagnostic I could
do to better pinpoint
the problem? 


Another thing I tried is turning passive debugger on and
that did not go well. I
got this unhandled exception when I hit return in the shell
window: 

------------------------------------------------------------
--------------------
2008-04-12, 00:13:13
------------------------------------------------------------
--------------------
exceptions.AttributeError: 
'NoneType' object has no attribute 'remoteStatement'
------------------------------------------------------------
--------------------
  File
"C:appsPythonLibsite-packageseric4ViewManagerVie
wManager.py", line
4308, in __editorCommand
    e4App().getObject("Shell").editorCommand(cmd)
  File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line 613,
in editorCommand
    self.supportedEditorCommands[cmd](cmd)
  File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line 761,
in __QScintillaNewline
    self.__executeCommand(buf)
  File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line 1007,
in __executeCommand
    self.dbs.remoteStatement(cmd)
  File
"C:appsPythonLibsite-packageseric4DebuggerDebugS
erver.py", line
690, in remoteStatement
    self.debuggerInterface.remoteStatement(stmt)

------------------------------------------------------------
--------------------
Version Numbers:
  Python 2.4.5
  Qt 4.3.3
  PyQt4 4.3.3
  sip 4.7.4
  QScintilla 2.2
  eric4 4.1.2 (r2105)

Platform: win32
2.4.5 (#71, Mar 26 2008, 17:55:58) [MSC v.1310 32 bit
(Intel)]
------------------------------------------------------------
--------------------

I'm using PythonWin with no problem* and I've tested Qt and
PyQt with no problem
so far. 

*I'd like to switch to Eric from PythonWin since Eric looks
much better and I
can't debug gui code in PythonWin. Other than that PythonWin
is working fine.

I can connect to a MySQL database with test code in C++/Qt
or python/PyQt and I
can pop up label widgets and stuff. So it would appear that
Qt and PyQt are
basically working. The Eric editor window seems to work
fine, so I suppose
QScintilla is working. I tried some of the networking demos
that come with Qt.
The loopback demo worked fine, as did the fortune
client/server pair (using a
port) but the secure socket client crashed (OS put up a
message saying it had
stopped working and would be shut down - typical Vista
behavior). But the
fortune client server worked on port 50765 or some such,
with no complaint from
the firewall (which I have subsequently turned on again).
Does that narrow it
down at all?

Does anyone have relevant test code that might be helpful
here in isolating the
problem? Or ideas of things to look at?

Thanks,

-Melissa




_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: Re: eric 4.1.1 interactive python console problem
user name
2008-04-11 12:16:20
On Mittwoch, 9. April 2008, Melissa wrote:
> I am having the same socket error (see traceback below)
on my recent
> installation of Eric4 on Windows Vista upon launching.
In the configuration
> panel: Debugger > General (Part 1), I have
selected:
>
> Only selected network interface: 127.0.0.1
> Passive Debugger is unchecked
> Remote Debugger is unchecked
>
> Nothing is checked on the General (Part 2)
configuration page.
>
> The problem does not seem to be the firewall since I
deactivated the
> firewall and launched Eric4 and have the same error
message.
>
> Does anyone have an idea what the problem might be?
>
> Here's the traceback:
>
> Traceback (most recent call last):
>   File
>
"C:appsPythonLibsite-packageseric4DebugClientsPy
thon
> DebugClientThreads.py",line 194, in ?
>     debugClient.main()
>   File
>
"C:appsPythonLibsite-packageseric4DebugClientsPy
thonDebugClientBase
>.py", line 1899, in main
>     self.connectDebugger(port, remoteAddress,
redirect)
>   File
>
"C:appsPythonLibsite-packageseric4DebugClientsPy
thonDebugClientBase
>.py", line 980, in connectDebugger
>     sock.connect((DebugAddress,port))
>   File "<string>", line 1, in connect
> socket.error: (10061, 'Connection refused')
>
> Thanks,
>
> Melissa
>
>
> _______________________________________________
> Eric mailing list
> Ericriverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric

Please check the settings of your firewall. Maybe it is too
prohibitive. 
Except from this I have no idea. Unfortunately I cannot test
on Windows 
Vista. Maybe somebody else can help out.

Regards,
Detlev
-- 
Detlev Offenbach
detlevdie-offenbachs.de
_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: Re: eric 4.1.1 interactive python console problem
user name
2008-04-12 03:27:09
Hi,

can you please check, if the IDE is listening on a port? Can
you try to start 
the debugger backend manually via the shell context menu
'Start->Python' 
entry?

Detlev

On Samstag, 12. April 2008, Melissa wrote:
> Detlev Offenbach <detlev...> writes:
> > On Mittwoch, 9. April 2008, Melissa wrote:
> > > I am having the same socket error (see
traceback below) on my recent
> > > installation of Eric4 on Windows Vista upon
launching. In the
> > > configuration panel: Debugger > General
(Part 1), I have selected:
> > >
> > > Only selected network interface: 127.0.0.1
> > > Passive Debugger is unchecked
> > > Remote Debugger is unchecked
> > >
> > > Nothing is checked on the General (Part 2)
configuration page.
> > >
> > > The problem does not seem to be the firewall
since I deactivated the
> > > firewall and launched Eric4 and have the same
error message.
> >
> > Please check the settings of your firewall. Maybe
it is too prohibitive.
> > Except from this I have no idea. Unfortunately I
cannot test on Windows
> > Vista. Maybe somebody else can help out.
> >
> > Regards,
> > Detlev
>
> I turned the firewall off and still have this error.
I'm only using the
> loopback anyway, not connecting remotely. I've got
MySQL installed as well
> and don't have any trouble opening the database on
localhost.
>
> The shell is essentially disabled by this error. I can
hit return and it
> goes to a new line, but no prompt and I can't type
anything in.
>
> Can anyone give me another clue as to a diagnostic I
could do to better
> pinpoint the problem?
>
>
> Another thing I tried is turning passive debugger on
and that did not go
> well. I got this unhandled exception when I hit return
in the shell window:
>
>
------------------------------------------------------------
---------------
>----- 2008-04-12, 00:13:13
>
------------------------------------------------------------
---------------
>----- exceptions.AttributeError:
> 'NoneType' object has no attribute 'remoteStatement'
>
------------------------------------------------------------
---------------
>----- File
>
"C:appsPythonLibsite-packageseric4ViewManagerVie
wManager.py", line
> 4308, in __editorCommand
>    
e4App().getObject("Shell").editorCommand(cmd)
>   File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line
> 613, in editorCommand
>     self.supportedEditorCommands[cmd](cmd)
>   File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line
> 761, in __QScintillaNewline
>     self.__executeCommand(buf)
>   File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line
> 1007, in __executeCommand
>     self.dbs.remoteStatement(cmd)
>   File
"C:appsPythonLibsite-packageseric4DebuggerDebugS
erver.py",
> line 690, in remoteStatement
>     self.debuggerInterface.remoteStatement(stmt)
>
>
------------------------------------------------------------
---------------
>----- Version Numbers:
>   Python 2.4.5
>   Qt 4.3.3
>   PyQt4 4.3.3
>   sip 4.7.4
>   QScintilla 2.2
>   eric4 4.1.2 (r2105)
>
> Platform: win32
> 2.4.5 (#71, Mar 26 2008, 17:55:58) [MSC v.1310 32 bit
(Intel)]
>
------------------------------------------------------------
---------------
>-----
>
> I'm using PythonWin with no problem* and I've tested Qt
and PyQt with no
> problem so far.
>
> *I'd like to switch to Eric from PythonWin since Eric
looks much better and
> I can't debug gui code in PythonWin. Other than that
PythonWin is working
> fine.
>
> I can connect to a MySQL database with test code in
C++/Qt or python/PyQt
> and I can pop up label widgets and stuff. So it would
appear that Qt and
> PyQt are basically working. The Eric editor window
seems to work fine, so I
> suppose QScintilla is working. I tried some of the
networking demos that
> come with Qt. The loopback demo worked fine, as did the
fortune
> client/server pair (using a port) but the secure socket
client crashed (OS
> put up a message saying it had stopped working and
would be shut down -
> typical Vista behavior). But the fortune client server
worked on port 50765
> or some such, with no complaint from the firewall
(which I have
> subsequently turned on again). Does that narrow it down
at all?
>
> Does anyone have relevant test code that might be
helpful here in isolating
> the problem? Or ideas of things to look at?
>
> Thanks,
>
> -Melissa
>
>
>
>
> _______________________________________________
> Eric mailing list
> Ericriverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric



-- 
Detlev Offenbach
detlevdie-offenbachs.de
_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: eric 4.1.1 interactive python console problem
country flaguser name
United States
2008-04-14 01:55:45
Detlev Offenbach <detlev...> writes:

> can you please check, if the IDE is listening on a
port? Can you try to start 
> the debugger backend manually via the shell context
menu 'Start->Python' 
> entry?

As far as I can see (netstat -b) there is nothing listening
on a port that
appears related to Eric or Python. Do you know how it would
be identified? Or
which port it would use?

Running from a console window the only error messages I see
are related to it
not finding some Qt translation files, which is fine because
the default seems
to be English, which is working for me. 

I manually executed DebugServer.py, if that's what you meant
by the debugger
backend. No error message or anything but the console window
disappear before I
could see what was going on. <grrr windows...> Perhaps
tomorrow I can try to run
the code piece by piece and see what's failing....

In the meantime do you know any small tests I can do to
isolate the problem?

Here are the bits of code from the call stack where the
exception occurred:


Here is where the exception is thrown (see line marked
"fails here"):


    def
connectDebugger(self,port,remoteAddress=None,redirect=1):
        """
        Public method to establish a session with the
debugger. 
        
        It opens a network connection to the debugger,
connects it to stdin, 
        stdout and stderr and saves these file objects in
case the application
        being debugged redirects them itself.
        
        param port the port number to connect to (int)
        param remoteAddress the network address of the debug
server host
               (string)
        param redirect flag indicating redirection of stdin,
stdout and stderr 
               (boolean)
        """
        sock =
socket.socket(socket.AF_INET,socket.SOCK_STREAM)
        if remoteAddress is None:
            sock.connect((DebugAddress,port)) # fails here
        else:
            sock.connect((remoteAddress,port))
        sock.setblocking(0)

        self.readstream =
AsyncFile(sock,sys.stdin.mode,sys.stdin.name)
        self.writestream =
AsyncFile(sock,sys.stdout.mode,sys.stdout.name)
        self.errorstream =
AsyncFile(sock,sys.stderr.mode,sys.stderr.name)
        
        if redirect:
            sys.stdin = self.readstream
            sys.stdout = self.writestream
            sys.stderr = self.errorstream
        self.redirect = redirect
        
        # attach to the main thread here
        self.attachThread(mainThread=1)

This is called from (see line marked "fails
here"):

    def main(self):
        """
        Public method implementing the main method.
        """
        if '--' in sys.argv:
            args = sys.argv[1:]
            host = None
            port = None
            wd = ''
            tracePython = 0
            exceptions = 1
            redirect = 1
            while args[0]:
                if args[0] == '-h':
                    host = args[1]
                    del args[0]
                    del args[0]
                elif args[0] == '-p':
                    port = args[1]
                    del args[0]
                    del args[0]
                elif args[0] == '-w':
                    wd = args[1]
                    del args[0]
                    del args[0]
                elif args[0] == '-t':
                    tracePython = 1
                    del args[0]
                elif args[0] == '-e':
                    exceptions = 0
                    del args[0]
                elif args[0] == '-n':
                    redirect = 0
                    del args[0]
                elif args[0] == '--no-encoding':
                    self.noencoding = True
                    del args[0]
                elif args[0] == '--':
                    del args[0]
                    break
                else:   # unknown option
                    del args[0]
            if not args:
                print "No program given.
Aborting!"
            else:
                if not self.noencoding:
                    self.__coding = self.defaultCoding
##                    try:
##                       
sys.setappdefaultencoding(self.defaultCoding)
##                    except AttributeError:
##                        pass
                self.startProgInDebugger(args, wd, host,
port, 
                                        
exceptions=exceptions,
tracePython=tracePython,
                                         redirect=redirect)
        else:
            if sys.argv[1] == '--no-encoding':
                self.noencoding = True
                del sys.argv[1]
            if sys.argv[1] == '':
                del sys.argv[1]
            try:
                port = long(sys.argv[1])
            except:
                port = -1
            try:
                redirect = int(sys.argv[2])
            except:
                redirect = 1
            try:
                remoteAddress = sys.argv[3]
            except:
                remoteAddress = None
            sys.argv = ['']
            if not '' in sys.path:
                sys.path.insert(0, '')
            if port >= 0:
                if not self.noencoding:
                    self.__coding = self.defaultCoding
##                    try:
##                       
sys.setappdefaultencoding(self.defaultCoding)
##                    except AttributeError:
##                        pass
                self.connectDebugger(port, remoteAddress,
redirect) # fails here
                self.__interact()
            else:
                print "No network port given.
Aborting..."

This is called from the marked line below:

# We are normally called by the debugger to execute
directly.

if __name__ == '__main__':
    debugClient = DebugClientThreads()
    debugClient.main() # failed here

This is the error message in the eric error log file:

------------------------------------------------------------
-------------------
2008-04-13, 23:19:00
------------------------------------------------------------
--------------------
exceptions.AttributeError: 
'NoneType' object has no attribute 'remoteStatement'
------------------------------------------------------------
--------------------
  File
"C:appsPythonLibsite-packageseric4ViewManagerVie
wManager.py", line
4308, in __editorCommand
    e4App().getObject("Shell").editorCommand(cmd)
  File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line 613,
in editorCommand
    self.supportedEditorCommands[cmd](cmd)
  File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line 761,
in __QScintillaNewline
    self.__executeCommand(buf)
  File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line 1007,
in __executeCommand
    self.dbs.remoteStatement(cmd)
  File
"C:appsPythonLibsite-packageseric4DebuggerDebugS
erver.py", line
690, in remoteStatement
    self.debuggerInterface.remoteStatement(stmt)

------------------------------------------------------------
--------------------
Version Numbers:
  Python 2.4.5
  Qt 4.3.3
  PyQt4 4.3.3
  sip 4.7.4
  QScintilla 2.2
  eric4 4.1.2 (r2105)

Platform: win32
2.4.5 (#71, Mar 26 2008, 17:55:58) [MSC v.1310 32 bit
(Intel)]


Thanks.

Melissa

_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

Re: Re: eric 4.1.1 interactive python console problem
user name
2008-04-14 12:51:19
On Montag, 14. April 2008, Melissa wrote:
> Detlev Offenbach <detlev...> writes:
> > can you please check, if the IDE is listening on a
port? Can you try to
> > start the debugger backend manually via the shell
context menu
> > 'Start->Python' entry?
>
> As far as I can see (netstat -b) there is nothing
listening on a port that
> appears related to Eric or Python. Do you know how it
would be identified?
> Or which port it would use?
>
> Running from a console window the only error messages I
see are related to
> it not finding some Qt translation files, which is fine
because the default
> seems to be English, which is working for me.
>
> I manually executed DebugServer.py, if that's what you
meant by the
> debugger backend. No error message or anything but the
console window
> disappear before I could see what was going on.
<grrr windows...> Perhaps
> tomorrow I can try to run the code piece by piece and
see what's
> failing....
>
> In the meantime do you know any small tests I can do to
isolate the
> problem?
>
> Here are the bits of code from the call stack where the
exception occurred:
>
>
> Here is where the exception is thrown (see line marked
"fails here"):
>
>
>     def
connectDebugger(self,port,remoteAddress=None,redirect=1):
>         """
>         Public method to establish a session with the
debugger.
>
>         It opens a network connection to the debugger,
connects it to
> stdin, stdout and stderr and saves these file objects
in case the
> application being debugged redirects them itself.
>
>         param port the port number to connect to
(int)
>         param remoteAddress the network address of
the debug server host
>                (string)
>         param redirect flag indicating redirection
of stdin, stdout and
> stderr (boolean)
>         """
>         sock =
socket.socket(socket.AF_INET,socket.SOCK_STREAM)
>         if remoteAddress is None:
>             sock.connect((DebugAddress,port)) # fails
here
>         else:
>             sock.connect((remoteAddress,port))
>         sock.setblocking(0)
>
>         self.readstream =
AsyncFile(sock,sys.stdin.mode,sys.stdin.name)
>         self.writestream =
AsyncFile(sock,sys.stdout.mode,sys.stdout.name)
>         self.errorstream =
AsyncFile(sock,sys.stderr.mode,sys.stderr.name)
>
>         if redirect:
>             sys.stdin = self.readstream
>             sys.stdout = self.writestream
>             sys.stderr = self.errorstream
>         self.redirect = redirect
>
>         # attach to the main thread here
>         self.attachThread(mainThread=1)
>
> This is called from (see line marked "fails
here"):
>
>     def main(self):
>         """
>         Public method implementing the main method.
>         """
>         if '--' in sys.argv:
>             args = sys.argv[1:]
>             host = None
>             port = None
>             wd = ''
>             tracePython = 0
>             exceptions = 1
>             redirect = 1
>             while args[0]:
>                 if args[0] == '-h':
>                     host = args[1]
>                     del args[0]
>                     del args[0]
>                 elif args[0] == '-p':
>                     port = args[1]
>                     del args[0]
>                     del args[0]
>                 elif args[0] == '-w':
>                     wd = args[1]
>                     del args[0]
>                     del args[0]
>                 elif args[0] == '-t':
>                     tracePython = 1
>                     del args[0]
>                 elif args[0] == '-e':
>                     exceptions = 0
>                     del args[0]
>                 elif args[0] == '-n':
>                     redirect = 0
>                     del args[0]
>                 elif args[0] == '--no-encoding':
>                     self.noencoding = True
>                     del args[0]
>                 elif args[0] == '--':
>                     del args[0]
>                     break
>                 else:   # unknown option
>                     del args[0]
>             if not args:
>                 print "No program given.
Aborting!"
>             else:
>                 if not self.noencoding:
>                     self.__coding = self.defaultCoding
> ##                    try:
> ##                       
sys.setappdefaultencoding(self.defaultCoding)
> ##                    except AttributeError:
> ##                        pass
>                 self.startProgInDebugger(args, wd,
host, port,
>                                         
exceptions=exceptions,
> tracePython=tracePython,
>                                         
redirect=redirect)
>         else:
>             if sys.argv[1] == '--no-encoding':
>                 self.noencoding = True
>                 del sys.argv[1]
>             if sys.argv[1] == '':
>                 del sys.argv[1]
>             try:
>                 port = long(sys.argv[1])
>             except:
>                 port = -1
>             try:
>                 redirect = int(sys.argv[2])
>             except:
>                 redirect = 1
>             try:
>                 remoteAddress = sys.argv[3]
>             except:
>                 remoteAddress = None
>             sys.argv = ['']
>             if not '' in sys.path:
>                 sys.path.insert(0, '')
>             if port >= 0:
>                 if not self.noencoding:
>                     self.__coding = self.defaultCoding
> ##                    try:
> ##                       
sys.setappdefaultencoding(self.defaultCoding)
> ##                    except AttributeError:
> ##                        pass
>                 self.connectDebugger(port,
remoteAddress, redirect) # fails
> here self.__interact()
>             else:
>                 print "No network port given.
Aborting..."
>
> This is called from the marked line below:
>
> # We are normally called by the debugger to execute
directly.
>
> if __name__ == '__main__':
>     debugClient = DebugClientThreads()
>     debugClient.main() # failed here
>
> This is the error message in the eric error log file:
>
>
------------------------------------------------------------
---------------
>---- 2008-04-13, 23:19:00
>
------------------------------------------------------------
---------------
>----- exceptions.AttributeError:
> 'NoneType' object has no attribute 'remoteStatement'
>
------------------------------------------------------------
---------------
>----- File
>
"C:appsPythonLibsite-packageseric4ViewManagerVie
wManager.py", line
> 4308, in __editorCommand
>    
e4App().getObject("Shell").editorCommand(cmd)
>   File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line
> 613, in editorCommand
>     self.supportedEditorCommands[cmd](cmd)
>   File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line
> 761, in __QScintillaNewline
>     self.__executeCommand(buf)
>   File
"C:appsPythonLibsite-packageseric4QScintillaShel
l.py", line
> 1007, in __executeCommand
>     self.dbs.remoteStatement(cmd)
>   File
"C:appsPythonLibsite-packageseric4DebuggerDebugS
erver.py",
> line 690, in remoteStatement
>     self.debuggerInterface.remoteStatement(stmt)

And this is the strange thing. self.debuggerInterface should
not be None and I 
cannot find the path through the code, which could lead to
such a problem. 
Maybe I am too blind to see it.

Detlev

>
>
------------------------------------------------------------
---------------
>----- Version Numbers:
>   Python 2.4.5
>   Qt 4.3.3
>   PyQt4 4.3.3
>   sip 4.7.4
>   QScintilla 2.2
>   eric4 4.1.2 (r2105)
>
> Platform: win32
> 2.4.5 (#71, Mar 26 2008, 17:55:58) [MSC v.1310 32 bit
(Intel)]
>
>
> Thanks.
>
> Melissa
>
> _______________________________________________
> Eric mailing list
> Ericriverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric



-- 
Detlev Offenbach
detlevdie-offenbachs.de
_______________________________________________
Eric mailing list
Ericriverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/eric

[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )