Category "python"

Why do I get this when using pip WARNING: Ignoring invalid distribution -ip?

For the past few weeks everytime I have downloaded a package using pip i get this: WARNING: Ignoring invalid distribution -ip (path to packages) . Any ideas why

Get user's ids to a list from guild discord.py

Is it possible to get all of the members's user ids from a guild (server)? Edit: I can't use guild, because I need to get the ids when the bot gets online (on_r

Grant user permission to bigquery.datasets.create in schedules notebook in Vertex AI

I have a notebook in which I access data through APIs, work with the data and send the results to a BigQuery table as well as to a GCS bucket. Everything works

How to scrape sofifa website positions. Text inside of span beautiful soup

So I am webs scraping the sofifa website into a workable csv. Each player gets a column. My main problem is the position section of the website is only exportin

Django and Axios Forbidden (CSRF token missing or incorrect.)

I am having issue with my django server when trying to connect it to axios. It should be a simple fix but I am stuck! I am getting this error from my django ser

What is the best way in numpy to use a vector of positions as indexes in a an nd array?

I have a numpy array of agents positions: positions = np.array([[row_0, col_0], [row_1, col_1], [row_2, col_2]]) I

Upgrade Ubuntu: python3 install is corrupted

I'm trying to upgrade Ubuntu from version 18 to version 20 using sudo do-release-update, however it complains about my Python being corrupted: Your python3 inst

Is it possible to enter single bytes in C through terminal?

I have a fragment of code where something like this happens: char buf_path[0x100]; *len = fs->read(0, buf_path, 0x1000); What I want to do is to enter two N

in Django : Why nothing happens when I try to Create new note with the html form in the notes.html page

I've just started my first app with Django by following a video on YouTube. The app is a students dashboard with 8 tools and features to help the student to mak

Error installing Exempi 2.5.2 on M1 Macbook Pro running Big Sur

I'm trying to install Exempi 2.5.2 in PyCharm IDE for python in order to read Metadata from a Photoshop psd file. My code is: import PIL from libxmp.utils impor

TypeError: Cannot subclass <class 'typing._SpecialForm'> while fine tuning GPT-J

I am trying to fine tune GPT-J by following this GitHub Repository. When running the training command, I encounter this error: Traceback (most recent call last)

Why won't my new layout be displayed dynamically on my GUI ? Python - PyQt

I'm trying to print some text in a new layout when a button is pressed. Unfortunately if won't work and I can't find the problem to solve it. Thank you for your

How can I refresh the data in the background of a running flask app?

I have a simple flask app that queries a database to write a csv then pyplot to create a chart out of that. I would like to refresh the data in the background e

Python pandas read_fwf strips white space

I am facing an issue using the read_fwf command from the Python library pandas, same as described in this unresolved question I want to read an ascii file conta

How to upload a file to the file.io website using Python

I am trying to send a POST request to the file.io website to upload a file from my Python script and I want to get the link for that file. Here is my code: impo

HTML shows Flask-SQLAlchemy syntax?

When trying to display replies of users on my page it displays them with SQL syntax, like so: ('reply',) I've tried str() when returning from my route. html: &l

Multiprocessing Pool implementation

I'm doing some intense computation and I'd like to speed up the process using all the computational power available (8 cores on my PC). I'm doing some calculati

Is it possible to write to Command Prompt with python?

Im opening Command Prompt with os.startfile('C:\\WINDOWS\\system32\\cmd.exe') and after opening the program id like to write the python file for it to run C:\U

Cann't install django with error 'Non-zero exit code (2)'

When i create new django project in pycharm i have error enter image description here Help me please

What is the purpose of sort_index of a Dataclass in Python?

I am learning about Dataclasses but I am confused on the purpose of sort_index and how it actually works. I can't seem to find any valuable information on it. T