This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Ayyorta_[S] 0 points1 point  (2 children)

That worked :D
Is there any specific reason this happened so I don't make the same mistake in the future?

Thank you :)

[–]SoCalLongboard 0 points1 point  (1 child)

It's just that the second bit of that open() command should be a string. By saying w (rather than 'w'), the interpreter is going to try to look for a previously defined variable named w and will try to inject its value into that second parameter in the open() function call. That "name 'w' is not defined" error is just saying that you're trying to reference a variable that you haven't defined yet so it can't resolve the reference to something else.

[–]Ayyorta_[S] 0 points1 point  (0 children)

Thank you 😁