MFix Local Documentation Link Issue

Hello,

I’m using the latest 26.1 release but this minor issue is also applicable to other recent releases such as 25.X.

When attempting to access the local documentation on Windows 11, clicking the link in the GUI seems to be broken/not do anything?

If I copy the link address it has a mixture of \ and / in the path to the html file which I appreciate may be for cross platform support (\ for legacy windows) and (/ for unix or web) but is the slash inconsistency causing the problem or something else?

image

If I recall correctly this did work as expected in even older releases like 23/24.

Thanks

Thanks for reporting this and sorry for the trouble.

Although the backslashes in the URL look odd, they are actually OK for a file:// URL and are not the cause of the problem.

The real problem is that the URL starts with file://C:/

In the URL syntax, the component after :// is treated as a hostname. For a file on the local machine, three slashes are required. (I did not design this! How are you

You can fix this by editing
%CONDA_PREFIX%\Lib\site-packages\mfixgui\file_menu\help_widget.py
and changing line 30 from:

                     else "file://" + docs + "/index.html")

to

                     else "file:///" + docs + "/index.html")

(On Unix, “docs” is an absolute path starting with / so the third slash comes from there in the original code.)

This will be fixed in the next release.

If you want to change the \ to / you can edit
%CONDA_PREFIX%\Lib\site-packages\mfixgui\tools\paths.py
and change line 32 from

           mfix_doc_html = x

to

           mfix_doc_html = x.replace("\\", "/")

but this is not necessary.

Thanks for the report! Happy MFiXing.

– Charles

1 Like