Skip to content

fix: pass output_folder to create_html_page in gen_image - #38

Open
Jah-yee wants to merge 1 commit into
mxmssh:masterfrom
Jah-yee:fix/missing-output-folder-arg
Open

Jah-yee wants to merge 1 commit into
mxmssh:masterfrom
Jah-yee:fix/missing-output-folder-arg

Conversation

@Jah-yee

@Jah-yee Jah-yee commented Oct 3, 2026

Copy link
Copy Markdown

Summary

The gen_image function in api_calls_viz/api_calls_vis_python3.py calls create_html_page(html_page_name) but the function signature is create_html_page(name, output_folder), requiring output_folder as a second argument.

When running with the -ht/--html flag, the script crashes with:

TypeError: create_html_page() missing 1 required positional argument: 'output_folder'

Fix

Pass output_folder as the second argument to create_html_page in gen_image.

Testing

python api_calls_viz/api_calls_vis_python3.py -t trace.log -i out.jpeg -ht out.html -of output

now writes all three outputs (image, legend HTML, page HTML) without crashing.

Fixes #36. GH007.

create_html_page(name, output_folder) requires output_folder argument
but gen_image() called it as create_html_page(html_page_name),
causing TypeError when --html flag is used.

Fix: add output_folder argument to the create_html_page call.

Fixes mxmssh#36. GH007.
@Jah-yee

Jah-yee commented Oct 26, 2026

Copy link
Copy Markdown
Author

Hi — this has been open for a while, so I am checking whether it is still wanted.

In api_calls_viz/api_calls_vis_python3.py, gen_image calls create_html_page(html_page_name) around line 218, but the function is defined as create_html_page(name, output_folder) around line 118. That call therefore raises TypeError: create_html_page() missing 1 required positional argument: 'output_folder'.

This PR passes output_folder through, which matches the neighbouring create_image(dots, image_name, output_folder) and create_html_legend(image_name, output_folder) calls. It is a one-line change with no other behavioural difference. Let me know whether the legacy api_calls_vis.py variant should be handled separately.

@Jah-yee

Jah-yee commented Nov 2, 2026

Copy link
Copy Markdown
Author

Checking in on the gen_image crash fix in api_calls_viz/api_calls_vis_python3.py: create_html_page is declared as create_html_page(name, output_folder), but the gen_image call site only passed html_page_name, so running with the --html flag died with TypeError: create_html_page() missing 1 required positional argument: 'output_folder'.

The second argument is now forwarded from the same value the rest of the script uses for its output. If the output directory is meant to come from a different flag, say so and I will adjust the call site.

Warmly,
RoomWithOutRoof

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 this pull request may close these issues.

Python 3 visualizer crashes when --html is used

1 participant