Category "python-3.x"

self.root.ids is empty even after giving ids in kivyMD

I am trying to create a nice login screen with kivyMD. I am Using Screen Manager to handle different screens. Also I am using MDToolbar and MDBottomNavigationIt

Python how to change formatting of an input when calling a function a second time

I am trying to code this function so that it gets called twice. On the first time it is called, s should be a string 'JSON/image', and the second time it is cal

Python modules erroring out due to trust

All, I'm getting this error "Make this Notebook Trusted to load map: File -> Trust Notebook" when I run the below code in Azure Data Studio v1.33.0. import

ModuleNotFoundError: No module named '_tkinter' Heroku

I am trying to deploy a webapp using Heroku and it get deployed but it gives internal server error when I try to open it. The complete log as from heroku logs -

How to get contact forces in Pymunk?

I am having some trouble using Pymunk. Consider the following scenario, where a ball and a surface have been created and are touching: import pymunk # Create sp

Pandas Method chaining: reassigning a column using df.assign()

I have a dataframe with stock returns in one column, strategy values in another & and another column called trades with boolean values (True, False). My de

My python def's doesnt work as expected when called, why?

I'm a bit stuck because I've already written those functions in Java and they work properly, and then, when "converted" to python, they didn't work as expected.

Creating an error message for an invalid input in python

I have been trying to create a program that creates a list from user input. The program is meant to give an error message to the user input when the length of t

v15: object has no attribute 'generate_report'

Using custom module report_xml to generate xml report. After following normal practices to generate custom report from here on model sale.order, also made my cu

Forming a 3D np array from a 2D array

Let's say I have a 2D array: L = np.array([[1,2,3], [4,5,6], [7,8,9]]) I would like to make a 3D array from this, using a parameter

How to copy local runs from mlflow to remote tracking server?

Dear mlflow community, I am struggeling with a performant environment for both testing and production. What I want to do is, train models locally and compare th

How to get python to tolerate UTF-8 encoding errors

I have a set of UTF-8 texts I have scraped from web pages. I am trying to extract keywords from these files like so: import os import json from rake_nltk import

Is there a pathlib equivalent to os.path.basename under Windows?

When running Python 3.9.5 on Windows 10: Path("c:/temp/one/two/").name == "two" PurePath("c:/temp/one/two/").name == "two" PureWindowsPath("c:/temp/one/two/").n

ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: none) ERROR: No matching distribution found for mathplotlib [closed]

screen shot of the error is here While installing 'matplotlib' I'm facing issue as it shows error message ERROR: Could not find a version tha

I was making a simple calculator using python but I got stuck in a stage [closed]

Here this is my code, I made many mistakes here but I don't know how to fix all the errors. In this code we need to give a number as an input

cx_Freeze can't find local package

I'm using dash to create a standalone desktop app. I want to use cx_Freeze to create an executable for my app. Here's the cx_setup.py file: import sys from set

Django: After updating a template, the changes are not reflected upon refreshing the page in the browser

I am testing a class based view in my Django application. I am currently in development, so I want to see changes in the browser as soon as I make any change in

Selenium on Raspberry Pi headless 2022

I have a weather station and take a screenshot of a webpage (windy.com) once an hour to integrate into my display which runs on a Pi 3 It was working perfectly

How to get real mouse movement, not based on cursor position (python)

Im using windows and python So I want to make a macro in a game, but the game always centers your mouse at the center of the screen. Every mouse movement algori

create key vault client using proxy

Need to create azure keyvault client using proxy setting. Organigation current network policy allowing the calls only via organization proxy using port 80. curr