a problem with several libraries in python [closed] - python

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 days ago.
Improve this question
I'm writing an app that tracks time worked and shows it in the task bar (windows 10)
using several libraries that I haven't used before. Although there is an established connection between the app and the win32 api there is nothing displayed in taskbar. only python icon.
when I run it I receive this messge :
WNDPROC return value cannot be converted to LRESULT
TypeError: WPARAM is simple, so must be an int object (got NoneType)
every time the app is supposed to send/update information in taskbar
can someone help me figure out where is the problem and how to fix it?
do you guys know any other libraries or ways I can connect to winapi or less problematic solutions ?
here is the code: https://pastebin.com/nMHUUAe9
thanks
when I run the script it gives this error message
WNDPROC return value cannot be converted to LRESULT
TypeError: WPARAM is simple, so must be an int object (got NoneType)

Related

SocketIO(app) missing required positional argument 'mode' [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I'm trying to get the simple example of Flask-SocketIO working, but I'm getting an error saying I'm missing a required positional argument 'mode', even though the documentation / official example don't show such a parameter:
After a lot of head-scratching, I realized it was happening because I accidentally imported the wrong SocketIO with my IDE: I imported socket.SocketIO instead of flask_socketio.SocketIO. When I fixed the import statement the error went away.

I am stuck at TypeError in tkinter. How to fix it? Please guide me [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I was making a python reader project and wanted to make a python reader (In which the python will read what you wrote in the entry) it works fine but when I write something in the entry it gives me a type error:
and my code:
The problem is somewhere after clicking a read button before that it works just like I want but after clicking the button the problem happens.
Your function funcation is defined to be given str in line 18
def funcation(str):
but you're calling the function without any arguments from reader_btn in line 38: funcation
what you want to do is passing the text variable containing the string like
command=lambda: funcation(text)
from your reader_btn
EDIT:
or probably better read the value of your entry when the button is pressed:
command=lambda: funcation(text_place.get())
thanks to quamrana for pointing that out

Getting errors when copying exact code from Codecademy [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
So I am completely new to any programming language and really want to learn it this time (multiple attempts) and these things aren't making it any better. I must be doing something completely simple completely wrong. shows my example.
Taking code from codecademy and putting it directly into the IDE creates errors. I am using the 2.7 interpreter as that is what codecademy uses as well. I tried indents but nothing so far. Anyone care to blow my mind on how simple a fix this is?
You are using Python 3.4. Figured it out from the interpreter selected by Eclipse. Try changing the interpreter to 2.7. It should work.
As far as I can see from the screen shot, you are trying to do:
>>> from datetime import datetime
>>> now = datetime.now()
>>> print '%s/%s/%s' % (now.year, now.month, now.day)
2015/12/24
And it actually works on my client. (Python 2.7) I cannot see your error clearly but probably it is because you are (for some reason) trying to run it with Python 3.

PIL Image.size() not working [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I have some simple code to load an image file in and then display it's size, using Pillow fork and their documentation on how to find image attributes.
This is a code snippet taken from a larger file, but I don't think any of the other parts should have any bearing on PIL. I need to get the image header file, size in particular so I can convert it into a particular format for a machine learning project that takes a particular input array. Below is what I understand the documentation to be telling me to do.
from PIL import Image
im = Image.open("test.jpg")
print im
print im.size()
This is the error I get when I run this
File "DataStorage.py", line 31, in <module>
print im.size()
TypeError: 'tuple' object is not callable
size is an attribute, not a method of the image object. Just type im.size without the brackets.
Note that this is basically hinted at by the error message:
TypeError: 'tuple' object is not callable
"callable" refers to the action of calling something, usually by adding parentheses () to an object. Here, the error message was pointing out that you were actually performing a calling operation like this:
(1,2)() # attempting to "call" a tuple will result in a TypeError

Getting Pycuda to work with Mpi4py on 2 gpus [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I am trying to run a pycuda program across two gpus. I have read a great post by Talonmies explaining how you do it with the threading library, the post also mentioned this is possible with mpi4py.
When I run mpi4py with pycuda, program gives the error:
self.ctx = driver.Device(gpuid).max_context
pycuda._driver.logicError: cuDeviceGet failed: not initialized
Perhaps this is due to my attempt to initalize two of the gpu devices simutanously. Does anyone have a very short example of how we can get 2 gpus working with mpi4py?
For anyone who chances upon this question, here is a working mpi4py+pycuda example.

Categories