Yahoo Search Busca da Web

Resultado da Busca

  1. Because canvas was never defined. This line: self.canvas = Canvas(self.main_window,width = self.__CANVAS_WIDTH,height = self.__CANVAS_HEIGHT) defines it as an attribute on self. So change all of the canvas.create_arc calls to self.canvas.create_arc

  2. So I'm having an issue, whenever I open the shop window, click the Attack Up 1 button, when the command it's attached to runs, it says that the attackUp1 variable is not defined even though it is set to be the widget. Have a peak at my code: #opens shop canvas where you buy upgrades.

  3. 25 de out. de 2018 · Author. saurabhbidwai commented on Oct 26, 2018. this is working. w = tk.Canvas (master, width=canvas_width, height=canvas_height + 20)

  4. 25 de fev. de 2015 · You are calling the wrong class. What you need to call is mapCanvas, and not canvas. Change your code to this: allLayers = iface.mapCanvas().layers() for i in allLayers: print i.name() This will print all of your current layers' names. Also note that you need to indent the print line.

  5. 30 de jun. de 2021 · funcao() print(x) # NameError: name 'x' is not defined. Veja que depois de executar a função, a variável x não está acessível fora dela. Afinal, x foi declarado dentro de funcao e só existe ali dentro (o escopo desta variável é a função, fora dali ninguém consegue "ver" o x ).

  6. 1 de ago. de 2020 · A NameError means that you’ve tried to use a variable that does not yet exist. In this guide, we’re going to talk about the “nameerror name is not defined” error and why it is raised. We’ll walk through a few example solutions to this error to help you understand how to resolve it in your code. Find your bootcamp match. Select Your Interest.

  7. 8 de abr. de 2024 · The "NameError: name is not defined" error occurs for multiple reasons: Accessing a variable that doesn't exist. Accessing a variable, function or class before it is declared. Misspelling the name of a variable, a function or a class (names are case-sensitive). Not wrapping a string in quotes, e.g. print(hello).