Error when trying to overload an operator “/”

I recently start teaching myself game programming. Someone recommend me to start with Python and I got the book “Beginning game development with Python and Pygame: From novice to professional”. I got to a part where they teach about Vectors and creating a Vector2 class. Everything was going well until I tried to overload the division operator.
My code goes like this:

Calling a PyGame Function, from clicking a Object-Orientated PyGame Button

import pygame as pg import sys pg.init() buttonFont = pg.font.SysFont("garamond", 25) screenGray = pg.Color('gray80') buttonGray2 = pg.Color('gray50') textColour = pg.Color('navy') screen = pg.display.set_mode((800, 600)) clock = pg.time.Clock() class Button(pg.sprite.Sprite): def __init__(self, text, x, y, width, height, colour): super().__init__() self.image = pg.Surface((width, height)) self.image.fill(colour) self.rect = self.image.get_rect() txt = buttonFont.render(text, True, textColour) txtRect = txt.get_rect(center = … Read more

cx_Freeze converted GUI-app (tkinter) crashes after pressing plot button

I’ve been dealing with this for days now and hope to find some help. I developed a GUI-application with imported modules tkinter, numpy, scipy, matplotlib, which runs fine in python itself. After having converted to an exe everything works as expected, but NOT the matplotlib section. When I press my defined plot button, the exe simply closes and doesn’t show any plots.
So I thought to make a minimal example, where I simply plot a sin-function and I’m facing the same issue:
Works perfect in python, when converting it to an exe it crashes when pressing the plot button. Here is the minimal example: