Skip to content

Conversation

@kimssammwu
Copy link

The example code in the Canvas Creation section of the tutorial requires the sys module to run correctly, but the import sys statement was missing.

This change adds the import sys to resolve the error.

@HinTak
Copy link
Collaborator

HinTak commented Oct 6, 2025

Can you explain where the error is triggered? I don't see the use of sys.* nearby.

@kimssammwu kimssammwu force-pushed the fix/missing-sys-import branch 2 times, most recently from 21a3b4d to dab1e0a Compare October 6, 2025 08:15
@kimssammwu
Copy link
Author

Can you explain where the error is triggered? I don't see the use of sys.* nearby.

Hello, thank you for reviewing the Pull Request.

I apologize for the confusion; I've identified the precise reason why the changes were not initially visible.

The issue was a formatting mistake in the file. I mistakenly committed the file without a blank line immediately following the .. code-block:: python directive. This error prevented the code block from rendering correctly when the documentation was built.

The original purpose of the PR was to fix the Code Omission Issue for the missing sys package, which was necessary because sys.platform was being used in two locations:

I have now resolved both the document formatting error and the core code issue.

@HinTak
Copy link
Collaborator

HinTak commented Oct 6, 2025

Okay, my fault : the if sys.platform.startswith("darwin") lines (which I added a while ago) clearly need import sys. I'd prefer you don't change the white space in the 2nd block though (you seems to have added a tab or a bunch of spaces).

The example code in the Canvas Creation section of the tutorial requires the `sys` module to run correctly, but the `import sys` statement was missing.

This change adds the import sys to resolve the error.
@kimssammwu kimssammwu force-pushed the fix/missing-sys-import branch from dab1e0a to e8fc66c Compare October 7, 2025 06:41
@kimssammwu
Copy link
Author

kimssammwu commented Oct 7, 2025

I have made the requested change!

Copy link
Collaborator

@HinTak HinTak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI segfault is #350 . We'll see about fixing that at some point.

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.

2 participants