Skip to main content
Filter by
Sorted by
Tagged with
3 votes
2 answers
71 views

I'm trying to find the outbreak time (when the number of zombies >= number of humans) as a function of the zombification rate gamma, using the following code: arrOutbreakT = [] arrGamma = np....
me1ll0's user avatar
  • 33
0 votes
0 answers
119 views

I am trying to fine-tune Qwen 2.5 3B VLM on a chess piece dataset from hugging face. Dataset: Trelis/chess_pieces However, im getting this index errror at the final trainer line: IndexError ...
aaghaaz's user avatar
0 votes
1 answer
54 views

Version 1 farm = [["spinach", 5],["strawberry", 4]] for i in range(len(farm)): print([i][0], " :", [i][1], "days left") Version 2 farm = [["spinach&...
layered.pizza's user avatar
-1 votes
1 answer
45 views

I am currently helping a friend with getting into python and I came across this snippet of code, where I was unable to understand what was happening. def lbd_red(s): try: for i in range(...
Grammdalf_the_Weight's user avatar
0 votes
2 answers
70 views

I am trying to combine the first and last items in a list. For example, in a 10 item list, it would have items 1 and 10 combined, items 2 and 9 combined, items 3 and 8 combined, etc. (I am aware that ...
MijiGamin1's user avatar
0 votes
0 answers
45 views

I am trying to solve coupled heat conduction and mass diffusion for a spherical particle. I am solving the PDE's using Finite difference method , with 4th accuracy for first and second order equations....
utkarsh kulkarni's user avatar
0 votes
0 answers
30 views

So, I am falling onto this error all the time with this project I'm doing. I am building a recommendation system based on a very large data frame, and the error occurs in this function: def ...
MarsLos10's user avatar
0 votes
1 answer
90 views

I'm pretty new to this so please bare with me, I'm using the roboflow library and cv2 library for my object detection model that I'm using with a docker with a raspberry pi, but I'm getting this error ...
geekbird's user avatar
1 vote
0 answers
26 views

I am working on a poker game using Tkinter for the UI. Right now, when the first player folds on a round, it causes a Value Error, saying that the entry does not have a value passed in even though I ...
51014's user avatar
  • 23
-4 votes
2 answers
855 views

veriler = list() yazarlar = list() kitaplar = list() sayfalar = list() with open('veriler.csv') as file: for i in file.readlines(): veriler.append(i[:-1]) for i in veriler: line = i....
abdussamed ucar's user avatar
0 votes
1 answer
44 views

So I was making brick break game on canvas python, I was able to create a moving ball and a moving bar and the collision of ball to bar, now I made the code in such a way that if ball goes down to the ...
Piston Dev's user avatar
0 votes
0 answers
27 views

I'm programming a Poker game to learn Python. For my card draw I take 5 random cards out of the starting_deck list to put them in a card_on_board list and sometimes i get an IndexError. Here is how: ...
Julien M's user avatar
0 votes
2 answers
122 views

In C# you can initialize Dictionary<TKey,TValue> like this: var dictionary = new Dictionary<int, string>() { [0] = "Hello", [1] = "World" }; You can also ...
user3163495's user avatar
  • 4,046
1 vote
1 answer
484 views

I'm trying to load a custom data feed from a csv file that I've generated called "impact.csv" through the script below "backtrader_impact.py". However, at "cerebro.adddata(...
user23567225's user avatar
0 votes
1 answer
103 views

I would like to plot coordinates with folium and fill the circles according the column "type". I tried to do this according the example given here: https://python-visualization.github.io/...
Norbi's user avatar
  • 185
0 votes
1 answer
103 views

I'm writing small program to utilize data from API endpoint. As I need to solve typical problem of parent-child recursive relation I wrote function as below: def get_client_path(client_id, _df: pd....
Smok's user avatar
  • 129
1 vote
2 answers
73 views

def romanToInt(self, s: str) -> int: num = 0 lst = ["I","V","X","L","C","D","M"] dict = {"I":...
Jay 's user avatar
  • 11
1 vote
2 answers
90 views

This is a function that exports an array to an Excel spreadsheet with Panda's ExcelWriter. Or at least it used to. It has worked fine for a few years. Now, once it gets to the line opening the ...
Joshua's user avatar
  • 21
0 votes
1 answer
69 views

I used odeint to solve a coupled differential equation in terms of v(t) and u(t). f = odeint(ODEs, f0, t) v = f[:,0] u = f[:,1] I want to get x, which is the integral of v(t), so I have ...
QuantumCode's user avatar
0 votes
1 answer
736 views

When I am importing google from googlesearch I am getting the following error. from googlesearch import search (...\AppData\Roaming\Python\Python39\site-packages\googlesearch\__init__.py) ImportError: ...
Arun's user avatar
  • 119
0 votes
1 answer
81 views

I tried to calculate an index such as LCL using Metpy. The following is the result of trying print(p, t, td). [34.5 30.0 29.1 25.6 20.0 19.9 16.4 15.1 12.0 10.3 10.1] hectopascal [-56.3 -56.1 -56.9 -...
kim's user avatar
  • 1
0 votes
3 answers
64 views

The code runs just fine for a while before resulting in an index error. This is the error message I keep getting This is the code: import random import time Male_First_Names = ['Albert', 'Arnold', '...
Caleb_Clark's user avatar
1 vote
1 answer
53 views

This is my current code: import csv x = 0 with open("new.csv", mode="w") as csv_file: fieldnames = ['Question', 'Answer'] writer = csv.DictWriter(csv_file, fieldnames=...
lll's user avatar
  • 122
0 votes
0 answers
116 views

I am trying to use this focus-stacking tool on a set of images that I have, but I am getting an error. Here is the command I use in my Linux terminal: focusstack -i /projectnb/npbssmic/ac25/...
ac25's user avatar
  • 21
0 votes
1 answer
760 views

How does one convert the following (to accelerate compiling)? The for loop version works with jax.jit, import functools import jax import jax.numpy as jnp @functools.partial(jax.jit, static_argnums=0)...
DavidJ's user avatar
  • 440
0 votes
0 answers
20 views

I have a task I'm attempting to solve, I can't figure why I can't trigger the Index Error exception. The instructions are to print the value at the input index and print the values at the index before ...
jb963's user avatar
  • 1
0 votes
0 answers
40 views

I am getting the following error when I'm running a python script which is used for pre processing csv file. The error and the code snippet is shown below. In the function get_mech_update(), the ...
Danish 's user avatar
0 votes
0 answers
77 views

IndexError is thrown. I am still very new to coding, so I am not really sure what is going wrong here. I know that an IndexError is thrown when you are trying to index into a value which has none. (...
Martin Malek's user avatar
-1 votes
1 answer
172 views

I am trying to do an exercise learning Python for nested lists and I the way it works is that you have a grid, and then based on what you enter, it will replace that position with an "X". ...
Feeko's user avatar
  • 13
-1 votes
1 answer
62 views

I am able to load this excel worksheet properly but do not know how to specify that I want data from the entire first column to be read. Screenshot of Code import pandas as pd # Load Excel sheet for ...
Shy's user avatar
  • 3
0 votes
0 answers
69 views

#importing stuff import pygame from pygame.locals import QUIT import random as ran #defining variables SNAKE_WIDTH = 50 SNAKE_HEIGHT = 50 FPS = 60 GREEN = (0, 128, 0) WHITE = (255, 255, 255) ...
Crystallaura's user avatar
1 vote
4 answers
502 views

I am a beginner and I am playing around a list where I have seen this error and got stuck. How can I fix it? What is the reason? Is there a solution? row1 = ["😔", "😔", "😔&...
Hanzla Ashraf's user avatar
0 votes
1 answer
124 views

Write an application in Python that allows a user to play the game Bulls and Cows against a computer. The game works as follows: The computer chooses a 4-digit number in secret. The digits must all be ...
Spdr's user avatar
  • 1
-1 votes
3 answers
141 views

A basic error I know, but i'm unsure why its occurring after troubleshooting. I have all_specs a list of lists: [['2020 (70 reg)', 'SUV', '34,181 miles', '395BHP', 'Automatic', 'Electric', '1 owner'], ...
Curious Student's user avatar
0 votes
1 answer
416 views

I'm a newcomer in this field. Recently i was training a skin detection model on Colab, and this error occurred IndexError Traceback (most recent call last) <ipython-...
Huỳnh Nam's user avatar
1 vote
0 answers
32 views

I am using "addcyclic" function and encounter the Index Error. Error details are: IndexError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_11852/1134487354.py in 6 m....
Yixin's user avatar
  • 11
2 votes
2 answers
212 views

I have this code to make each text "clickleable", from the Text() widget that has tkinter. However, when I run the program and click over one text I get this error message witch each ...
juan carlos maturana's user avatar
0 votes
1 answer
665 views

I am working on this question answering code and using pretrained GPT2LMHeadModel. But after tokenization when I pass the inputs and attention mask to the model it is giving index error. My code: ...
Md Tahmid Hasan Fuad's user avatar
0 votes
1 answer
35 views

I need help with this project related to brain-strand segmentation. Im using the function bellow and console keeps sending: dist1[cont] = math.dist(p1, p2)) IndexError: list index out of range. Please ...
Fajitacongnocchis's user avatar
1 vote
1 answer
158 views

I've been trying to implement a GA to optimize the parameters of my ANN. I'm new to both of these libraries and I've used this as help to implement it https://blog.paperspace.com/train-keras-models-...
Illuminy's user avatar
1 vote
1 answer
188 views

I am trying to create a 3D plot in python to display a sphere where the surface colour indicates the value of a potential on the surface. The potential is dependent on the value of theta. Right now my ...
Ezzy Cross's user avatar
1 vote
2 answers
176 views

I have a list, text_split = [['5', '5', '12\n'], ['1', '1\n'], ['1', '2\n'], ['2', '1\n'], ['2', '3\n'], ['3', '1\n'], ['3', '2\n'], ['3', '4\n'], ['4', '2\n'], ['4', '4\n'], ['1', '2\n'], ['2', '3\n']...
Daniielle's user avatar
1 vote
1 answer
68 views

#display the ski from the file for row in ski_details: groupsTV.insert('','end', text = row[0], values= (row[1], row[2], row[3])) When i comment out the for row in ski_details line and the ...
MarkJamison's user avatar
1 vote
0 answers
42 views

I am having an issue with the following code which uses pandas apply through a function that returns multiple values in a series... def make_tonic(title): *** function is here **** ...
Sir Roland Baggybottom IV's user avatar
0 votes
0 answers
319 views

I have a csv file ('data_counter_1.csv') which looks like below: N;52201261;EM3000v2;2.0;20210801000000;20210801010000;20210801010000;51.28983;15.22345;172.19.224.70;0.0.0.0;ns; C;20210801000500;127;...
Przemek D's user avatar
-1 votes
2 answers
435 views

import cv2 import argparse import pandas as pd from ultralytics import YOLO import supervision as sv import numpy as np from supervision.tools.detections import Detections, BoxAnnotator from ...
Surya's user avatar
  • 3
0 votes
0 answers
454 views

I am trying to carry out feature selection on the Winscosin breast cancer dataset from Kaggle. The dataset has 32 colunms. I removed the iD column and i have 31 colunms left. Counting from 1. The ...
Oluomotehinwa's user avatar
0 votes
1 answer
66 views

I got the error IndexError: list assignment index out of range by using the following code: expC = 0 imgC = 0 pictures = [[x for x in range(7)] for y in range(25)] for i in experimentNames: for ...
Godan's user avatar
  • 11
-1 votes
1 answer
1k views

I have this code for taking measurements of a human body using a web camera. But I'm keep having the following error. Traceback (most recent call last): File "c:/Users/user/Desktop/Body detect/...
Anji_Ishu's user avatar

1
2 3 4 5
13