Skip to main content

Questions tagged [python]

Python is a dynamically typed, multi-purpose programming language. It is designed to be quick to learn, understand, and use, and enforces a clean and uniform syntax. Note that Python 2 reached end-of-life on January 1st, 2020. For version-specific Python questions, add the version tag (e.g. [python-3.x] or [python-3.9]). When using a Python variant (e.g. Jython, PyPy) or library (e.g. Pandas, NumPy), please include it in the tags.

python
0 votes
0 answers
3 views

ibm_botocore.exceptions.CredentialRetrievalError

I am receiving the following error with the ibm botocore s3 client. ibm_botocore.exceptions.CredentialRetrievalError: Error when retrieving credentials from https://iam.cloud.ibm.com/identity/token: ...
Ftz's user avatar
  • 1
-3 votes
0 answers
14 views

To make a Letterhead consisting of Company Name, Logo, Address using Python , PDFminer, Regex , Canvas, ReportLab and any other tools

Create a letterhead in pdf format,using python in which we can use pdfminer,extract text ,regex, and any other tools as such.That letterhead should contain name, logo of that company and company ...
Craka's user avatar
  • 45
0 votes
0 answers
11 views

pytest failing to generate xml correctly

Unable to generate junit xml file correctly, after a failure generation of the file stops and no further tests are executed. The command works without the junit argument. I have also tried adding '-...
James's user avatar
  • 597
0 votes
0 answers
15 views

Run python code in crontab: "File not found" error

If I run the python file directly there is no problem. However, when running in crontab, error "File not found" occurs. selenium.common.exceptions.InvalidArgumentException: Message: invalid ...
l22hs's user avatar
  • 19
0 votes
1 answer
16 views

Rolling Sum of dataframe columns

I have a dataframe with following values: df = pd.DataFrame({ 'S1':[38.868, 39.231, 39.427, 38.992, 39.071, 39.003], 'S2':[63.631, 63.239, 63.463, 63.675, 63.571, ...
Andrei Filep's user avatar
0 votes
0 answers
15 views

How can number range and value be extracted from this complicated string using Python?

I have a complicated string that includes a kilometer range, and a fee for users that fall into that range. Ideally, I would like to transform the string into something that I could use, to easily ...
Feiznia's user avatar
  • 13
0 votes
0 answers
9 views

Python subprocess.Popen.communicate() does not wait for the process to complete

On Ubuntu 22, using Python 3.10, I need to set up a VPN connection and analyze the response from the VPN server. I do this as follows: connect_command = ['ip', 'netns', 'exec', 'vpn_test_namespace', '...
Serg's user avatar
  • 1
0 votes
0 answers
14 views

How to generate canonicalized element using c14n11

I am signing my XML document using Python's signxml library. Here's my code: signer = XMLSigner( method=methods.enveloped, signature_algorithm="rsa-sha256", ...
Package.JSON's user avatar
0 votes
0 answers
9 views

Variable type of y and subscripting y in Scipy's solve_ivp

I am trying to solve a matrix differential equation in Python using solve_ivp from Scipy, and I have run into some problems. The code returning dy/dt that I have written is the following: def fun(y, t,...
cognition's user avatar
0 votes
0 answers
4 views

Creating a progress bar in python with Numba and Cuda

I'm running a parallel process using numba and CUDA (on windows) that will take quite a while. It would be nice to have an updating progress bar printed in the console, so I can see how far through ...
Gregthepotato's user avatar
-3 votes
0 answers
24 views

I'm trying to use the multiprocessing module on my MacBook to parallelize some computations. On macOS, it throws a RuntimeError

My code works perfectly on Windows, but on macOS, it throws a RuntimeError. Here’s a simplified version of my code (my python version is : 3.10.9 ): import multiprocessing as mp def worker(num): ...
somayyeh's user avatar
-3 votes
0 answers
14 views

Getting AttributeError: 'Worker' object has no attribute 'lastName' in Python3.12 script [closed]

I am trying to run the following code: #!/usr/local/bin/python3 class Worker: def __init__(self, name, pay): self.name = name self.pay = pay def lastName(self): ...
Adrienne's user avatar
0 votes
0 answers
8 views

Python Flet AttributeError: 'list' object has no attribute '_build_add_commands'

I'm currently working on my own project based on Flet's Trolli app example. My Flet version is 0.23.2. Trolli runs without any issues. I just made some modifications to the TrelloApp class in main.py, ...
Eddie's user avatar
  • 1
0 votes
0 answers
8 views

python-Oracledb module not working in AWS Glue

I am trying to connect to my on premise Oracle database using oracledb library in AWS glue. import oracledb connection = oracledb.connect(user="my user", password="mypass", ...
rz01's user avatar
  • 61
-2 votes
1 answer
15 views

RateLimitError: Error code: 429, chatgpt api not working [duplicate]

I want to use chatgpt api for a project. I had an older account with $18 free credit. However, it expired and I created a new account where I got $5 free credit. But still, when I request from the API,...
Safi Ahmed's user avatar

15 30 50 per page
1
2 3 4 5
23