excel - Using simplemail in Haskell throws broken pipe error -


i have haskell program wrote on year ago , has been running fine until couple of months ago.

what changed? program builds series of excel report files using spreadsheetml (of contributor) , emails them attachments list of users. program controlled comma separated text file each line represents single report , contains report title, list of database keywords (separated |), , list of recipient email addresses (also separated |).

three months ago file restructured change reports generated , whom distributed. since then, 1 line in file killing program broken pipe error. error message program is:

createexcel: fd:7: hputbuf: resource vanished (broken pipe) 

the program accepts command line parameter control whether or not send reports. if parameter false, sendreport method (below) never called , no error reported. therefore, believe before call sendreport solid. here code produces error:

makeaddress :: string -> address makeaddress addr = address nothing (t.pack addr)  sendreport :: string -> [string] -> string -> io () sendreport file title =     simplemail <- simplemail (address nothing (t.pack ""))                         (address nothing (t.pack ""))                         (t.pack ("cdc/groth training report: " ++ title))                         (l.pack ("the attachment contains training report for" ++ title ++ "."))                        (l.pack ("the attachment contains training report <u>" ++ title ++ "</u>."))                        [(t.pack "application/xml", file)]     let mail = simplemail { mailfrom = address (just (t.pack "order fulfillment")) (t.pack "order_fulfillment@brindlewaye.com"),                              mailto   = map makeaddress to,                              mailcc   = [],                              mailbcc  = [address (just(t.pack "dave smith")) (t.pack "dave@brindlewaye.pair.com")] }      mailstream <- rendermail' mail     sendmail mailstream 

when error reported, email sent, without excel file attachment. also, after reporting error program exits , none of lines below processed.

the line report driver file causes crash is:

sales-europe-africa, sales/thijssen|sales/pecqueur|sales/van den bos|sales/zuyderduyn|sales/marksman, user1@example.com|user2@example.com 

... translates report title of "sales-europe-africa" , list of database keywords , email recipients. if change report title "test" works; however, there line in same file report title "sales-north-south-americas" , report runs fine.

anybody see have missed?

solved!

through roundabout process, found rebuilding application original source has fixed problem. accomplish rebuild had reinstall couple of dependencies, not 1 character of original code changed.

the new executable not have problem reported here. suggestions.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -