UnboundLocalError: local variable 'edifile' referenced before assignment

64 views
Skip to first unread message

KenyonIT

unread,
Nov 18, 2021, 3:54:35 PM11/18/21
to Bots Open Source EDI Translator
Hi All,

Bots 3.2 is returning the following error:
UnboundLocalError: local variable 'edifile' referenced before assignment

This seems to occur when marking a file for rereceive via the web interface, that was originally processed in a route with Fromeditype and  Frommessagetype set to: mailbag

What I would expect is that the editype is detected, then it would move onto the parsing stage knowing which grammar to use. However in this case it does not and leaves the file with an Open status.

Has anyone come across this?


screenshot.255.jpg

Eppye Bots

unread,
Nov 19, 2021, 6:11:11 AM11/19/21
to 'Chuck Turco' via Bots Open Source EDI Translator
yes, I knwo this error.
Will check for fix, have that somewhere.

kind regards, Henk-Jan Ebbers


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/botsmail/726ca7f6-2a87-471b-b258-ee14049e5881n%40googlegroups.com.

Eppye Bots

unread,
Nov 21, 2021, 4:05:00 PM11/21/21
to 'Chuck Turco' via Bots Open Source EDI Translator
can you set 'debug' on in bots? (in config/bots.ini)
that way I knwo in which line the errors occurs?

kind regards, Henk-Jan Ebbers


On Thu, Nov 18, 2021 at 9:54 PM KenyonIT <keny...@gmail.com> wrote:

KenyonIT

unread,
Nov 21, 2021, 9:46:56 PM11/21/21
to Bots Open Source EDI Translator
Hi Henk-Jan,

Here are the details:

errortext: Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/bots/botslib.py", line 333, in wrapper

    terug = func(*args,**argv)

  File "/usr/lib/python2.7/site-packages/bots/transform.py", line 43, in translate

    _translate_one_file(row,routedict,endstatus,userscript,scriptname)

  File "/usr/lib/python2.7/site-packages/bots/transform.py", line 188, in _translate_one_file

    ta_parsed.update(statust=ERROR,errortext=txt,**edifile.ta_info)

UnboundLocalError: local variable 'edifile' referenced before assignment

Eppye Bots

unread,
Nov 25, 2021, 12:22:07 PM11/25/21
to 'Chuck Turco' via Bots Open Source EDI Translator
hard to find.
do you need to use 'mailbag' ? if input is only edifact or x12, use that.

kind regards, Henk-Jan Ebbers


KenyonIT

unread,
Nov 25, 2021, 4:06:32 PM11/25/21
to Bots Open Source EDI Translator
Hi Henk-Jan,

Yes, the files are XML, so we are using the mailbag method.

If you come up with a fix, I am happy to test.

Cheers
Reply all
Reply to author
Forward
0 new messages