hey Henk-Jan,
I try to build an JIT-delivery-process for car industry in a smaller scale for later research purposes.
Therefor i use Bots as an EDI interpreter.
btw can you tell me what Bots mean with:
File "C:\Python27\lib\site-packages\bots\communication.py", line 1683,
in outcommunicate
botslib.runscript(self.userscript,self.scriptname,'outcommunicate',channeldict=self.channeldict,dbconnection=self.dbconnection,db_object=db_object)
File "C:\Python27\lib\site-packages\bots\botslib.py", line 618, in
runscript
raise ScriptError(_(u'Script file "$filename":
"$txt".'),filename=modulefile,txt=txt)
ScriptError: Script file
"C:\Python27\lib\site-packages\bots\bots.usersys\communicationscripts\importarticlesxml_out":
" File "C:\Python27\lib\site-packages\bots\botslib.py", line 615, in
runscript
return functiontorun(**argv)
Is there any function or attribute incorrect?
This is my actual script:
import MySQLdb as mdb
import sys
def connect(channeldict):
return mdb.connect('localhost','root','','ibox_control')
def outcommunicate(channeldict, dbconnection,db_object):
cursor = dbconnection.cursor()
for article in db_object:
cursor.execute(u'''INSERT INTO ccode (ccodeid_id, leftcode, rightcode)
VALUES("%(ccodeid)s, %(leftcode)s, %(rightcode)s")''',
article)
connect.commit()
cursor.close()
def disconnect(channeldict, dbconnection):
dbconnection.close()
Any ideas?
kind regards,
jan