Quantcast
Channel: Active questions tagged python - Stack Overflow
Browsing all 23305 articles
Browse latest View live
↧

Filtering row with same column date value

I have a datetime field, and I want to filter the rows that has the same date value.models.pyclass EntryMonitoring(models.Model): student = models.ForeignKey('Student', models.DO_NOTHING) clockin =...

View Article


Dockerize my python pyqt6 desktop application

I am quite beginner in docker image creation .I have designed a pythin gui application, which don't use any database etc, just pyqt tables etc are supposed to be displayed.So I tried to dockerize the...

View Article


Why aren't exceptions caught with one-liner while statement?

I have a code with a one-liner while and a try-except statement which behaves weirdly.This prints 'a' on Ctrl+C:try: while True: passexcept KeyboardInterrupt: print("a")and this too:try: i = 0 while...

View Article

How to convert a nested python dictionary into a simple namespace?

Let's say I have a nested dictionary with depth N. How can I convert each inner nested dictionary into a simple namespace?example_input = {key0a: "test", key0b: {key1a: {key2a: {...keyNx}, key2b:...

View Article

importing python modules. Getting Importing Error possible circuit import issue

I am trying to run a command line interpreter. I keep getting an ImportError. my directory are well stuctured and there is no typo in anyway.I have googled and I am getting alot of feedback about...

View Article


How do I get out of a venv in VSCODE?

I made a venv in vscode using python shell to try it out and accidentally deleted all the venv files before deactivating the venv. Now I can't deactivate it.Again, the og files are GONE.I've done some...

View Article

Losing Data writing to socket between C++ and python?

So overall, I'm sending 76,712 bytes over a socket in C++ and in my Python client, I'm seeing that my header that separates frames is showing up 65,536 bytes in. So here's what I've done.In C++, I have...

View Article

How does one Parse Shell Command Help Output To Json Readable Format In...

While working on a project to automate certain processes of installation of an operating system, I've used pandas dataframes to organize certain data into tables and, with the help of third parties,...

View Article


Setting up Google AI Assistant SDK on Raspberry Pi 4

I have followed the guidelines from https://developers.google.com/assistant/sdk/guides/service/python on how to set up Google AI Assistant SDK's and am trying to get it working on my Raspberry Pi 4. I...

View Article


Python3 YoutubeDL shows output even with quiet option

Say I have a script, such as followsimport youtube_dloptions = {"quiet": True,"skip_download": True,"forcetitle": True,"forceurl": True,"format":...

View Article

How to set isActive for different reports in PowerBI?

I have multiple pages in my report. I am trying to set inactive pages in my report as active in order to validate the summarized data for each report.Tried multiple ways to call reports with isActive...

View Article

Image may be NSFW.
Clik here to view.

I'm having trouble centering the logo in this PyQt window

I have divided my central QWidget into two sides: Left and Right. The left side contains the logo, and the right side widget contains the sign-in box. Because I want the sign-in box to be a fixed size...

View Article

Image may be NSFW.
Clik here to view.

Error while loading shared libraries: libmpv.so.1: cannot open shared object...

I've installed flet through "pip install flet" from the terminal on Ubuntu. Upon running the basic flet code, just to check whether it worked this pops up:error while loading shared libraries:...

View Article


How to capture and print Pop-Up alert in Selenium [closed]

I need to be able to capture and print the type of pop-up alert shown in the attached image. I am unable to extract the text from HTML or highlight the text when it pops up.I tried using inspect...

View Article

Image may be NSFW.
Clik here to view.

Make mathematical expression look cleaner from generated question [duplicate]

I'm using a web API from Python code to get randomly generated math questions. However, it uses some kind of markup to show mathematical formulas in plain text. For example, one output I got was:Let (...

View Article


Pandas "ValueError: The truth value of a Series is ambiguous." with Lambda

I have a df for which I want to patch the negative values (replace them with mean of the group).I'm confused as to why the following throws an...

View Article

Why is Python built like this? [closed]

I understand this code:test_variable = 0def test_function(): test_variable = 1test_function()print(test_variable)Because the test_function does not declare a global test_variable, the actual global...

View Article


Python Tkinter Canvas root not recognized [duplicate]

I was trying to code a rectangle in Python Tkinter with the Canvas module, and root is not recognized in the line of code below:rect = tkinter.Canvas(root, width=550, height=820)I was reading off...

View Article

Rewriting URL request function to satisfy GitHub CodeQL server side request...

I'm writing a function that takes a HTTP request from pip for package names, generating a response via FastAPI in the process. However, GitHub CodeQL does not like it, and warns that it is at risk of...

View Article

Predicting phone sales with Python and SARIMAX or other

I am trying to predict sales for phones and there are several factors.launch day can amount to sales for several months up to 6 monthsseasonality plays a huge role, I have about 5 years of...

View Article
Browsing all 23305 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>