Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

使用html作为报错,麻烦解决一下 #42

Closed
chenliangfang opened this issue Aug 21, 2018 · 7 comments
Closed

使用html作为报错,麻烦解决一下 #42

chenliangfang opened this issue Aug 21, 2018 · 7 comments
Labels
bug Something isn't working

Comments

@chenliangfang
Copy link

File "C:\ProgramData\Anaconda3\lib\site-packages\zmail\server.py", line 67, in send_mail
server.send(recipients, mail, timeout, self.auto_add_to, tls)

File "C:\ProgramData\Anaconda3\lib\site-packages\zmail\server.py", line 221, in send
server.sendmail(self.user, recipient, message.as_string())

File "C:\ProgramData\Anaconda3\lib\site-packages\zmail\message.py", line 140, in as_string
self.pre_send()

File "C:\ProgramData\Anaconda3\lib\site-packages\zmail\message.py", line 122, in pre_send
_combine_message += i

TypeError: must be str, not NoneType

使用html作为报错,麻烦解决一下

@zhangyunhao116 zhangyunhao116 added the bug Something isn't working label Aug 21, 2018
@zhangyunhao116
Copy link
Owner

麻烦提供以下信息: 1.zmail的版本号 2.python版本号 3.操作平台
(如果发现问题,请先行更新zmail,可解决大部分问题)

@chenliangfang
Copy link
Author

chenliangfang commented Aug 21, 2018 via email

@zhangyunhao116
Copy link
Owner

zhangyunhao116 commented Aug 23, 2018

尝试了一些方法也无法复现这个问题 麻烦先将zmail升级到最新版本 如果依然出现这个问题 可以提供一下html文件的形式或者结构以便进一步复现问题

@solomsk
Copy link

solomsk commented Aug 29, 2018

我用pip install zmail命令安装完后,import zmail就报错了:
Traceback (most recent call last):
File "", line 1, in
File "D:\Python34\lib\site-packages\zmail_init_.py", line 7, in
from .api import *
File "D:\Python34\lib\site-packages\zmail\api.py", line 43
return MailServer(user, password, **config_dict, timeout=timeout, auto_add_t
o=auto_add_to,
^
SyntaxError: invalid syntax

我的环境信息如下:
OS:win7
python版本:3.4.3
zmail版本:0.1.10

初步分析了下原因,api.py里面有星号,不知道这个星号是什么意思,去掉再import就没事了。

@zhangyunhao116
Copy link
Owner

@solomsk 大概率是看代码的时候不小心修改了源代码 请重新安装 如果还能复现请反馈

@chenliangfang
Copy link
Author

chenliangfang commented Sep 27, 2018 via email

@zhangyunhao116
Copy link
Owner

#36

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants