[Loris-dev] Fwd: data dictionary

Dave MacFarlane david.macfarlane2 at mcgill.ca
Mon Feb 16 12:31:06 EST 2015


Hi Tom,
The parameter_type_category table should have this structure:
mysql> desc parameter_type_category;+-------------------------+-----------------------------------------+------+-----+---------+----------------+| Field                   | Type                                    | Null | Key | Default | Extra          |+-------------------------+-----------------------------------------+------+-----+---------+----------------+| ParameterTypeCategoryID | int(10) unsigned                        | NO   | PRI | NULL    | auto_increment || Name                    | varchar(255)                            | YES  |     | NULL    |                || Type                    | enum('Metavars','Imaging','Instrument') | YES  |     | NULL    |                |+-------------------------+-----------------------------------------+------+-----+---------+----------------+
So I'm fairly certain she means make sure that there's an entry in that table where the "Type" column is equal to "Instrument," (and at leastone parameter_type entry that's in that category) because the first step of the data_dictionary_builder is to delete all the old parameterswhere the Type of the category is "Instrument" before rebuilding.
Since there's nothing in the IN () clause in the statement causing it to be an invalid SQL statement and causing the error, she's assuming thatthe query above it (that gets the ParameterTypeIDs of instrument parameters) is returning nothing.
If you've never successfully gotten it to run, you might also just try commenting out the getColumn line that's throwing the error (and the deleteline below it that'll throw a similar error), since I think it's only used for trying to preserve the same ParameterTypeID for the same column whenit's reinserted.
- Dave
Date: Mon, 16 Feb 2015 12:08:30 -0500
From: waveflux at gmail.com
To: loris-dev at bic.mni.mcgill.ca
Subject: [Loris-dev] Fwd: data dictionary

Hi,
So Rathi sees that this my problem for not getting the data_dictionary to poluate:
select ParameterTypeID from parameter_type_category_rel where ParameterTypeCategoryID in ()<br>PHP Fatal error:  Uncaught exception 'Exception' with message 'Invalid SELECT statement, select ParameterTypeID from parameter_type_category_rel where ParameterTypeCategoryID in ()
See suggested that I:Can you check if the table parameter_type_category has all the columns especially of type Instrument? I have a feeling that you don't have a parameter category Instrument defined hence its failing.
Does anyone know what this means?  what is type of instrument, and how do I add it?  I've included a screen shot of my parameter table.
Thanks!Tom
Rathi
On Fri, Feb 13, 2015 at 8:35 PM, Tom Beaudry <waveflux at gmail.com> wrote:
Hi Rathi,
So i copied this version of the data_dictionary script (https://github.com/aces/Loris/blob/master/tools/data_dictionary_builder.php)
commented out the autoload line,
added:  require_once __DIR__ . "/../php/libraries/NDB_Client.class.inc";

and I get this error:
[lorisadmin at canadachina tools]$ php data_dictionary_builder.php canadachina: SELECT cs.ID as ParentID, child.ID as ChildID,                        cs.AllowMultiple, child.Name                FROM ConfigSettings cs                    LEFT JOIN ConfigSettings child ON (child.Parent=cs.ID)                WHERE cs.Name=:showPearErrors<br>canadachina: SELECT Value FROM Config WHERE ConfigID=:34 LIMIT 1<br>canadachina: Select Name, ParameterTypeID from parameter_type<br>canadachina: select ParameterTypeCategoryID from parameter_type_category where Type = 'Instrument'<br>PHP Warning:  implode(): Invalid arguments passed in /var/www/loris/tools/data_dictionary_builder.php on line 57canadachina: select ParameterTypeID from parameter_type_category_rel where ParameterTypeCategoryID in ()<br>PHP Fatal error:  Uncaught exception 'Exception' with message 'Invalid SELECT statement, select ParameterTypeID from parameter_type_category_rel where ParameterTypeCategoryID in ()' in /var/www/loris/php/libraries/Database.class.inc:458Stack trace:#0 /var/www/loris/tools/data_dictionary_builder.php(239): Database->select('select Paramete...', Array)#1 /var/www/loris/tools/data_dictionary_builder.php(60): getColumn('select Paramete...', Object(Database), NULL)#2 {main}  thrown in /var/www/loris/php/libraries/Database.class.inc on line 458[lorisadmin at canadachina tools]$ 

Any ideas?  Note that I am still using the first public release of LORIS.
thanks,Tom





_______________________________________________
Loris-dev mailing list
Loris-dev at bic.mni.mcgill.ca
http://www.bic.mni.mcgill.ca/mailman/listinfo/loris-dev 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20150216/05408a62/attachment.html>


More information about the Loris-dev mailing list