Category "python"

Python ONVIF GotoPreset failed to set global movment Speed

I'm trying to set the point called "Preset001" with a well-defined Speed but I can't as I get the following error on console: My camera's hostname: MYCAM gotoPr

error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function 'VideoCapture'

I am trying to enable the IP cam that I have access to, it's feed by the browser. but couldn't able to get a video stream using an IP camera, only get a result

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: "

how to click button and download a file using robot frame work or selenium, it not contains link

https://www.nasdaq.com/market-activity/stocks/screener - i need to download csv file from this site, If solution in selenium or robot frame work both are fine.

Want to Identify core point and border point in DBSCAN Algorithm using Sklearn ( implementation in python )

I want to find out Core and border points in a particular cluster. For example - I used DBSCAN Clustering to cluster the dataset, and suppose 4 clusters are cre

Pause, unpause music in PyGame on KEYDOWN

I've created a game loop that pauses if the spacebar is pressed. The loop is pausing and unpausing as expected but the music playing in the background does not

Python closest match between two string columns

I am looking to get the closest match between two columns of string data type in two separate tables. I don't think the content matters too much. There are word

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

Having trouble when installing rgee at "2.Creating a Python enviroment(rgee)"

codes are simple: library(rgee) ee_install()` what shows in console are as follow: ee_install() --------------------------------------------------------------

jsonschema.exceptions.SchemaError: 'maximum' is a dependency of 'exclusiveMaximum'

I get a metaschema validation error when using python's jsonschema module. Try running this code to replicate: import json from jsonschema import validate mys

How to extract a specific range out of a dataframe and store it in another dataframe and then delete the range out of the original dataframe | pandas

I have some timeseries of energy consumption and i can eyeball when someone is on holidays if the consumption is under a certain range. I have this piece of cod

How to run a uvicorn server (using FastAPI) and a load test (using locust) parallely?

I have two files, both of them runs individually without any error. I used FastAPI to create some endpoints and I am trying to use locust (through a tool invoku

Nested JSON to Multiple Dataframe in Pandas

I am trying to build a tool which can take any JSON data and convert that into multiple data frame based on data types. I am trying to add each data frame with

opencv bot Recursion Error using pyautogui , python-imagesearch, cv2

Im writing a bot using cv2 , pyautogui,and imagesearch libaries. in this function im searching for an image then I'm going to run another function when found if

How to mock method of a mocked class

Changed the titel to a more common one. I guess the problem is not that class specific. I want to mock google.cloud.pubsub_v1.SubscriberClient I want to set a f

Why is my function parameter for Pandas to_datetime() being ignored?

I have a Pandas data frame with a column containing months and years. Unfortunately, the values are currently string objects not datetime objects; This means th

copying a table across servers with psycopg3

I'm working from and example in the psycopg3 documentation to copy a table from one database to another: link dsn_src = 'postgresql:///dev_db' dsn_tgt = 'postgr

How can I resolve " InvalidArgumentError: Graph execution error: jpeg::Uncompress failed. Invalid JPEG data or crop window"?

Beginner here. I recently converted my images to grayscale using opencv. Then I used those images for training. When I was training, there was an error. "Invali

How to deal with this deprecation warning 'nearest': pil_image.NEAREST, where is Resampling in Pillow?

Hi everyone I am using pip as package manager, and I receive the following DeprecationWarning when running my tests. I know that sometimes Warnings can be the B

Visual Studio Code does not show variable color or problems anymore

About 4 days ago, while I was doing my schoolwork I noticed that the variable colors don't turn blue like they used to, and it does not show me problems in the