AttributeError: 'NoneType' object has no attribute 'bind'
enter image description here hi. i try to solve such a problem so that it's give me AttributeError can you help me
See also questions close to this topic
Error loading sdk.dll from Python 36
I try to load dll from Python 36 and getting the below error.
How can I fix this?
Traceback (most recent call last): File "SDK_communicator.py", line 3, in <module> sdkDll = WinDLL("C:\jhgsdk.dll") File "c:\python36\lib\ctypes\__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found from ctypes import * sdkDll = WinDLL("C:\sdk.dll") I also tried: C:\\sdk.dll C:\sdk.dll C:/sdk.dll
- How do I display my html file on my page in Flask
Accessing a database in Unity that's already open in Python Script
So I'm trying to access a SQLite datababase (that is being updated in real time via a Python script) from Unity, and logically getting the error that the file is open in another program. Is there any workaround for this? I just need to read a constantly updating SQLite database (that's being accessed by another program), through a Unity C# script.
Python script not working after changing to root user
I have a python script that switches to root user and tries to create a folder structure. I am executing it from my current user, not root user. The pseudo code is like:
def func1(): #logic to switch to root user def func2(): #logic to create some directories and some processing.
The problem I am facing is after switching to root user, the script is not executing in root level, and the exception/error of func2 I am seeing after switching back to current user.
The element's value is different from that appended to the list
This is a section of my code. When i execute the program the output i get is included beneath the code.
currentPos = playerPosition modifiedCords = freespaceCords pathList =  while(True): adjacentList =  potentialMoveList =  currentPos = currentPos - 1 adjacentList.append(currentPos) print(currentPos) currentPos = currentPos + 2 adjacentList.append(currentPos) print(currentPos) currentPos = currentPos - 1 currentPos = currentPos - 1 adjacentList.append(currentPos) print(currentPos) currentPos = currentPos + 2 adjacentList.append(currentPos) print(currentPos) currentPos = currentPos - 1 print("") print(adjacentList) print("")
[0, 1] [2, 1] [1, 0] [1, 2] [[1, 1], [1, 1], [1, 1], [1, 1]]
I would like the list of 4 elements to contain the previous four individually printed elements such that:
[ [0,1] , [2,1] , [1,0] , [1,2] ]
Please could someone provide a solution to my problem, explain why their solution works and why my code does not.
What is the efficient way to save only the 5% high pixel values of an image with their coordinates?
l have a feature map of
dimension=(340,220,19), at each dimension [1 to 19] l would like to store only the 5 % highest values in the format [x,y,pixel_value, dimension]. Where x and y are the coordinate of the pixel value.
What is the efficient way to do that : JSON file, dictionary ?
Such that l have about 1000, 000 features map like that to process.
how to do a "Save as" window with tkinter?
There is some way to create a save window as without having to do it from scratch in python (tkinter)?
from tkinter import *
Multiple After on Tkinter made the GUI frozen
recently im working using Python with Tkinter gui. The problem is , i want to show some lines by changing its state from hidden to normal within some interval, let's say it 1s.
So , the line will show up 1 by 1 within 1 second. When i tried, the commandline works perfectly(i print some text on windows cmd) But, the gui frozen until the end of the computation then all of the lines showed up(not 1 by 1), idk why? im new with python :(
here's my dummy code
def delay(): allline=mainframe.find_withtag('line') for i in allline: tags=mainframe.gettags(i) print(tags) root.after(1000, mainframe.itemconfigure(tags,state='normal')) ...... mainframe.create_line((50,50,100,100),...,tags=('line1','line'),state='hidden') mainframe.create_line((150,150,100,100),...,tags=('line2','line'),state='hidden')
let's say i have a button which trigger delay function.
Thanks for ur help! sorry for my bad english :)
How to have two bindings simultaneously to the same widget in Tkinter?
I want to to perform a fuction when a certain entry gets focus AND a key is pressed (not just focus alone, nor just key is pressed alone)
I mean something like
entry.bind('<FocusIn>', '<Key>', myFunction)
I kow that I can check for focus first then apply the function when the key is pressed, but I was wondering if I can just make it like above in some way.