python-3.x Questions

2

Solved

Im working with a django project(im pretty new to django) and running into an issue passing a model object between my view and a celery task. I am taking input from a form which contains several Mo...
Lump asked 11/2, 2021 at 18:20

2

Solved

How do I make the horizontal axis pass through the origin? import numpy as np import matplotlib.pyplot as plt rateList=[0,0.08,.1,.12,.15,.175,.225,.25,.275,.3,.325,.35] list1=[-316.8,-424,-2.8,...
Amberlyamberoid asked 17/5, 2017 at 5:30

2

Solved

I develop telegram bot using python-telegram-bot. Despite the usage of MessageQueue (just as mentioned in the docs) I keep getting telegram.error.RetryAfter: Flood control exceeded. Retry in N seco...
Lollygag asked 19/7, 2018 at 12:48

3

Solved

I am trying to connect to our remote sql server db via Jupyter Labs using the SQL magics. I can connect with a traditional connection string, but the SQL magics doesnt seem to work (which means I a...
Habiliment asked 7/5, 2019 at 22:39

3

Solved

Context: I'm building a car dealership app using Django 3.1.4, and trying to implement a feature where by every time a new ad is created, so is a new folder (via the upload_to method) within /media...

1

I am trying to implement the lru_cache on a function that takes in a python object as an argument. The function should return a cached value only if it's argument's attributes have not changed. How...
Eliathan asked 12/5, 2020 at 20:1

2

I'm developping an API and deploying it on Google Cloud Run. There is a prestart python script that import pandas and numpy. When I time the imports numpy take about 2 seconds and pandas about 4 se...

3

Solved

I am running Pylint on the GitHub actions. Before it runs, it installs the module playsound during the dependencies installation. The checks all failed with Python 3.8, 3.9, and 3.10. It seems to f...
Restore asked 30/4, 2023 at 15:28

10

Solved

So, I am trying to create a program which counts the number of characters in a string which the user inputs, but I want to discard any spaces that the user enters. def main(): full_name = str(inp...
Compile asked 29/10, 2013 at 20:59

4

Solved

I have built my own opencv python package from source. import cv2 print(cv2.__version__) prints: 3.4.5 Now the issue I am facing is regarding the use of gstreamer from the VideoCapture class o...
Acidforming asked 8/1, 2019 at 16:16

2

Solved

I am using PyQt5 to make a GUI. On it, I have a QComboBox that has a dropdown list that has over 400 items. I was wondering if there is any way in which I can type into the QComboBox to search for ...
Bora asked 29/4, 2020 at 17:46

5

Solved

Question Why do virtual subclasses of an abstract Exception created using the ABCMeta.register not match under the except clause? Background I'd like to ensure that exceptions that get thrown by...
Snapshot asked 12/4, 2018 at 16:16

2

Solved

I'm trying to parse a mathematical expression using pyparsing. I know i could just copy the example calculator from pyparsing site, but i want to understand it so i can add to it later. And i'm her...
Byyourleave asked 27/5, 2014 at 1:26

2

I have been using unittest.IsolatedAsyncioTestCase to test my async methods. I have been making use of setUpClass and asyncSetUp to create a fixture, and asyncTearDown to cleanup. This is all worki...
Lucubration asked 11/4, 2023 at 16:40

3

I have Python 3.8 installed alongside SQLite 3.16.2 on Debian 9.12 and I need to upgrade to a newer version of SQLite. I've downloaded and compiled the amalgamation available on the SQLite's site, ...
Ulrikeulster asked 22/6, 2020 at 20:43

3

Solved

I've wrote my code for Longest Common Prefix in LeetCode, but it was returned "Time Limit Exceeded". There is no specific error message, so I have no idea how to fix my code to pass test cases. c...
Moon asked 14/9, 2019 at 1:50

11

Solved

I am trying to import imblearn into my python notebook after installing the required modules. However, I am getting the following error: Additional info: I am using a virtual environment in Visual...
Malvoisie asked 1/7, 2023 at 8:52

5

I am trying to install the requests package for Python 3.7 on Mac. I already have python 2.7 installed. I have read all the previous questions related to this and none of them could solve the issue...
Doodle asked 19/2, 2020 at 21:19

2

Solved

I am using StackAPI to get the most voted questions and the most voted answers to those questions:- from stackapi import StackAPI SITE = StackAPI('stackoverflow') SITE.max_pages=1 SITE.page_size=1...
Reptant asked 12/12, 2018 at 16:41

4

Solved

I want to filter all duplicated rows from a polars dataframe. What I've tried: df = pl.DataFrame([['1', '1', '1', '1'], ['7', '7', '2', '7'], ['3', '9', '3', '9']]) df shape: (4, 3) ┌──────────┬──...
Velate asked 4/5, 2022 at 11:53

3

I would like to find (in python) the local minimum and maximum values in OHLC data, under the condition that the distance between these values is at least +-5%. Temporal Condition Note that for an...
Rehnberg asked 6/7, 2023 at 13:20

8

Solved

Given is a variable that contains a windows file path. I have to then go and read this file. The problem here is that the path contains escape characters, and I can't seem to get rid of it. I check...
Unilobed asked 1/10, 2018 at 14:34

6

Solved

I have created a new virtual env and trying to connect with the VS code. When I open the folder in VS code that contains the file and virtual env, on the left bottom side I can see the python inter...
Tailstock asked 31/8, 2020 at 21:4

3

Solved

I am searching for this for ages now. Is it so hard to get the height/width of a Canvas in tkinter? I want to do something like this: c = Tk.Canvas(self, heigth=12, width=12) c.create_oval(0, 0, se...
Nolly asked 7/3, 2021 at 12:57

3

I recently ported my scripts from 2.x to 3.x. During production runs through automation (rundeck) we are seeing errors caused by the logger not handling blocking I/O. Any ideas how to resolve would...
Dieback asked 14/1, 2019 at 16:53

© 2022 - 2024 — McMap. All rights reserved.