Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102579

Re: Exception handling for socket.error in Python 3.5/RStudio

From Shaunak Bangale <shaunak.bangale@gmail.com>
Newsgroups comp.lang.python
Subject Re: Exception handling for socket.error in Python 3.5/RStudio
Date 2016-02-05 14:15 -0700
Message-ID <mailman.36.1454755046.2317.python-list@python.org> (permalink)
References <1067e50c-bcbd-464e-8013-754bd66fda91@googlegroups.com> <alpine.LSU.2.11.1602051237120.2025@znpeba.jbaqresebt.arg> <CALqmhqodOPdebFA_Zmj1fiX3r=L=cHZDU=oc=4xmq+3sJaMG6w@mail.gmail.com> <alpine.LSU.2.11.1602051257460.2025@znpeba.jbaqresebt.arg>

Show all headers | View raw


I do have the initiation command defined. Just that I am not allowed to
make the username, pwd public.

I am absolutely sure I am running the same code. Now opened the same file
with Python 3.5 shell and I get following error:

   from _ssl import RAND_status, RAND_egd, RAND_add
ImportError: cannot import name 'RAND_egd'

I am new to coding and this code has been borrowed from an online source
but I can see same code working on mac+Rstudio+python combo.

Salute your patience.

Sincerely,

On Fri, Feb 5, 2016 at 2:01 PM, Martin A. Brown <martin@linux-ip.net> wrote:

>
> Hi there,
>
> >Thanks for the detailed reply. I edited, saved and opened the file
> >again. Still I am getting exactly the same error.
> >
> >Putting bigger chunk of code and the error again:
>
> [snipped; thanks for the larger chunk]
>
> >Error:
> >except socket.error as e:
> >                         ^
> >SyntaxError: invalid syntax
>
> I ran your code.  I see this:
>
>   $ python3 shaunak.bangale.py
>   Connecting...
>   Connection succeeded
>   Traceback (most recent call last):
>     File "shaunak.bangale.py", line 23, in <module>
>       ssl_sock.write(bytes(initiation_command, 'UTF-8'))
>   NameError: name 'initiation_command' is not defined
>
> Strictly speaking, I don't think you are having a Python problem.
>
>   * Are you absolutely certain you are (or your IDE is) executing
>     the same code you are writing?
>
>   * How would you be able to tell?  Close your IDE.  Run the code on
>     the command-line.
>
>   * How much time have you taken to work out what the interpreter is
>     telling you?
>
> Good luck,
>
> -Martin
>
> --
> Martin A. Brown
> http://linux-ip.net/
>
>

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-05 11:58 -0800
  Re: Exception handling for socket.error in Python 3.5/RStudio Nathan Hilterbrand <nhilterbrand@gmail.com> - 2016-02-05 15:07 -0500
    Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-05 12:11 -0800
      Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-05 12:17 -0800
  Re: Exception handling for socket.error in Python 3.5/RStudio "Martin A. Brown" <martin@linux-ip.net> - 2016-02-05 12:08 -0800
    Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-05 12:22 -0800
  Re: Exception handling for socket.error in Python 3.5/RStudio "Martin A. Brown" <martin@linux-ip.net> - 2016-02-05 12:44 -0800
  Re: Exception handling for socket.error in Python 3.5/RStudio "Martin A. Brown" <martin@linux-ip.net> - 2016-02-05 13:01 -0800
  Re: Exception handling for socket.error in Python 3.5/RStudio Chris Angelico <rosuav@gmail.com> - 2016-02-06 08:01 +1100
  Re: Exception handling for socket.error in Python 3.5/RStudio Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-02-05 19:08 -0200
    Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-05 13:26 -0800
      Re: Exception handling for socket.error in Python 3.5/RStudio Bernardo Sulzbach <mafagafogigante@gmail.com> - 2016-02-05 19:37 -0200
  Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-05 13:57 -0800
  Re: Exception handling for socket.error in Python 3.5/RStudio Chris Angelico <rosuav@gmail.com> - 2016-02-06 08:57 +1100
  Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-05 14:35 -0800
    Re: Exception handling for socket.error in Python 3.5/RStudio Chris Angelico <rosuav@gmail.com> - 2016-02-06 13:04 +1100
  Re: Exception handling for socket.error in Python 3.5/RStudio Shaunak Bangale <shaunak.bangale@gmail.com> - 2016-02-05 13:50 -0700
  Re: Exception handling for socket.error in Python 3.5/RStudio Shaunak Bangale <shaunak.bangale@gmail.com> - 2016-02-05 14:00 -0700
  Re: Exception handling for socket.error in Python 3.5/RStudio Shaunak Bangale <shaunak.bangale@gmail.com> - 2016-02-05 14:15 -0700
  Re: Exception handling for socket.error in Python 3.5/RStudio dieter <dieter@handshake.de> - 2016-02-07 09:23 +0100
    Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-08 00:04 -0800
      Re: Exception handling for socket.error in Python 3.5/RStudio shaunak.bangale@gmail.com - 2016-02-19 10:07 -0800

csiph-web