"Stuck" state or Error when using SMTP out channel, depending on whether translation is enabled

137 views
Skip to first unread message

anastas.s...@calumetspecialty.com

unread,
Feb 18, 2014, 10:51:01 AM2/18/14
to bots...@googlegroups.com
Hello,

I'm trying to set up a simple pickup -> SMTP route by adapting the example from demo_mdn_confirmation and using the example pickup file from that plugin. 

If I do not enable translation for the route, it ends on the Infile phase with state "Stuck"; if I do enable translation, the Translate phase ends in the Stuck state and the process ends on Parsed phase in the Error state. In the latter case, the exception thrown is always a TranslationNotFoundError for all editypes I've tried.

My goal is to be sending template-html formatted emails along with any attachments. However, I am unable to find documentation on constraints or valid settings for this case.

Any advice would be appreciated. Thank you.

Sincerely,
Anastas

anastas.s...@calumetspecialty.com

unread,
Feb 18, 2014, 11:03:37 AM2/18/14
to bots...@googlegroups.com
This is with BOTS v2.2.1.

henk-jan ebbers

unread,
Feb 18, 2014, 11:04:25 AM2/18/14
to bots...@googlegroups.com
hi Anastas,

welcome to the bots mailing list.
plugin edifact_ordertoprint show how to make html-formatted emails.
sending to smtp would be fairly easy: change the outchannel to type smtp, use connect parameters (host, port, if needed username and password)

kind regards,
henk-jan

>
> Any advice would be appreciated. Thank you.
>
> Sincerely,
> Anastas
> --
> You received this message because you are subscribed to the Google Groups "Bots Open Source EDI Translator" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to botsmail+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

anastas.s...@calumetspecialty.com

unread,
Feb 18, 2014, 12:19:30 PM2/18/14
to bots...@googlegroups.com
After installing edifact_ordertoprint and successfully testing it, I tried the following approaches:

1. Change the default edifact_ordertoprint route to have outchannel type smtp: 

    CommunicationOutError: No mail-address for partner "PARTNER1" (channel "smtp_out").

2. Leave the default route and create another route (same id, higher seq value) to an smtp_out outchannel from an smtp_in inchannel of type file. With route fromeditype template-html,

    InMessageError: Unknown editype for incoming message: templatehtml

or with editype edifact and no, which throws

  File "/usr/lib/python2.7/site-packages/bots/transform.py", line 54, in translate
    idroute=idroute)
  File "/usr/lib/python2.7/site-packages/bots/inmessage.py", line 38, in edifromfile
    ediobject.initfromfile()
  File "/usr/lib/python2.7/site-packages/bots/inmessage.py", line 62, in initfromfile
    self.defmessage = grammar.grammarread(self.ta_info['editype'],self.ta_info['messagetype'])  #read grammar, after sniffing. Information from sniffing can be used (eg name editype for edifact, using version info from UNB)
  File "/usr/lib/python2.7/site-packages/bots/grammar.py", line 15, in grammarread
    terug = classtocall('grammars',editype,grammarname)
  File "/usr/lib/python2.7/site-packages/bots/grammar.py", line 62, in __init__
    self.module,self.grammarname = botslib.botsimport(soortpythonfile,editype + '.' + grammarname)
  File "/usr/lib/python2.7/site-packages/bots/botslib.py", line 554, in botsimport
    raise ScriptImportError(_(u'import error in "$module", error:\n$txt'),module=modulefile,txt=txt)
ScriptImportError: import error in "/usr/lib/python2.7/site-packages/bots/bots.usersys/grammars/edifact.", error:
  File "/usr/lib/python2.7/site-packages/bots/botslib.py", line 548, in botsimport
    module = botsbaseimport(modulepath)
  File "/usr/lib/python2.7/site-packages/bots/botslib.py", line 533, in botsbaseimport
    module = getattr(module, comp)
AttributeError: 'module' object has no attribute ''

henk-jan ebbers

unread,
Feb 18, 2014, 12:37:14 PM2/18/14
to bots...@googlegroups.com

On 02/18/2014 06:19 PM, anastas.s...@calumetspecialty.com wrote:
> After installing edifact_ordertoprint and successfully testing it, I tried the following approaches:
>
> 1. Change the default edifact_ordertoprint route to have outchannel type smtp:
>
> CommunicationOutError: No mail-address for partner "PARTNER1" (channel "smtp_out").
the outgoing file has a frompartner and topartner.
bots will need to know the email-adresses for these partners.
in configuration->partners you cna set this up.

kind regards,
henk-jan

anastas.s...@calumetspecialty.com

unread,
Feb 18, 2014, 12:47:40 PM2/18/14
to bots...@googlegroups.com
It was not clear at first that the PARTNER1 and PARTNER2 had to be defined since they are not explicitly used or mentioned anywhere in the interface (except for when mentioned in error messages); after creating those partners via the GUI, email out is confirmed working.

Thank you very much for your assistance.

henk-jan ebbers

unread,
Feb 18, 2014, 12:48:59 PM2/18/14
to bots...@googlegroups.com

On 02/18/2014 06:19 PM, anastas.s...@calumetspecialty.com wrote:
> 2. Leave the default route and create another route (same id, higher seq value) to an smtp_out outchannel from an smtp_in inchannel of type file. With route fromeditype template-html,
>
I advise to use bots 3.1.0.

kind regards,
henk-jan

henk-jan ebbers

unread,
Feb 18, 2014, 12:51:50 PM2/18/14
to bots...@googlegroups.com

On 02/18/2014 06:47 PM, anastas.s...@calumetspecialty.com wrote:
It was not clear at first that the PARTNER1 and PARTNER2 had to be defined since they are not explicitly used or mentioned anywhere in the interface (except for when mentioned in error messages);
so isn't it cool that the error message indicates that you do not have a email-address for the partner?

kind regards,
henk-jan

after creating those partners via the GUI, email out is confirmed working.

Thank you very much for your assistance.


On Tuesday, February 18, 2014 12:37:14 PM UTC-5, eppye wrote:

On 02/18/2014 06:19 PM, anastas.s...@calumetspecialty.com wrote:
> After installing edifact_ordertoprint and successfully testing it, I tried the following approaches:
>
> 1. Change the default edifact_ordertoprint route to have outchannel type smtp:
>
>     CommunicationOutError: No mail-address for partner "PARTNER1" (channel "smtp_out").
the outgoing file has a frompartner and topartner.
bots will need to know the email-adresses for these partners.
in configuration->partners you cna set this up.

kind regards,
henk-jan

Anastas Stoyanovsky

unread,
Feb 18, 2014, 1:02:40 PM2/18/14
to bots...@googlegroups.com
It is. As a newcomer to BOTS, it wasn't clear to me that those were assumed by the plugin and that they could be set directly from the GUI, or perhaps whether they corresponded to the "seldom used" Advanced config (they don't).

In any case, I have the basic functionality working, with your help, and can tweak it myself as necessary from here. 

Thank you again for the help. I appreciate it.
Reply all
Reply to author
Forward
0 new messages