[Bug 462603] New: capisuite 0.4.5 error in cs_helper.py sox related
https://bugzilla.novell.com/show_bug.cgi?id=462603 Summary: capisuite 0.4.5 error in cs_helper.py sox related Product: openSUSE 11.1 Version: Final Platform: 32bit OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: ISDN AssignedTo: kkeil@novell.com ReportedBy: brunofr@ioda.net QAContact: qa@suse.de Found By: Consulting With new version of sox (& python) there's some messages which lead to an error raised. error log Thu Dec 25 16:42:00 2008 CapiSuite 0xbffae698: CapiSuite 0.4.5 started. Thu Dec 25 16:42:57 2008 Pythonscript /usr/lib/capisuite/incoming.py,callIncoming,0x826d2e8: A python error occured. See traceback below. Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Python traceback: Traceback (most recent call last): Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Traceback: File "/usr/lib/capisuite/incoming.py", line 75, in callIncoming Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Traceback: voiceIncoming(call,call_from,call_to,curr_user,config) Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Traceback: File "/usr/lib/capisuite/incoming.py", line 255, in voiceIncoming Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Traceback: +"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename) Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Traceback: File "/usr/lib/python2.6/site-packages/cs_helpers.py", line 234, in sendMIMEMail Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Traceback: raise "conv-error","Error while calling sox. Not installed?" Thu Dec 25 16:42:57 2008 Pythonscript 0x826d2e8: Traceback: TypeError: exceptions must be classes or instances, not str Thu Dec 25 18:35:27 2008 CapiSuite 0xbffae698: CapiSuite finished. This could be corrected by this line the diff patch extract @@ -229,7 +229,8 @@ elif (mail_type=="la"): # voice file # la -> wav # don't use stdout as sox needs a file to be able to seek in it otherwise the header will be incomplete - ret = os.spawnlp(os.P_WAIT,"sox","sox",attachment,"-w",basename+"wav") + # ret = os.spawnlp(os.P_WAIT,"sox","sox",attachment,"-w",basename+"wav") + ret = os.spawnlp(os.P_WAIT,"sox","sox","-r","8000","-c","1",attachment,basename+"wav") if (ret or not os.access(basename+"wav",os.R_OK)): raise "conv-error","Error while calling sox. Not installed?" filepart = email.MIMEAudio.MIMEAudio(open(basename+"wav").read(),"x-wav",email.Encoders.encode_base64,name=os.path.basename(basename)+"wav") This only correct the call to sox without any warning or message. As I can't to much correct python code. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User christian.fertig@consense-service.de added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c1 Christian Fertig <christian.fertig@consense-service.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |christian.fertig@consense-s | |ervice.de Platform|32bit |All --- Comment #1 from Christian Fertig <christian.fertig@consense-service.de> 2009-01-14 04:17:05 MST --- Additionally, all Text Exceptions should be replaced by Exception classes, as 11.1 ships python 2.6 and this does not accept them anymore. So for the example above: raise "conv-error","Error while calling sox." it should be replaced with something like: raise Exception("conv-error","Error while calling sox.") -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 Karsten Keil <kkeil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User kkeil@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c2 Karsten Keil <kkeil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |christian.fertig@consense-s | |ervice.de --- Comment #2 from Karsten Keil <kkeil@novell.com> 2009-01-15 08:11:42 MST --- Since I'm not a python expert as well, is this simple change enough, no need to define something else ? It seems to work: Thu Jan 15 15:49:36 2009 Pythonscript /usr/lib/capisuite/incoming.py,callIncoming,0x85a8c0: A python error occured. See traceback below. Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Python traceback: Traceback (most recent call last): Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Traceback: File "/usr/lib/capisuite/incoming.py", line 75, in callIncoming Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Traceback: voiceIncoming(call,call_from,call_to,curr_user,config) Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Traceback: File "/usr/lib/capisuite/incoming.py", line 255, in voiceIncoming Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Traceback: +"See attached file.\nThe original file was saved to file://"+filename+"\n\n", filename) Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Traceback: File "/usr/lib64/python2.6/site-packages/cs_helpers.py", line 235, in sendMIMEMail Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Traceback: raise Exception("conv-error","Error while calling sox. Not installed?") Thu Jan 15 15:49:36 2009 Pythonscript 0x85a8c0: Traceback: Exception: ('conv-error', 'Error while calling sox. Not installed?') -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User christian.fertig@consense-service.de added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c3 Christian Fertig <christian.fertig@consense-service.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|christian.fertig@consense-s | |ervice.de | --- Comment #3 from Christian Fertig <christian.fertig@consense-service.de> 2009-01-15 08:50:35 MST --- You don't need to define something else. Perhaps it's not a beautiful solution, as a python list ('item','item') is put out, not a pure message. In the python 2.6.1 docs http://docs.python.org/c-api/exceptions.html#deprecation-of-string-exception... it's written, that these string exceptions would be just depreacted, but still working. This does seem to be right, just the real "exception content" is replaced by their error message "Error: exceptions must be classes or instances, not str". My test program seems to continue after such a catched exception. So it's more eyecandy to replace the strings by classes. It's was just the locating of the problem in our real "sox"-bug for me becoming harder. This is something, that the maintainer of the capisuite should fix, but it seems that there is no one at the moment. Sorry, that I started a discussion about "another bug" by posting a comment to the sox bug -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User kkeil@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c4 --- Comment #4 from Karsten Keil <kkeil@novell.com> 2009-01-15 09:52:44 MST --- In this case it is OK, I'll fix it together, for the next release this avoid problems if python make it really fail. But I think it is not complete, it should not trow a traceback here. I think this code need also a change: except "conv-error",errormessage: text+="\n\nERROR occured while converting file: "+errormessage+"\nPlease talk to your friendly administrator.\n" textpart = email.MIMEText.MIMEText(text) msg.attach(textpart) Reading in the docu comes up with: except Exception as (errno, errormessage): .. Correct ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User brunofr@ioda.net added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c5 --- Comment #5 from Bruno Friedmann <brunofr@ioda.net> 2009-01-15 10:01:12 MST --- What would be great as a fix, is to try it also with phython-3 as this version also come with opensuse 11.1 and would become the standard in near future. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User kkeil@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c6 --- Comment #6 from Karsten Keil <kkeil@novell.com> 2009-01-15 10:10:32 MST --- Hmm I do not see python-3 on 11.1, which packages ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User brunofr@ioda.net added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c7 --- Comment #7 from Bruno Friedmann <brunofr@ioda.net> 2009-01-15 12:36:26 MST --- zypper se ( or yast2 sw_single -> search ) python3 And you would get them | python3 | Python3 Interpreter | package | python3-2to3 | Python 3.0 conversion tool | package | python3-curses | Python Interface to the (N)Curses Library | package | python3-dbm | Python Interface to the GDBM Library | package | python3-demo | Python Demonstration Scripts | package | python3-devel | Include Files and Libraries Mandatory for Building Python Modules | package | python3-doc | Additional Package Documentation for Python. | package | python3-doc-pdf | Python PDF Documentation | package | python3-idle | An Integrated Development Environment for Python | package | python3-tk | TkInter - Python Tk Interface | package | python3-xml | A Python XML Interface -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User kkeil@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c8 --- Comment #8 from Karsten Keil <kkeil@novell.com> 2009-01-15 15:55:19 MST --- I thought that I searched for python3 and python-3, but maybe on the wrong installation. So to test this I think I need to build capisuite with python3-devel, but this gives an error on detecting the version: Python 3.0b3 (r30b3:65927, Dec 3 2008, 13:14:01) [GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import sys; print sys.version[:3] File "<stdin>", line 1 import sys; print sys.version[:3] ^ SyntaxError: invalid syntax
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User kkeil@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c9 --- Comment #9 from Karsten Keil <kkeil@novell.com> 2009-01-16 00:07:23 MST --- OK this part was easy: import sys; print(sys.version[:3]) but also then the environment is not really ready for python3, autoconf will not find an interpreter with AM_PATH_PYTHON(3.0) so configure fail. I think this is now too much for this report, the problem is fixed and python3 has to wait. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User brunofr@ioda.net added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c11 Bruno Friedmann <brunofr@ioda.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |ASSIGNED Info Provider|qa@suse.de | --- Comment #11 from Bruno Friedmann <brunofr@ioda.net> 2009-01-16 01:13:55 MST --- The python3 was just an enhancement in case of . I couldn't evaluate how large would be the modification. If you have success with 2.6. You could close this bug when the updated package is published. Thanks a lot. As I think many european using isdn telephony & fax would be happy to see this package continue to work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User kkeil@linux-pingi.de added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c13 Karsten Keil <kkeil@linux-pingi.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kkeil@linux-pingi.de AssignedTo|kkeil@linux-pingi.de |ast@novell.com --- Comment #13 from Karsten Keil <kkeil@linux-pingi.de> 2009-03-01 02:53:07 MST --- This need a maintenance update. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 User ast@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=462603#c14 Anja Stock <ast@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEEDINFO Info Provider| |ast@novell.com AssignedTo|ast@novell.com |kkeil@novell.com --- Comment #14 from Anja Stock <ast@novell.com> 2009-03-02 06:23:33 MST --- If this needs a maintenance update, please do not assign, but needinfo ast@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=462603 Karsten Keil <kkeil@linux-pingi.de> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|kkeil@novell.com |kkeil@linux-pingi.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com