作者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://www.ptt.cc/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://www.ptt.cc/bbs/Python/M.1509002469.A.A60.html
※ 編輯: ctr1 (59.124.158.195), 10/26/2017 15:24:19
→ uranusjr: 請提供完整錯誤訊息, 我相信不只上面那一行 10/26 16:31
※ 編輯: ctr1 (59.124.158.195), 10/26/2017 16:46:03
→ ctr1: 已補上 謝謝 10/26 16:46
→ kenduest: magic 關係嗎?再裝 python-magic 看看 10/26 19:44