Category "python-3.x"

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

If statement calling both functions [duplicate]

I am trying to call a python function inside of an if when you input a certain letter. Even if the letter is not meant to be noticed by the if

Pydantic: Define an attribute of type List with nested lists and multiple sub-models

I have to deal with such a schema: { "method": "Data.get", "params": [ [ { # name this "Fetch" "select_": "Downtime

Stack the same row in each layer of a 3D numpy array

Hi is there a way to efficiently stack the same row in each layer of a 3D numpy array? I have an array like this: a = np.array([[["a111","a112","a113"],

How to calculate coefficients, solutions etc. in quadratic function with limited inputs in Python

I have a problem. I want to calculate everything in the quadratic function. equations for reference: ax^2 + bx + c a(x-p)^2 + q I made 8 possible inputs in tki

PyQT5 - Webview load URL - Unbalanced save/restore

I try to load a page in a webview widget. I got information: QPainter::restore: Unbalanced save/restore QPainter::end: Painter ended with 2 saved states so Web

How to groupby two columns, not considering order of values there?

I have a dataframe: val1 val2 val3 a b 10 a b 2 b a 3 f k 5 f k 2 when i do df.groupby(["val1", "val

Creating an instance in OWLready2 creates a completely new class instead of asigning it to the existing class

I'm trying to create a simple ontology, following the tutorial on the official website. The code runs smoothly and everything seems fine when running this code:

How to overcome value error python model prediction?

I have trained a model and now my task was to test it on unseen images from the internet. Originally the model was trained on CIFAR-10 so for the model I chose

Python - Extract value from list of dictionaries that match a specified key

I have a list of names: names = ['london','paris'] and I have a list of dictionaries: data = [ { "_id": "ebef3cb1-9053-4d1e-b409-b682236445b7",

Can't migrate after makemigrations on django

everyone. I newbie in this field. So, After I finished makemigrations. then I migrate this error code occurs. I try to solve it but still stuck. please guide, I

Cannot create SQLAlchemy engine, getting error "loaded 'mysqldb' is not async"

I'm trying to replace Databases with SQLAlchemy 1.4 async. When I try to make the engine I get the following error: sqlalchemy.exc.InvalidRequestError: The asyn

How to handle extra data error in FastAPI

So I have the following FastAPI code: from fastapi import FastAPI app = FastAPI class Demo(BaseModel): content: str = None @app.post("/demo") async d

Print REGEX using USER DEFINED FUNCTION

I'm trying to print the variables ccb_3, nome, data, taxa and parcela using the function I defined as "ext_ccb", but when I run the code it returns 3 times (bec

Databricks dbfs file read issue

I am trying to open a file that i uploaded to the dbfs location. However, I get error while trying to open the file but I can see the file when I do a ls. Also

Opencv facing an error for tesseract module not found even after installations

Opencv facing an error for tesseract moule not found even after installations pip install tesseract opencv reinstallation also done but it wont work. opencv i