473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Python Error :(

I wasn't able to run a Python script. But then later I was able to run
it through the Shell. I was experimenting with cron jobs and set up
the python execution in as a cron. The first time it ran, It was fine
but then after that, it started giving me some errors. Now when I try
to run the script directly, I get the following error:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "userbot.py", line 637, in ?
con = connect()
File "userbot.py", line 607, in connect
con.requestRoster()
File "user.py", line 531, in requestRoster
self.SendAndWaitForResponse(rost_iq)
File "user.py", line 326, in SendAndWaitForResponse
return self.waitForResponse(ID)
File "user.py", line 300, in waitForResponse
self.process(1)
File "xmlstream.py", line 459, in process
if not len(self.read()): # length of 0 means disconnect
File "xmlstream.py", line 398, in read
data_in=data_in+self._sslObj.read(BLOCK_SIZE).deco de('utf-8')
socket.sslerror: (6, 'TLS/SSL connection has been closed')
Any help please?

Mar 27 '07 #1
2 1462
Legend napisał(a):
I wasn't able to run a Python script. But then later I was able to run
it through the Shell. I was experimenting with cron jobs and set up
the python execution in as a cron. The first time it ran, It was fine
but then after that, it started giving me some errors. Now when I try
to run the script directly, I get the following error:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "userbot.py", line 637, in ?
con = connect()
File "userbot.py", line 607, in connect
con.requestRoster()
File "user.py", line 531, in requestRoster
self.SendAndWaitForResponse(rost_iq)
File "user.py", line 326, in SendAndWaitForResponse
return self.waitForResponse(ID)
File "user.py", line 300, in waitForResponse
self.process(1)
File "xmlstream.py", line 459, in process
if not len(self.read()): # length of 0 means disconnect
File "xmlstream.py", line 398, in read
data_in=data_in+self._sslObj.read(BLOCK_SIZE).deco de('utf-8')
socket.sslerror: (6, 'TLS/SSL connection has been closed')
Any help please?
Yes.

--
Jarek Zgoda

"We read Knuth so you don't have to."
Mar 27 '07 #2
On Mar 27, 8:19 am, "Legend" <rahul...@gmail.comwrote:
I wasn't able to run a Python script. But then later I was able to run
it through the Shell. I was experimenting with cron jobs and set up
the python execution in as a cron. The first time it ran, It was fine
but then after that, it started giving me some errors. Now when I try
to run the script directly, I get the following error:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "userbot.py", line 637, in ?
con = connect()
File "userbot.py", line 607, in connect
con.requestRoster()
File "user.py", line 531, in requestRoster
self.SendAndWaitForResponse(rost_iq)
File "user.py", line 326, in SendAndWaitForResponse
return self.waitForResponse(ID)
File "user.py", line 300, in waitForResponse
self.process(1)
File "xmlstream.py", line 459, in process
if not len(self.read()): # length of 0 means disconnect
File "xmlstream.py", line 398, in read
data_in=data_in+self._sslObj.read(BLOCK_SIZE).deco de('utf-8')
socket.sslerror: (6, 'TLS/SSL connection has been closed')

Any help please?
I'll hazard a guess: Are you opening the socket explicitly when you
run this script? If not, be sure to do so. And when you are finished
doing whatever it is you're doing, be sure to close it as well. You
may need to put in some kind of logic to check if the socket is still
open if you are transferring large files.

Mike

Mar 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Helmut Zeisel | last post by:
I want to build a static extension of Python using SWIG and VC++ 6.0 as described in http://www.swig.org/Doc1.3/Python.html#n8 for gcc. My file is testerl.i: ========================= %module...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 259 open ( -5) / 2573 closed (+17) / 2832 total (+12) Bugs : 745 open ( +0) / 4405 closed (+21) / 5150 total (+21) RFE : 150 open...
1
by: Sean | last post by:
Hi, Trying to compile the PythonCE (Validus Medical Systems Python 2.3.4) using eVC++ 4.0 and the Smartphone2003 SDK. Linking is generating 28 errors. I dug into the first one (PyErr_Fetch)...
3
by: Saravanan | last post by:
Hello, Im running Python Application as a Windows Service (using windows extensions). But, sporadically the application crashes (crash in Python23.dll) and this stops the service. This...
0
by: | last post by:
Greetings. In an effort to get python2.4 on my Centos 3.7, I installed the python bootstrap rpm. This installed 2.4 alongside 2.2 and updated yum to 2.4.0. Oddly, it didn't create a symlink...
11
by: Osiris | last post by:
I have these pieces of C-code (NOT C++ !!) I want to call from Python. I found Boost. I have MS Visual Studio 2005 with C++. is this the idea: I write the following C source file:...
0
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 385 open (+21) / 3790 closed (+21) / 4175 total (+42) Bugs : 1029 open (+43) / 6744 closed (+43) / 7773 total (+86) RFE : 262 open...
8
by: karthikbalaguru | last post by:
Hi, One of my python program needs tkinter to be installed to run successfully. I am using Redhat 9.0 and hence tried installing by copying the tkinter-2.2.2-36.i386.rpm alone from the CD 3 to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.