Opened 5 years ago
Last modified 3 years ago
#5999 assigned defect
icon generator does not work with classnames ending on numeral
Reported by: | Dietmar Winkler | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | blocker | Milestone: | 1.19.0 |
Component: | Scripts | Version: | v1.16.0-dev |
Keywords: | Cc: |
Description
When trying to generate the HTML help for the latest 4.0.0 MSL release I noticed that the generate_icons.py
does not seem to like class names ending on a numeral. So you get an error for ObsoleteModelica4
2020-06-05 23:53:01.154984 Generating SVGs for package(s) ['ObsoleteModelica4'] 2020-06-05 23:53:01,194 - generate_icons.py - INFO - Loading package: ObsoleteModelica4 Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 86, in _run_code exec(code, run_globals) File "/usr/lib/python3.8/cProfile.py", line 196, in <module> main() File "/usr/lib/python3.8/cProfile.py", line 189, in main runctx(code, globs, None, options.outfile, options.sort) File "/usr/lib/python3.8/cProfile.py", line 19, in runctx return _pyprofile._Utils(Profile).runctx(statement, globals, locals, File "/usr/lib/python3.8/profile.py", line 62, in runctx prof.runctx(statement, globals, locals) File "/usr/lib/python3.8/cProfile.py", line 100, in runctx exec(cmd, globals, locals) File "/usr/bin/../share/doc/omc/testmodels/generate_icons.py", line 1335, in <module> sys.exit(main()) File "/usr/bin/../share/doc/omc/testmodels/generate_icons.py", line 1279, in main logger.critical('Failed to load packages in %.1f seconds: %s' % (time.time()-t,omc.sendExpression('getErrorString()'))) File "/home/dietmarw/.venv/ttws3/lib/python3.8/site-packages/OMPython/__init__.py", line 606, in sendExpression answer = OMTypedParser.parseString(result) File "/home/dietmarw/.venv/ttws3/lib/python3.8/site-packages/OMPython/OMTypedParser.py", line 120, in parseString return omcGrammar.parseString(string)[0] File "/home/dietmarw/.venv/ttws3/lib/python3.8/site-packages/pyparsing.py", line 1955, in parseString raise exc File "/home/dietmarw/.venv/ttws3/lib/python3.8/site-packages/pyparsing.py", line 3814, in parseImpl raise ParseException(instring, loc, self.errmsg, self) pyparsing.ParseException: Expected end of text, found '4' (at char 117), (line:2, col:38)
Unfortunately that error will cause also other icons from being generated.
Looking at https://build.openmodelica.org/Documentation/ObsoleteModelica3.html this is an issue that has been around for some time.
Change History (11)
comment:1 by , 5 years ago
Milestone: | Future → 1.17.0 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:2 by , 5 years ago
I also noticed that newly introduced icons like Modelica.Clocked or Modelica.UsersGuide.ReleaseNotes.Version_4_0_0 are not generated at all when generating the HTML documentation for MSL v4.0.0.
comment:3 by , 5 years ago
Priority: | high → blocker |
---|
I'll give this blocker priority so we try to get it done by the next release.
comment:4 by , 5 years ago
Which version of OMPython is this? https://github.com/OpenModelica/OMPython/commit/3b831377 should have fixed this
comment:5 by , 5 years ago
$ pip freeze beautifulsoup4==4.9.1 bs4==0.0.1 future==0.18.2 numpy==1.18.5 OMPython==3.1.2 pyparsing==2.4.7 pyzmq==19.0.1 soupsieve==2.0.1 svgwrite==1.4 zmq==0.0.0
comment:6 by , 5 years ago
Should be fixed by PR: https://github.com/OpenModelica/OpenModelica/pull/950
whenever I can push it through the testsuite.
comment:8 by , 5 years ago
Owner: | changed from | to
---|
Feedback from @dietmarw.
Next problem with the documentation generator. Trying to load "ObsoleteModelica4.mo" does not seem to work with: loadModel(ObsoleteModelica4);
2020-06-15 16:18:33,948 - generate_icons.py - CRITICAL - Failed to load packages in 0.1 seconds: Notification: You can install the requested package using one of the commands: installPackage(ObsoleteModelica4, "4.0.0-master", exactMatch=true) installPackage(ObsoleteModelica4). Error: Failed to load package ObsoleteModelica4 (default) using MODELICAPATH /usr/bin/../lib/omlibrary:/home/dietmarw/.openmodelica/libraries/.
Renaming to "ObsoleteModelica4 4.0.0.mo" and then do a loadModel(ObsoleteModelica4, {relVersion}); where relVerson=4.0.0 did not work either.
Maybe @adrpo could have a look at that, once the 1.16.0 release is out.