[ArgumentException] Invalid string NodeId without namespace index ('ns=')|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
[ArgumentException] Invalid string NodeId without namespace index ('ns=')
Avatar
Fahad Golra
Member
Members
Forum Posts: 3
Member Since:
11/07/2019
sp_UserOfflineSmall Offline
1
10/06/2023 - 08:12
sp_Permalink sp_Print sp_EditHistory

Hello,

I updated the BuildModel.bat (INPUT=.\DemoModel, and %INPUT% instead of %CVSINPUT%) so that it reflects the correct path to the files.  Here it is 

@ECHO off
SETLOCAL

set MODELCOMPILER=..\..\build\bin\Release
et6.0\Opc.Ua.ModelCompiler.exe
set MODEL=DemoModel
set VERSION=v105
set EXCLUDE=Draft
set INPUT=.\DemoModel
set OUTPUT=.
set USEALLOWSUBTYPES=-useAllowSubtypes

ECHO Building Model %MODEL%
ECHO %MODELCOMPILER% compile -version %VERSION% -exclude %EXCLUDE% -d2 “%INPUT%\%MODEL%.xml” -cg “%INPUT%\%MODEL%.csv” -o2 “%OUTPUT%” %USEALLOWSUBTYPES%
%MODELCOMPILER% compile -version %VERSION% -exclude %EXCLUDE% -d2 “%INPUT%\%MODEL%.xml” -cg “%INPUT%\%MODEL%.csv” -o2 “%OUTPUT%” %USEALLOWSUBTYPES%
IF %ERRORLEVEL% NEQ 0 ( ECHO Failed %MODEL% & EXIT /B 3 )

 

However when I am running the bat file.  It is giving me the following error:

Building Model DemoModel
..\..\build\bin\Release
et6.0\Opc.Ua.ModelCompiler.exe compile -version v105 -exclude Draft -d2 “.\DemoModel\DemoModel.xml” -cg “\DemoModel.csv” -o2 “.” -useAllowSubtypes
[ArgumentException] Invalid string NodeId without namespace index (‘ns=’).

========================
at Opc.Ua.NodeId.InternalParse(String text, Boolean namespaceSet)
at Opc.Ua.NodeId.Parse(String text)
at Opc.Ua.NodeId..ctor(String text)
at ModelCompiler.ModelCompilerValidator.AddMethodArguments(MethodDesign method) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 1549
at ModelCompiler.ModelCompilerValidator.ValidateDictionary(ModelDesign dictionary) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 714
at ModelCompiler.ModelCompilerValidator.LoadBuiltInModel() in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 163
at ModelCompiler.ModelCompilerValidator.ValidateModel(IList`1 designFilePaths, String identifierFilePath, Boolean generateIds) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 1379
at ModelCompiler.ModelCompilerValidator.Validate(IList`1 designFilePaths, String identifierFilePath, Boolean generateIds) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelDesignerValidator.cs:line 1101
at ModelCompiler.ModelGenerator2.ValidateAndUpdateIds(IList`1 designFilePaths, String identifierFilePath, UInt32 startId, String specificationVersion, Boolean useAllowSubtypes, IList`1 exclusions, String modelVersion, String modelPublicationDate, Boolean releaseCandidate, Boolean extractIdentifiers) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelGenerator2.cs:line 118
at ModelCompiler.ModelCompilerApplication.<>c__DisplayClass13_0.b__0() in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelCompilerApplication.cs:line 480
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.<>c__DisplayClass143_0.b__0(CancellationToken _)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
at ModelCompiler.ModelCompilerApplication.Run(String[] args) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\ModelCompilerApplication.cs:line 31
at Program.

$(String[] args) in C:\Users\FahadGOLRA\source
epos\OPCF-Members\UA-ModelCompiler\Opc.Ua.ModelCompiler\Program.cs:line 167
========================
Failed DemoModel

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
10/08/2023 - 08:58
sp_Permalink sp_Print

It runs fine for me.

set MODELCOMPILER=..\..\..\build\bin\Release
et6.0\Opc.Ua.ModelCompiler.exe
set MODEL=DemoModel
set VERSION=v105
set EXCLUDE=Draft
set INPUT=.
set CSVINPUT=.
set OUTPUT=.
set USEALLOWSUBTYPES=-useAllowSubtypes

cd UA-ModelCompiler\Tests\DemoModel\DemoModel
..\BuildModel.bat
Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 19
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1446
Posts: 4890