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

I'm having an issue with making pong

I am trying to make pong in python and i can't find out how to make the graphics or character movement work.I tried looking it up on google and I couldn't find relevant sources, can someone help me?I'm...

View Article


Fixtures of Fixtures: Do I import fixtures on which other fixtures depend?

So I have this problem with pytest with fixtures of fixtures.Assume we have a following code. sample_search_page_url is a fixture which depends on fixture sample_query. They are defined in a single...

View Article


Turtle Pong game error after closing window

so im following this tutorial and the game works just fine but when i close the window, it returns an error. it doesnt break the code, it just happens and i dont understand what the error...

View Article

How to debug finish_bundle not being called on Google Cloud Dataflow?

This is a simplified version of the DoFn I run in Google Cloud Dataflow:class ExecuteFn(beam.DoFn): def __init__(): self._records_to_log: list[ExecutionRecord] = [] def setup(self) -> None:...

View Article

I cant install pyautiogui and always get an error

I am runing unbuntu on python3 and am trying to install pyautogui with the command pip3 install pyautogui, every time I do i always recive this error messageERROR: Command errored out with exit status...

View Article


Flask - Invalid input argument received TERMINATING pipeline

I'm having problems with Flask running in a python virtual environment:My app runs just fine when I enter:> flask runWhen I check the version I get what you would expect:> flask --version Python...

View Article

How to set up different sets of class methods in based on an environment...

I am developing a toy crypto project that involves training keras models and then deploying them in AWS lambda. I test the models locally and deploy them as lambda functions in AWS. Some classes are...

View Article

Python Flask TypeError: 'async_generator' object is not iterable

i am trying to make a file streamer from telegram in flaskcode i usedfrom flask import Response@app.route("/dl/<hash>", methods=["GET"])async def download(hash): body = yield_file() return...

View Article


How to reproduce `kneighbors_graph(include_self=True)` using...

My ultimate goal is replace some methods that use kneighbors_graph with transformers from the sklearn-ann package. These all use transformer objects. However, the function I'm trying to replace uses...

View Article


Decrypt & Re-Encrypt Chrome cookies

I'm trying to decrypt Chrome's cookie SQLite DB, and move the decrypted cookies to another computer (browser), and re-encrypt the DB, and replicate sessions.Here is what I plan:Decrypt AES key from...

View Article

Reverse for '' with arguments '('',)' not found. 1 pattern(s) tried

I'm getting this error anytime I click on this submit button on my listing page. I've looked through the typical places that this kind of error is triggered by but I can't see what I'm doing wrong...

View Article

Using Python win32com.client to import Word document HEADINGS (not Headers)

I have a grand total of 3 weeks of very part time experience with PythonThis is close as I have gotten with somebody else's codeimport win32com.clientdef iter_headings(paragraphs): for paragraph in...

View Article

What is the best way to get all the divisors of a number?

Here's the very dumb way:def divisorGenerator(n): for i in xrange(1,n/2+1): if n%i == 0: yield i yield nThe result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one...

View Article


How can I use Python's turtle to draw a bmp image?

I know that Python's turtle can draw pictures, and there are some examples to save the image to an eps file. But I want to save the image to a bmp (bitmap) file. Which library should I use? How can I...

View Article

How to convert an .eps file into a .png in Python 3.6

With Python turtle I'm trying to save the canvas as a png. I've researched it and found a way to save it as an eps file without any modules, but I'm finding it hard to convert the eps file into a...

View Article


Optimization problem for webcam to ASCII using 'rich' library in python

The code for this is in python and goes as followsfrom PIL import Imagefrom rich.console import Consolefrom rich.text import Textfrom cv2 import imwrite, VideoCapturefrom os import system, name#...

View Article

How can I test Turtle library functions with pytest?

Long story short: I'm a middle school computer science teacher who has recently completely lost a program I used to teach Python syntax. I'm trying to rebuild it myself using pytest. My background...

View Article


Alphabetize a List of Names in Python from a list of inputs without being...

I do not have a lot of programing experience, but I've been trying to get a program working were from a number of inputs it can alphabetize a list and print it going up and down without showing any of...

View Article

KeyError at /cart/ 'product_obj' Django

In my cart i can add same product with different size and color.but randomly when i want to to add same product with different size and color i have this error in my cart iter function.i've tracked the...

View Article

Issue with AWS Lambda code. Giving me Error...Unable to figure what is issue...

Issue with AWS Lambda code. Giving me Error...Unable to figure what is issueGiving me error message "missing authentication token" but Authorization is set as None, API Key "Not Required"The Issue is...

View Article
Browsing all 23276 articles
Browse latest View live


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