Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [python-3.x]

DO NOT USE UNLESS YOUR QUESTION IS FOR PYTHON 3 ONLY. Always use alongside the standard [python] tag.

python-3.x
0 votes
0 answers
7 views

Extract url from google news rss feed

I had a code that was extracting google rss url but that is not working looks like google have changed encoding of the url. Example url: "https://news.google.com/rss/articles/...
0 votes
0 answers
39 views

Encrypting a file in chunks using AES-GCM

I want to write a generator that encrypts a file in chunks of given size and returns the chunks one-by-one. I also want to authenticate the payload hence I have chosen AES-GCM for this. Why am I ...
64 votes
6 answers
47k views

Jupyter notebook never finishes processing using multiprocessing (Python 3)

Jupyter Notebook I am using multiprocessing module basically, I am still learning the capabilities of multiprocessing. I am using the book by Dusty Phillips and this code belongs to it. import ...
1 vote
2 answers
20k views

Print a python output to an html file

I am writing a script to print the output to an html file. I am stuck on the format of my output. Below is my code: def printTohtml(Alist): myfile = open('zip_files.html', 'w') html = """<...
-6 votes
0 answers
25 views

forming a reverse function in python [duplicate]

so I have been trying to find out how can I reverse a given array input : y = [] x = [1 , 2, 3, 4, 5, 6 ] for i in x : j = x[-1] j -= x[-1] y.append(j) print(y) output : \[0, 0, 0, 0, 0,...
1 vote
1 answer
140 views

Get tar file buffer without write to file with Python

I know how to tar file using Python import os import tarfile with tarfile.open('res.tar.gz','w:xz' )as tar : tar.add('Pic.jpeg') But I want to do that without create any tar.gz file, only get the ...
0 votes
1 answer
105 views
+50

Module import error for PYTHON_PYLINT when using super-linter/[email protected]

I've been working on getting super-linter within a GitHub Action to accept my recent Python project import for a while now without success. I am using py3langid to detect English language in a pretty ...
2 votes
2 answers
1k views

How to zip files properly on mac for unzipping via python from s3?

I have a series of text files in a folder that I want to zip. I compress the folder and produce a zip file. When I programmtically call the zipfile I get an error: BadZipFile: File is not a zip file. ...
0 votes
1 answer
468 views

Python Pandas to match a string based on the prefix

I have a code below where I'm parsing a hostname text file with pd.read_csv and getting them matched based on the prefix , that works fine. However, as now there is a requirement where in sj12 I need ...
0 votes
2 answers
1k views

Python Telegram Bot does not receive data from the web mini-app

I am developing a Telegram bot in Python which must receive data from a web mini-app. The mini-app is supposed to send data to the bot when the user clicks a button. I followed the official Telegram ...
0 votes
0 answers
12 views

ModuleNotFoundError: No module named 'paramiko.auth_strategy' while using fab2 python

I'm trying to execute a python task using fab. I've installed fab2 for python3 and trying to use it to run the task in a venv. Unfortunately using fab2 keeps giving me this error: (venv) My-MacBook-...
7 votes
4 answers
6k views

TypeError: issubclass() arg 1 must be a class when importing langchain in Flask

I am doing a microservice with a document loader, and the app can't launch at the import level, when trying to import langchain's UnstructuredMarkdownLoader $ flask --app main run --debug Traceback (...
0 votes
0 answers
7 views

Administrator functions in aiogram

Greetings, dear ones. First, I will introduce you to the essence of the bot's work. There is an administrator (one telegram id), and he should receive notifications about ordinary users who write /...
0 votes
0 answers
6 views

How to call Power Point macro function from python without win32com

I'm currently working on a python program (I'm new to python) that modifies a Power Point template that is for official releases. Unfortunately after my program finishes, I need to run the macro. My ...
1 vote
2 answers
53 views

Writing atomic functions in Python

In many systems, transactions are used to group operations together so that they are atomic—meaning they either all succeed or all fail. However, in Python itself does not seem to have built-in ...

15 30 50 per page
1
2 3 4 5
22901