Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

importing to node-red returns error of data type #8

Open
HaliSyed opened this issue May 19, 2019 · 5 comments
Open

importing to node-red returns error of data type #8

HaliSyed opened this issue May 19, 2019 · 5 comments

Comments

@HaliSyed
Copy link

Following all steps and model is populated properly but while doing test run it returns error

Error 400 An exception occurred during Scoring with message: Value for field name COLUMN2 with datatype ScalarType(string,true) is incorrect.

@chughts
Copy link
Member

chughts commented May 20, 2019

Which test where you running? The hard coded test?

@HaliSyed
Copy link
Author

No the first one run prediction

Error 400 An exception occurred during Scoring with message: Value for field name COLUMN2 with datatype ScalarType(string,true) is incorrect.

@chughts
Copy link
Member

chughts commented May 20, 2019

Please elaborate on 'No the first one run prediction' which test exactly.

@HaliSyed
Copy link
Author

Please accept apology,
I mean on the first step you run the hardcode test which is where you modify run prediction and provide credentials and select the model created on watson studio project

@chughts
Copy link
Member

chughts commented May 21, 2019

If you haven't modified the node with the hard-coded test then it will be building a test for the payload as below. All the columns are floating point / decimal numbers. It looks like you have created a model where column2, and I guess all the others, is a string. Check your data, and ensure that the model builder is picking up the columns as numbers and not strings.

msg.payload = {
    "fields" : [
"COLUMN2","COLUMN3","COLUMN4","COLUMN5","COLUMN6","COLUMN7","COLUMN8","COLUMN9","COLUMN10","COLUMN11","COLUMN12","COLUMN13","COLUMN14","COLUMN15","COLUMN16","COLUMN17","COLUMN18","COLUMN19","COLUMN20","COLUMN21","COLUMN22","COLUMN23","COLUMN24","COLUMN25","COLUMN26","COLUMN27","COLUMN28","COLUMN29","COLUMN30","COLUMN31","COLUMN32","COLUMN33","COLUMN34","COLUMN35","COLUMN36","COLUMN37","COLUMN38","COLUMN39","COLUMN40","COLUMN41","COLUMN42","COLUMN43","COLUMN44","COLUMN45","COLUMN46","COLUMN47","COLUMN48","COLUMN49","COLUMN50","COLUMN51","COLUMN52","COLUMN53","COLUMN54","COLUMN55","COLUMN56","COLUMN57","COLUMN58","COLUMN59","COLUMN60","COLUMN61","COLUMN62","COLUMN63","COLUMN64","COLUMN65","COLUMN66","COLUMN67","COLUMN68","COLUMN69","COLUMN70","COLUMN71","COLUMN72","COLUMN73","COLUMN74","COLUMN75","COLUMN76","COLUMN77","COLUMN78","COLUMN79","COLUMN80","COLUMN81","COLUMN82","COLUMN83","COLUMN84","COLUMN85","COLUMN86","COLUMN87","COLUMN88","COLUMN89","COLUMN90","COLUMN91","COLUMN92","COLUMN93","COLUMN94","COLUMN95","COLUMN96","COLUMN97","COLUMN98","COLUMN99","COLUMN100","COLUMN101","COLUMN102","COLUMN103","COLUMN104","COLUMN105","COLUMN106","COLUMN107","COLUMN108","COLUMN109","COLUMN110","COLUMN111","COLUMN112","COLUMN113","COLUMN114","COLUMN115","COLUMN116","COLUMN117","COLUMN118","COLUMN119","COLUMN120","COLUMN121","COLUMN122","COLUMN123","COLUMN124","COLUMN125","COLUMN126","COLUMN127","COLUMN128","COLUMN129","COLUMN130","COLUMN131","COLUMN132","COLUMN133","COLUMN134","COLUMN135","COLUMN136","COLUMN137","COLUMN138","COLUMN139","COLUMN140","COLUMN141","COLUMN142","COLUMN143","COLUMN144","COLUMN145","COLUMN146","COLUMN147","COLUMN148"        
        ],
    "values" : [
        [-0.00929208493488077,-0.035302459230510876,-0.004403478001268799,0.032802179348434525,0.018434899429040565,-0.005672276747397097,-0.04627383662350263,-0.02694331455013621,-0.009553308206142478,-0.043363063029443594,-0.056051050490726576,-0.019069298802104714,0.009702578646863455,0.019479792514087397,-0.0380266447736687,-0.03306340261969624,-0.022838377430309365,-0.023136918311751315,-0.026085009515990597,-0.009478672985781991,-0.10251147516513043,0.045937978131880434,-0.01664365414038885,0.00671716983244393,-0.023584729633914243,-0.06291749076389148,-0.07023174235921932,-0.02474157554950181,0.0204127327685935,-0.00910549688397955,0.04519162592827555,-0.05392394671045266,-0.04190767623241408,-0.0743739970892264,-0.04295256931746091,-0.08206142478635668,-0.01526290256371982,0.03563831772213307,-0.11527409784677389,-0.024293764227338883,0.015859984326603724,-0.012837257902003955,-0.06825390901966638,-0.07579206627607568,0.013695562936149569,0.07556816061499422,-0.012613352240922492,-0.03354853155203941,-0.03522782401015039,0.005112512594693436,-0.04119864163898944,-0.022203978057245215,-0.051013173116393626,-0.08127775497257156,0.02309960070157107,-0.022129342836884724,-0.09904093741836772,-0.11766242489830951,-0.1873717207150054,-0.2442064410195171,-0.07280665746165615,-0.021047132141657647,-0.1833787364257193,-0.11385602865992461,0.24831137813934395,0.22032317050416092,0.14598649102511474,-0.04825166996305556,-0.15345001306116357,-0.2046497742284584,-0.0743739970892264,0.18289360749337613,-0.02186811956562302,0.4897189983953428,0.11437847520244804,-0.507183639959697,-0.31003470537746763,-0.05314027689666754,0.20117923648169572,-0.11154233682874949,0.2390192932044632,-0.09415233048475576,-0.1797216106280554,0.20729932455125574,0.2560361234466545,-0.4102324887114229,-0.16151061686009627,0.012016270478038587,0.08041944993842594,-0.1369556293614957,0.15367391872224503,0.25540172407359035,0.05433444042243535,-0.392506623875807,-0.0564988618128895,0.3114527745643169,0.07422472664850543,-0.36022689106989586,-0.18341605403589953,0.027391125872299138,-0.034817330298167706,0.01903198119192447,-0.14426988095682353,0.34537448221815875,0.20927715789080867,-0.26864947568757697,-0.1981938276672762,-0.1455386797029518,0.4133671679665634,0.598313244019853,-0.1708400194051573,-0.5391275142739859,-0.5008023286188752,-0.34731499794753146,-0.210396686196216,-0.2355487554577005,-0.2037914691943128,0.08840541851699817,0.11885658842407733,0.24424375862969736,0.13285069224166884,0.03306340261969624,0.12023734000074635,0.10314587453819457,0.12497667649363735,-0.05000559764152704,-0.07885211031085569,0.05373735865955144,0.17195954771056463,-0.025077434041124006,-0.06900026122327126,-0.07780721722580886,0.018994663581744224,0.0442960032839497,0.3780647087360525,0.3271261708400194,0.00772474530731052,0.0719110348173303,-0.35556218979736537,-0.12952942493562714,-0.004813971713251483,-0.12482740605291637,0.2114042616710826,0.04519162592827555,0.2314065007276934,-0.044072097622868234,0.0954584468410643]
    ] 
};
return msg;

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants