Category "python-3.x"

How do I delete trailing objects drawn in tkinter?

My goal is to allow you to make a rectangle on your screen similar to using a rectangle or selection tool in paint. I've got it to mostly work but when you make

tweepy.errors.Forbidden: 403 Forbidden using Twitter API v2 functions in Tweepy?

I am just starting out with using Tweepy and have been having trouble when trying to use the v2 API functions to write a program to Tweet text. Currently, I am

"ModuleNotFoundError: No module named 'dbus'" on macOS

I'm getting an error when I'm using the notify2 module. ModuleNotFoundError: No module named 'dbus' The error is from the notify2.py file. When I tried pip in

Getting the current selected tab name of ttk notebook in tkinter? - python

I'm creating a GUI that shows different plot types in different tabs, so I created this helping function and I'm trying to figure out how to get the current tab

can't click() an onclick element with selenium (tried text link, partial text link, xpath, css selector)

I need to scrap some data from this url: https://www.cnrtl.fr/definition/coupe The data/results I need to scrap are located in those 3 different tabs: I'm unab

Background of image turning black when using keras.preprocessing.image load_img

my code: from keras.preprocessing.image import load_img, img_to_array from keras.preprocessing.image import smart_resize import numpy as np #load pretrained mo

How to use the Playwright library in jupyter notebook instead of using a .py script

I want to use an automated browser and execute my steps with jupyter notebook cells instead of using .py scripts. This works fine with the browser automation li

Discord.py progress bar

Is there any way to make beautiful progress bar and embed it into message. Here's one example of what I want to make: I know I can make an ASCII-style progress

Listener for Python Queue

I'm using python queue to insert data packets from mqtt listeners But I'm not sure when this queue will be loaded by Mqtt packet. Can we put a listener on to th

How to display dictionary with dataframes on a localhost (using Flask and Python)?

I have the following dict: {'id': 1, 'df': pd.DataFrame({'id': [1,2,3], 'col1': ['kuku', 'dudu', 'lulu'], 'col2': [8,9,10]}), 'df_size': 3} When I am trying to

Access module attribute from within the function

I have a function and the fully qualified name is -> pyserv.asynch.service.modules.get_result() It is possible that pyserv or other module, say services or m

Handle multiple request at same time on Flask web app

What I have: I've a Flask web app deployed to Heroku's server, which consists of only one web process app.py. Here it is: #importation from flask import Fla

Trying to style large number of rows with openpyxl, is there a 'faster' way?

I've got a function I use to check and style rows of a spreadsheet based on matching criteria with openpyxl. While this has been functional for nearly every sma

how to fix error Import "chess" could not be resolved

please help me fix error Import "chess" could not be resolved and many more errors like: Import "chess .pgn" could not be resolved, Import "chess.variant" could

How to connect to oracle database with both password and wallet?

I am using Oracle Client 18 Home 1 SQL Developer platform is Windows-10-10.0.18362-SP0 python version is 3.8.8 cx_Oracle version is 8.0.1 cx_Oracle client versi

A serious "ModuleNotFoundError: No module name..." problem

enter image description here As the image shows, I have marked the parent directory source root, and pycharm doesn't report an import-error(like wave line or so

Django Graphql Auth not logged in user

I'm using Django Graphql Auth in my api but when I want to get the current logged in user always get the Anonymous. # settings.py MIDDLEWARE = [ # ...

Compressing a netCDF file with the pynco package

I'm interested in compressing a NetCDF file in python using the pynco package. From the command line, I would usually use: nccopy -d 3 input_file.nc output_file

how to get the value of a specific column of each row in a html table?

I need to get the sensitivity (7th column) of each setting (row) site: https://prosettings.net/cs-go-pro-settings-gear-list/ table id: "table_1" 2 rows class: "

Import local ".py" library in powerbi python scripting

I have written a python library (ak_sql.py) to query my sql server and written another ".py" script (query_sql.py) to invoke this library and return data in dat