All Questions
Tagged with python3 or python-3.x
341,400 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
14
views
Why does asyncio.gather() not propagate cancellation immediately when one task awaits a blocking call?
I am trying to understand task cancellation semantics in asyncio, specifically when asyncio.gather() is used and one of the tasks indirectly blocks the event loop.
import asyncio
import time
async ...
-4
votes
1
answer
45
views
I have a Python function that is supposed to return a list, but sometimes it returns None. When I try to loop over the result, I get this error: [closed]
TypeError: 'NoneType' object is not iterable
def get_users(active=True):
if active:
return ["Alice", "Bob", "Charlie"]
# no return statement here
users = ...
0
votes
0
answers
22
views
KivyMD 2.0.1 MDNavigationDrawerItem not responding when wrapped in a MDNavigationDrawer
Im struggling with non-responsive MDNavigationDrawerItems when they are inside a Navigation Drawer. I'm new at Kivy and KivyMD, so I'm not sure if this is me doing something wrong or a possible bug in ...
-6
votes
1
answer
52
views
One of the addresses with the same code in python is not valid [closed]
AttributeError: 'ModbusIOException' object has no attribute 'registers' ...
What is the reason why I am receiving from the first 2 addresses but not from the third address?
1
vote
2
answers
138
views
Tkinter does not display Frames correctly after grid_remove() under macOS
I have the following problem. I created a desktop application to generate invoices for my dad's company. The machine I wrote this application for is an iMac from 2011 running macOS High Sierra (10.13....
2
votes
1
answer
67
views
In Gimp 3, how to use `curves_spline` and `HISTOGRAM_VALUE` in Python-Fu plug-ins?
I am currently trying to upgrade some Python plug-ins from Gimp 2.10.x to Gimp 3.0.6 (Windows). This is a lot harder than I thought.
I have posted example code for one of the plug-ins at the end of ...
Advice
0
votes
4
replies
132
views
What-if analysis using Python or Excel
I have an important assignment that I have to complete for a new role that I am giving an interview for. And I am having trouble understanding last three questions in order to execute them. It is a ...
Advice
0
votes
6
replies
134
views
Where can I find a quick guide to Python?
I need a Python guide that has everything I need, preferably in text mode. You could say it was like a cheat sheet, the main thing is that it was clear and brief. Ideally, it should include key syntax,...
0
votes
1
answer
43
views
Azure function successfully deployed but shows 4xx error
The function is an http trigger calling an agent from agent foundry:
import azure.functions as func
import logging
import json
import os
from azure.identity import DefaultAzureCredential
from azure.ai....
3
votes
1
answer
262
views
Solving a cubic polynomial using numpy
I intend to design the foundation of an elevated water tank, consisting of a raft with the shape shown in the image below. To do so, I need to determine the raft diameter Dr by solving the following ...
-4
votes
0
answers
74
views
Azure function shows successful deployment message in vs code but not visible in Azure functions app
I have an Azure function that is working locally, but when I deploy it to an Azure function app using VS Code, it shows deployment completed, however it is not visible in the Azure Function app.
This ...
1
vote
0
answers
129
views
Tuple behaving differently upon using id() on IDLE shell and .py file [duplicate]
Suppose I give the exact same tuple value to 2 variables in IDLE shell and compare their id()
>>> a = (1,2,3)
>>> b = (1,2,3)
>>> id(a) == id(b)
False
This gives false as ...
4
votes
2
answers
95
views
How to fix "requests.exceptions.ConnectionError" when using requests library python?
I have been trying to make a scraper that downloads comics from Poorly Drawn Lines but I keep on getting a requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end ...
Best practices
0
votes
2
replies
57
views
Python Inheritance Class Argument NameError
I’ve searched the space of Python nested class inheritance and have read its not best practice. I’ve a NameError on the following:
class A()
pass
class B(A)
pass
I indeed understand ...
0
votes
1
answer
112
views
tkinter TclError After Update to Fedora 43
A few years back I hacked together a tk script to listen for events from frigate and show the camera feed for a few seconds when someone was at the door. It worked without much effort until I updated ...