Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'replace' of null #106

Closed
mwetter opened this issue Feb 20, 2020 · 2 comments · Fixed by #136
Closed

TypeError: Cannot read property 'replace' of null #106

mwetter opened this issue Feb 20, 2020 · 2 comments · Fixed by #136
Assignees

Comments

@mwetter
Copy link
Member

mwetter commented Feb 20, 2020

The following commands fail

git clone git@github.com:lbl-srg/modelica-buildings.git
cd modelica-buildings
git checkout 067b6e41640a5813fad108b61196402ff5d82da8
cd -

git clone git@github.com:lbl-srg/modelica-json.git
cd modelica-json/
make install
make compile
node app.js -f ../modelica-buildings/Buildings/Examples/Tutorial/CDL -o docx -m modelica -d out

The error message is

warn:    Instance "vol" has no comment. Check Buildings.Examples.Tutorial.CDL.BaseClasses.PartialOpenLoop
warn:    Instance "spl2" has no comment. Check Buildings.Examples.Tutorial.CDL.BaseClasses.PartialOpenLoop
warn:    Instance "weaBus" has no comment. Check Buildings.Examples.Tutorial.CDL.BaseClasses.PartialOpenLoop
warn:    Instance "conEquSta" has no comment. Check Buildings.Examples.Tutorial.CDL.Controls.Validation.EquipmentOnOff
warn:    Instance "conRadSup" has no comment. Check Buildings.Examples.Tutorial.CDL.Controls.Validation.RadiatorSupply
warn:    Instance "conSysSta" has no comment. Check Buildings.Examples.Tutorial.CDL.Controls.Validation.SystemOnOff
/home/mwetter/test/modelica-json/lib/jsonquery.js:118
    'comment': getComment(model).replace(/"/g, ''),
                                ^

TypeError: Cannot read property 'replace' of null
    at Object.simplifyModelicaJSON (/home/mwetter/test/modelica-json/lib/jsonquery.js:118:33)
    at getJsons (/home/mwetter/test/modelica-json/lib/parser.js:180:19)
    at Object.getJSON (/home/mwetter/test/modelica-json/lib/parser.js:147:21)
    at Object.<anonymous> (/home/mwetter/test/modelica-json/app.js:76:15)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
@mwetter
Copy link
Member Author

mwetter commented Jun 16, 2020

@JayHuLBL : Can you please correct this. It it still broken on my system.

@JayHuLBL JayHuLBL mentioned this issue Jun 16, 2020
2 tasks
@JayHuLBL
Copy link
Contributor

To do:

  • add the commit number of the update to MBL CI test process

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

Successfully merging a pull request may close this issue.

2 participants