I am having a problem sending Mail out via MailHost. Any ideas? The errors: Error Type: TypeError Error Value: len() of unsized object Traceback (innermost last): File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/www/Zope/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: Traversable) File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/www/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: sendMailTest) File /usr/local/www/Zope/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: sendMailTest) File /usr/local/www/Zope/lib/python/OFS/DTMLMethod.py, line 189, in __call__ (Object: sendMailTest) File /usr/local/www/Zope/lib/python/DocumentTemplate/DT_String.py, line 540, in __call__ (Object: sendMailTest) File /usr/local/www/Zope/lib/python/Products/MailHost/SendMailTag.py, line 189, in render (Object: MailHost) File /usr/local/www/Zope/lib/python/Products/MailHost/MailHost.py, line 222, in send (Object: MailHost) File /usr/local/lib/python2.0/smtplib.py, line 473, in sendmail File /usr/local/lib/python2.0/smtplib.py, line 355, in mail File /usr/local/lib/python2.0/smtplib.py, line 118, in quoteaddr File /usr/local/lib/python2.0/rfc822.py, line 477, in parseaddr File /usr/local/lib/python2.0/rfc822.py, line 522, in getaddrlist File /usr/local/lib/python2.0/rfc822.py, line 530, in getaddress File /usr/local/lib/python2.0/rfc822.py, line 510, in gotonext TypeError: (see above -------------------------------------------------------------------------- Note: The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. --------------------------------------------------------------------------
Hi, This should be simple, but never in my case. I want to zip pdf file. I am calling an external python file using dtml method. Here is file.py code ************************************************ def testzlib(): import zipfile import glob, os import zlib # open the zip file for writing, and write stuff to it file = zipfile.ZipFile("/usr/local/dc/Zope-2.3.0-src/pdffiles/test1.zip", "w") for name in glob.glob("/usr/local/dc/Zope-2.3.0-src/ Extensions/img/*"): file.write(name, os.path.basename(name), zipfile.ZIP_DEFLATED) file.close() ******************************************************* I am getting following error message Error Type: AttributeError Error Value: Z_DEFAULT_COMPRESSION I replaced Z_DEFAULT_COMPRESSION with 6, and got this error Error Type: AttributeError Error Value: crc32 I am using python1.5.2 and Zope2.3.0 Thanks Vid __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Bruce, Chris writes:
I am having a problem sending Mail out via MailHost. Any ideas? The errors:
Error Type: TypeError Error Value: len() of unsized object ... /usr/local/www/Zope/lib/python/Products/MailHost/MailHost.py, line 222, in send (Object: MailHost) File /usr/local/lib/python2.0/smtplib.py, line 473, in sendmail File /usr/local/lib/python2.0/smtplib.py, line 355, in mail File /usr/local/lib/python2.0/smtplib.py, line 118, in quoteaddr File /usr/local/lib/python2.0/rfc822.py, line 477, in parseaddr File /usr/local/lib/python2.0/rfc822.py, line 522, in getaddrlist File /usr/local/lib/python2.0/rfc822.py, line 530, in getaddress File /usr/local/lib/python2.0/rfc822.py, line 510, in gotonext TypeError: (see above Apparently, it gets a strange address field, probably "None" or an object that does not support "len".
I cannot tell you what it gets. I would instrument "rfc822.py:510" to print "self.field" and its type in order to understand what is going on. Dieter
participants (3)
-
Bruce, Chris -
Dieter Maurer -
Vid B