[Loris-dev] data_dictionary_builder.php

Christine Rogers christine.rogers at mcgill.ca
Wed Feb 18 14:49:33 EST 2015


Hi Tom,
The Data Dictionary Builder script doesn't seem to be picking up the
field name when parsing your instrument.
e.g. the Insert statement shows : SourceField is NULL, which is
probably what's causing the statement to fail.
also `Name`='BostonNamingTest_',   should be TableName_FieldName not
just 'TableName_'

On which field did this error occur? : the static field you manually
edited, or a page break?  In our experience page breaks created in the
instrument builder should work fine.
Does the static field name manually added to your linst file match
exactly the field name in your mysql instrument table?   Does the
formatting of this line match exactly other static fields?

To troubleshoot you can try running the Data Dictionary Builder again
just for that instrument:
To do so, you'll need to temporarily overwrite ip_output.txt, which
the data_dictionary_builder script reads as input.
First, back up a safe copy of your current ip_output.txt file - you'll
definitely want it again later.
Delete all fields for this instrument from the parameter_type table
(e.g. delete from parameter_type where
`SourceFrom`='BostonNamingTest';  )
Copy your instrument's .linst file to overwrite ip_output.txt then run
the data_dictionary_builder.php script again.
Don't forget to regenerate ip_output.txt for all instruments when done.

cheers,
Christine

On Wed, Feb 18, 2015 at 12:04 PM, Tom Beaudry <waveflux at gmail.com> wrote:
> Hi Everyone,
>
> So the first time I ran the data_dictionary_builder.php script it worked.  I
> just modified a linst file (I added a static field for scoring), and tried
> to run it again to see if I could select that field using the DQT.  I
> deleted the old ip_output.txt file and created a new one.  I then tried to
> run the script but I get this error now:
>
>
> Inserting BostonNamingTest multipleChoice20_status
> canadachina: INSERT INTO parameter_type SET `ParameterTypeID`='294',
> `Name`='BostonNamingTest_multipleChoice20_status',
> `Type`='enum(\'not_answered\')', `Description`=NULL,
> `SourceField`='multipleChoice20_status', `SourceFrom`='BostonNamingTest',
> `CurrentGUITable`='quat_table_2', `Queryable`='1'<br>
> canadachina: SHOW INDEX FROM parameter_type<br>
> 1canadachina: INSERT INTO parameter_type_category_rel SET
> `ParameterTypeID`='294', `ParameterTypeCategoryID`='28'<br>
> canadachina: SHOW INDEX FROM parameter_type_category_rel<br>
> Inserting BostonNamingTest
> canadachina: INSERT INTO parameter_type SET `ParameterTypeID`='598',
> `Name`='BostonNamingTest_', `Type`='page', `Description`='Boston Naming Test
> - Page 3', `SourceField`=NULL, `SourceFrom`='BostonNamingTest',
> `CurrentGUITable`='quat_table_2', `Queryable`='1'<br>
> PHP Fatal error:  Uncaught exception 'Exception' with message 'Insert
> statement did not execute successfully.' in
> /var/www/loris/php/libraries/Database.class.inc:273
> Stack trace:
> #0 /var/www/loris/tools/data_dictionary_builder.php(159):
> Database->insert('parameter_type', Array)
> #1 {main}
>   thrown in /var/www/loris/php/libraries/Database.class.inc on line 273
>
> It seems like it's trying to add my page break into the paramter_type table
> (which I am guessing it shouldn't).  It also jumps from ParamterTypeID 294
> to 598.
>
> Any ideas?  Thanks!
> Tom
>
> _______________________________________________
> Loris-dev mailing list
> Loris-dev at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>



-- 

christine.rogers at mcgill.ca
514.398.7210
NeuroDevNet LORIS data systems
MCIN | McConnell Brain Imaging Centre
Montreal Neurological Institute


More information about the Loris-dev mailing list