My guess is that you are passing a list instead of a string of text.
In order to put a list into a text field, web2py joins the elements
using a '|'.

In your code I do not see where you do insert.

On Apr 27, 12:36 am, mart <[email protected]> wrote:
> woops! almost forgot, in the sqlite db, the log field will have
> something like this:
>
> |'', 'java.lang.NoClassDefFoundError: org/antlr/Tool\r|Caused by:
> java.lang.ClassNotFoundException: org.antlr.Tool\r|\tat
> java.net.URLClassLoader$1.run(Unknown Source)\r|\tat
> java.security.AccessController.doPrivileged(Native Method)\r|\tat
> java.net.URLClassLoader.findClass(Unknown Source)\r|\tat
> java.lang.ClassLoader.loadClass(Unknown Source)\r|\tat
> sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)\r|\tat
> java.lang.ClassLoader.loadClass(Unknown Source)\r|Could not find the
> main class: org.antlr.Tool.  Program will exit.\r|Exception in thread
> "main" '|
>
> On Apr 27, 1:33 am, mart <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > so, this part is done using DAL (scripted).
>
> > I use subprocess like below to run external scripts and stuff. when
> > failures, I want to dump the log in the DB.
>
> > proc = subprocess.Popen(strCmd,shell=True,
> >                         stdin=subprocess.PIPE,
> >                         stdout=subprocess.PIPE,
> >                         stderr=subprocess.PIPE)
>
> >             if updStr is None:
> >                 out = proc.communicate()
> >                 ... bla bla
> >                 if len(out[1])>0:
>
> > so the resulting 'out[1] gets stored in the DB.
>
> > here's an example of one of the tables:
>
> >         db.define_table('scriptCompiler',
> >                 Field('uuid',length=64,default=uuid.uuid4()),
> >                 Field('cmdName'),
> >                 Field('scriptCompiler_directory'),
> >                 Field('log','text'))
> >         db.commit()
>
> > I use 'text' to provide for larger logs.
>
> > thanks for your help! :)
>
> > Mart
>
> > On Apr 27, 12:03 am, Massimo Di Pierro <[email protected]>
> > wrote:
>
> > > No. Can you provide an example of code that make that happen?
>
> > > On Apr 26, 7:17 pm, mart <[email protected]> wrote:
>
> > > > Hi,
>
> > > > is it expected for a text field to split the text on line breaks and
> > > > insert the '|' character? If yes, is there a way to change that
> > > > behavior?
>
> > > > Thanks,
> > > > Mart :)

Reply via email to