作者ctr1 (【积π】)
看板Python
标题Re: [问题] python解析e-mail
时间Thu Oct 26 15:21:02 2017
小弟已参照官网的example执行也install eml-parser
https://pypi.python.org/pypi/eml-parser
但当程式码跑第一行
import eml_parser
就直接死去出现错误,如下
TypeError: bad argument type for built-in operation
完整错误:
https://imgur.com/a/YFe4i
google找过没有较完整的说明...
小弟的环境是python 3.6.2
os:win7 32位元
跪求版上大大协助
※ 引述《ctr1 (【积π】)》之铭言:
: 标题: [问题] python解析e-mail
: 时间: Mon Oct 23 13:36:03 2017
:
: 小弟将e-mail批次汇出後
:
: 产生.eml档
:
: 请问python该如何有效地解析大量的eml档
:
: 读取e-mail内的文字阿
:
: 谢谢~
:
:
: --
:
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 59.124.158.195
: ※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1508736968.A.0AE.html
: → kenduest: https://pypi.python.org/pypi/eml-parser 10/23 13:38
: → uranusjr: 视状况说不定内建的 email.parser 就可以用了 10/23 22:13
: → uranusjr: import email; email.message_from_file(档案) 10/23 22:14
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 59.124.158.195
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1509002469.A.A60.html
※ 编辑: ctr1 (59.124.158.195), 10/26/2017 15:24:19
1F:→ uranusjr: 请提供完整错误讯息, 我相信不只上面那一行 10/26 16:31
※ 编辑: ctr1 (59.124.158.195), 10/26/2017 16:46:03
2F:→ ctr1: 已补上 谢谢 10/26 16:46
3F:→ kenduest: magic 关系吗?再装 python-magic 看看 10/26 19:44