Questions tagged [outofrangeexception]

An exception that is thrown because the value of a variable is outside the allowed range

272 questions
1
vote
2 answers

Python list index out of range testing all possible permutations

so the following code is meant to test every possible combination of characters untill it finds the one you typed, however at one point it says list index out of range, how do I fix this? password = input() chars =…
ProfMonkey07
  • 93
  • 1
  • 1
  • 7
1
vote
0 answers

terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)

I am trying to read in a .csv file of hotel room reservations. The objects are created correctly, but I am getting an out of range error after the reading in is completed. I have tried messing around with inFS.ignore() in various places, but it will…
1
vote
1 answer

Trying to run this code in MIPS and i am getting an error saying "Runtime exception at 0x00400090: address out of range 0x00000008"

.text main: #Main function to be run la $a0, prompt li $v0, 4 syscall la $a0, n0 li $a1, 8 li $v0, 8 syscall move $t0, $v0 la $a0, n1 li $a1, 8 li $v0, 8 syscall move $t1, $v0 la $a0, n2 li $a1, 8 li $v0, 8 syscall move $t2, $v0 la $a0,…
duge007
  • 21
  • 1
1
vote
3 answers

c++ function not catching vector subscript out of range execption

I am trying to split a string on the char ":" then see if index 2 exists. My split string function works good as ive been using it for quite some time, but after trying to try{} catch() this it doesnt catch the execption and instead displays a debug…
cli
  • 61
  • 1
  • 7
1
vote
2 answers

Java List with blank allowed

This is probably really simple but I really could not word it properly on Google. I have an ArrayList that keeps the info for each thread. Each thread has its own ID. So, at the beginning: myList.add(theIdOfTheThread, new InfoForTheThread()); //Add…
Isaac Waller
  • 32,709
  • 29
  • 96
  • 107
1
vote
1 answer

How to catch 'bigint out of range' error in a view?

I have a table with three columns, length, width and height, all integers and constraint to not become larger than 1000000. When calculating volume, I cast to bigint and it all fits. However, I have a view that multiplies the volume by another value…
Bart Friederichs
  • 33,050
  • 15
  • 95
  • 195
1
vote
2 answers

Python - Understanding error: IndexError: list index out of range

I'm fairly new to python. I have an error that I need to understand. The code: config.py: # Vou definir os feeds feeds_updates = [{"feedurl": "http://aaa1.com/rss/punch.rss", "linktoourpage": "http://www.ha.com/fun.htm"}, …
André
  • 24,706
  • 43
  • 121
  • 178
1
vote
1 answer

Whats does the random range mean?

I'm using unity's random.value function (I think i saw this behavior also somewhere else), which as the documentation states works as follows. Both 0.0 and 1.0 may be returned by this property. This behaviour is different to that of many other…
T. Grumser
  • 99
  • 3
  • 18
1
vote
1 answer

No out of bound in Matlab

I notice the following in Matlab. >> a = [1, 3]; >> a(3, 4) = 1 a = 1 2 0 0 0 0 0 0 0 0 0 1 >> a(5, 4) ??? Attempted to access a(5,4); index out of bounds because size(a)=[3,4]. Isn't a of size 1 by 2…
sinoTrinity
  • 1,125
  • 2
  • 15
  • 27
1
vote
0 answers

Pandas To_sql out-of-range error

I am importing json data from an api into a pandas data frame and from the data frame I'm using pandas.to_sql to put it into a sql database. Some rows from the API have invalid data that causes an out-of-range error. Is there a way to skip or…
Ryan
  • 277
  • 1
  • 4
  • 8
1
vote
1 answer

Subscript out of range error specifying the range of the loop of an array

I have a subscript out of range error. There has to be a problem with the range of the loop of the array, but I feel the range is declared and the corresponding min and max I'm referencing should be at the same location in their respective arrays. I…
FinProg
  • 23
  • 4
1
vote
0 answers

ScreenRecording OutOfRange

I drew a rectangle to capture my screen. It captures with the properties I want,resolution is perfect... However my screen recorder doesn't record my entire screen. When I try to increase the values (the width and the height of the rectangle) I take…
1
vote
1 answer

C++ double pointer to 2D vector gives out-of-range error

Apologies if this has already been answered, but I've read pretty extensively on this (I've been stuck here for several days) and I can't seem to find anything that works. I'm trying to use a double pointer to access a 2D vector that is a data…
1
vote
2 answers

std::list - removing elements

I am currently using std::list in my application and trying get rid of problem with going out of range. I really need to use pop_back in one object's method while iterating. I think it may change std::list::end in a some way. Is there any…
Akasata Akasata
  • 333
  • 4
  • 10
1
vote
1 answer

Marshalled struct results in OutOfBoundsException in C#

So I have made a struct that I want to send around using a simple DatagramSocket. The struct code is as follows: public struct MsgData { private readonly int _value; private readonly string _descr; public MsgData(string desc, int…
sebrock
  • 1,214
  • 2
  • 15
  • 32