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

How do I write code to calculate the integral of a set of numbers using the...

I can't seem to figure out how to get the right value for my integral. I'm not getting an error and when I test the separate elements of my function it seems to give me back all the right values but...

View Article


How can I open two web socket questions in Python on a local flask server?

Basically just the title, very poor understanding of web sockets. How can I open two websockets in my Python program?I'm not sure if I should use multiple web socket imports. I attempted to use...

View Article


Parsing topselling games from Steam

I need to get a list of games and put into the data base, which contains info about gameThere is a link: https://store.steampowered.com/charts/topselling/globalimport requestsfrom bs4 import...

View Article

Using Selenium to make Amazon Product Info Scraper

I am new to all these, but i want to make an amazon product detail scrapper with python.I made some searches and find a code . I also made some improvements (such as div, span names etc.) and this is...

View Article

Python binance websocket stream code for getting user data and coin price

I am trying to get binance futures data from a websocket stream. I've gone through all the binance documentation tried several different python approaches, but don't seem to be successfull.I am running...

View Article


Poetry forces use of old version of Mypy

Poetry yields the following error on request to upgrade mypy:<your-project> depends on both mypy (^0.812) and mypy (^0.761), version solving failedmypy v0.761 considers type specification with...

View Article

Surpringly difficult conversion from multi-line string to Pandas dataframe

I used a chatgpt AI assistant to pull data from a PDF which it did successfully. However I am struggling to convert this string output to a Python dictionary, though the ultimate goal is to make it a...

View Article

Why i got an error when i execute cdktf deploy?

i code in python to manage aws stuff (i'm a beginner)i got this problem when i cdktf deploy :Error: Retrieving AWS account details: validating provider credentials: retrieving caller identity from STS:...

View Article


keras 3.*, tensorflow 2.16 and keras 2.* compatibility problem

TensorFlow Version: 2.16.1Keras Version: 3.3.3tf_keras Version: 2.16.0Issue Description:I encountered an error while running my training script training_holdout.py with the following command:export...

View Article


Python installer: "0x80070642 - User cancelled installation"

Whenever I try to install Python 3.6.3 (32-bit) to my Windows 7 laptop at work, the installer fails with the following error.0x80070642 - User cancelled installationThis error consistently occurs...

View Article

Network traffic monitor with pcapy in python

I have written simple network traffic monitor to get transfer rate in B/s and/or total data transfer (in B). However when I test it by transferring a file with ftp (using Total Commander) I just can...

View Article

Python telegram bot via proxy with authentification

everyone.I am trying to create a simple telegram bot. In my country telegram is blocked so I need to work via proxy.from telegram.ext import Updater from telegram.ext import CommandHandler import osdef...

View Article

How to shutdown Flask server and restart it with a different IP from the same...

Here is the Flask setup for the problem.import threadingfrom flask import Flask, requestapp = Flask(__name__)@app.route('/')def hello(): return 'Hello, World!'@app.route('/restart', methods=['GET'])def...

View Article


Python tkinter close first window while opening second window

I'm trying to close the first window as the second window opens. Both windows close, or the first window closes and the second window never opens.This question has a similar problem but was solved by...

View Article

save and load keras transformer model

i am still new to deep learning right now i follow this keras tutorial to make an translation model using transformer here the link. Everything works just fine but i have no idea how to save the model,...

View Article


Google gemini generate_content is not working in python API using function...

I'm trying to make the same request that I did in CURL which works. But in Python is not working.The gemini docs:https://ai.google.dev/gemini-api/docs/function-calling?hl=pt-br#multi-turn-example-1The...

View Article

Django views file says [closed]

So i have the folloing error: didn't return an HttpResponse object. It returned None instead.And from what I read it was due to to not having a render in the return line, however after checking...

View Article


How to add stacked bar plot in a subplot in Plotly?

I have a data frame df, it has over 100 columns, I want to plot a stacked bar plot for these 100 columns, plotly.express is very nice, I can just do thisimport plotly.express as px# df.columns =...

View Article

Run parallel function on Apple GPU/metal in Python

I have a rather simple function that runs quite fast in parallel using Numba, and I would like to know if I can run it on my Apple M3 Max GPU. However I have never worked on GPU code before (coming...

View Article

Problema ao tentar rodar projeto em python [closed]

estou fazendo um projeto em python, tenho que rodar pelo main, maaaas, quando tento rodar, ao invés dele rodar só a player (que tem a função principal) ele meio q ta rodando tudo, n sei direito. O que...

View Article
Browsing all 23276 articles
Browse latest View live


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