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

My program remembers the variable from previous executions when it shouldn't...

I made this program where the user can input different food names. If the dish is on the dictionary, the cost of that food is added to a counter that is printed. For some reason, the counter doesn't...

View Article


Nginx + Gunicorn: Django Application Not Loading on Domain, But Works on IP...

I've tried accessing my Django application using the configured domain (e.g., http://succyloglobalfx.com) after ensuring that the domain is correctly pointing to the VPS IP address. I expected to see...

View Article


Please find the cause of "Could not build wheels for multidict, which is...

I was just trying to install aiohttp in python.So I just typed in console like that: pip install aiohttp .At first, the installation went well, but finally I got the following...

View Article

Python - how to overcome Object of type 'bytes' is not JSON serializable in...

I've done this:-try: with open(filename,'rb' ) as dat_file: foil = dat_file.read()because my code reads and repairs arbitrary "text" files - in my analysis, some files have mixed line endings (caused...

View Article

Find if the matching date exists

df1:tradeDatesecurityCode2019031900000120220505000001df2:payoutDatesecurityCode2018070800000120190221000002df3:endDatesecurityCode2020020300000320210330000004I have 3 data frames, and the structures...

View Article


Python broke yum, error while running yum install

Unable to run yum or dnf, I recently installed python3.6 in offline Almalinux system with rpms file, and seems like i have broken python. i have tried re-installing python, yum, libs, dnf with --force...

View Article

Image may be NSFW.
Clik here to view.

"ModuleNotFoundError: No module named 'src'" error through jupyter notebook...

I am trying to run a notebook .ipynb through jupyter notebook but I get an error that says ModuleNotFoundError: No module named 'src'.What is wrong, and how do I fix it?

View Article

Log errors from a Python Azure Function App?

I have a Python script running in an Azure timer function which keeps randomly failing and I am trying to figure out why. In the monitor tab, all it says is that the function failed.I have tried...

View Article


Adding a link to the django admin panel

I have a page and I need to go to it from the admin panel. How can I specify a link in the admin panel? Maybe you can somehow add a link to the page in the header

View Article


Find all duplicates in a list and populate them in same order in a new list

I have found the following code on Stack Overflow for creating new list of unique values recursively, but it doesn't work for me no matter how I tweak it for my requirement in the title. What is wrong...

View Article

Unable to Configure Python Interpreter in PyCharm

I am currently working on a Python project using PyCharm, but I'm facing difficulties configuring the Python interpreter. I've tried configuring it from multiple locations, including the interpreter...

View Article

SQLAlchemy 'Exception during reset or similar' due to db.session.rollback

When a celery task fails, during a softTimeLimitException, the application tries to roll back the session and log the failed task. The issue is that a _finalize_fairy exception Exception during reset...

View Article

How do I determine if current time is within a specified range using Python's...

What would be the best way to see if the current time lies between say 10:30 AM and 4:30 PM. I could think of the following, not sure how correct:from datetime import datetimenw = datetime.now()hrs =...

View Article


Trainer acts as if it's training from scratch

I'm training a model with a huggingface trainer and I specified the checkpoint folder for the resume_from_checkpoint parameter.However, when it continues to train, it still saves the checkpoints with...

View Article

Selenium Webdriver doesn't work properly on pyt

I am trying to build a script that will send me an email about upcoming races and marathons for the following month on the first of the current month (for testing I have it set to the current day). My...

View Article


Image may be NSFW.
Clik here to view.

How to fetch Speech Result text from twilio call logs using python

I am trying to fetch call logs from twilio which was successful from twilio docs, but I also want to fetch the conversation text which is present in twilio request parametersplease guide me on this as...

View Article

How to not break the input of a command while a thread is writing data in the...

i was developing a client/server cli application and i encoutered a problem with the input() function of python3 and multi-threading.Here is a code for the example:import threadingimport timedef...

View Article


Defining a variable as a copy of another one with a condition

I have a variable a, that's an array, and I want to define another variable b, which is the copy of a, except for a condition (let's say, every non-zero element should be set to 1). I can write this in...

View Article

global cap_v4l.cpp:984 open VIDEOIO(V4L2): can't find camera device

I am using OpenCV for face recognition but while uploading on server pythonanywhere I encounter the error global cap_v4l.cpp:984 open VIDEOIO(V4L2): can't find camera devicedef live_face_match(): cap =...

View Article

NumPy fancy indexing with provided output array

I have a two-dimensional array and index it with a pair of arrays (in fact my arrays are much larger, millions of elements):a = np.array([[1, 2, 3], [4, 5, 6]])b = a[[0, 0, 0, 1], [0, 1, 2, 0]]Indexing...

View Article
Browsing all 23101 articles
Browse latest View live


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