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
343,671
questions
0
votes
0
answers
3
views
DLL load failed while importing _imaging: The specified module could not be found
I had been working with python modules and libraries for a while now and I have encountered a very unusual error recently while importing modules such as matplotlib, seaborn library etc.
from ...
1
vote
0
answers
4
views
Print API objects on response with asyncio
I want to print out every API object I receive on an event.
The code works and looks like below
Code:
async def main():
async with client_session() as session:
client = Client(session)
...
0
votes
0
answers
3
views
Synthetic Data Vault get_column_plot change legend and title
How do I change title and legend for Synthetic Data Vault get_column_plot command ? The documentation gives no such option at all https://docs.sdv.dev/sdv/single-table-data/evaluation/visualization. I ...
0
votes
0
answers
7
views
Correctly handle rate limit sleep time in Github
I am writing a script to archive github repos using PyGithub.
token = os.environ["GITHUB_TOKEN"]
g = github.Github(auth=github.Auth.Token(token))
repos = []
for reponame in ...
-3
votes
2
answers
20
views
Extract an Image from a Web Page
Every day, I need to manually extract the central image from two URLs. I decided to automate this process and, with the help of ChatGPT, I have the following code
# %%
from datetime import datetime, ...
0
votes
0
answers
9
views
Error message: [09/Jul/2024 20:02:20] "GET /blog/about HTTP/1.1" 404 2285 Not Found: /blog/about geting this while creating Blog app
` # **views.py**
from django.shortcuts import render
from django.http import HttpResponse
def home(request):
return HttpResponse('<h1>Blog home</h1>')
def about(request):
return ...
1
vote
1
answer
15
views
Attribute auto-calculation upon retrieval
I am trying to make a point object in 3D in python, and I have the following code
import numpy as np
class Point3D:
def __init__(self, x, y, z):
self.vector = np.matrix([x, y, z])
...
0
votes
1
answer
19
views
Unable to call a method in python class
I am trying to execute the following code but the last line of code is giving error.
I have method max_profit_assignment in Profile class and when i'm trying to execute it with profile object, it ...
0
votes
0
answers
12
views
SQL query is not correctly generated using langchain, nlp and llm
I have created a application which takes input question and converts it in SQL query using langchain, llm and nlp but sometimes it creating wrong query especially in the beginning following is the ...
-1
votes
1
answer
25
views
tensorflow.python.framework.errors_impl.FailedPreconditionError: C:\Users\Ata Onur Özdemir\PycharmProjects\Emotion_Detection\output is not a directory
This is a sample Sentimental Analysis code for hotel reviews like positive or negative. I use pandas, transformers, datasets, turkish_lm_tuner libraries. Firstly, I think Path name (C:\Users\Ata Onur ...
-1
votes
0
answers
26
views
Run only specific tests in verbose mode using pytest
There are thousands of tests and I'd like to run only some of them (flaky ones) in verbose mode using pytest -vv, while others should run not in verbose mode.
Is there a way to do that? Wasn't able to ...
0
votes
0
answers
21
views
Problem with Pattern Matching Callbacks in Dash
I have the following 2 functions to dynamically update a div:
@app.callback(
[Output('memory', 'data'), Output('linesDiv', 'children')],
Input('lineButton', 'n_clicks'),
[State('memory', '...
0
votes
0
answers
16
views
pywebview window keeps making sound when pressing on keyboard [closed]
I made a webview window using pywebview and when I press on the keyboard, it keeps making a ticking sounds, I am wondering if there is a way to stop the ticking sound in pywebview!
webview....
0
votes
0
answers
15
views
Python: Issue with installing Zebra Scanner package on Debian
i am trying to install this on a debian system (Debian GNU/Linux 12 (bookworm))
the newest version of this zebra scanner project is from Aug 2021
i have issues with the installation of the zebra-...
-3
votes
1
answer
24
views
Getting NameError for pandas dataframe
I have df1 with column 'col' & df2 with columns 'code' and 'id'. Column 'col' in df1 is mapped to 'code' column in df2. When I am running the below code:
def get_id_for_code(code):
try:
...