On Friday, February 5, 2016 at 1:09:35 PM UTC-7, Martin A. Brown wrote: > > except socket.error as e > > >line 53 except socket.error as e ^ SyntaxError: invalid syntax > > > >I tried changing socket.error to ConnectionRefusedError. and still > >got the same error. > > >Please tell me if the problem is with Rstudio, Python version or > >the syntax. > > Syntax. > > Your code has, unfortunately, suffered a colonectomy. > > When you transplant a colon, it is more likely to function properly > again. For example: > > except socket.error as e: > > Good luck, > > -Martin > > -- > Martin A. Brown > http://linux-ip.net/
I was first running with a colon only. Later tried with a comma. But it didn't work. I got the same error. -- https://mail.python.org/mailman/listinfo/python-list