473,396 Members | 1,707 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

max() error

I've gotten this exact problem before and I was able to once figure it out. Since then i've apparently forgetten more of the basic.

Does anyone have any idea whats going on here, because fdayhigh is not an empty list...

Expand|Select|Wrap|Line Numbers
  1. >>> import justCup
  2. Traceback (most recent call last):
  3.   File "<interactive input>", line 1, in <module>
  4.   File "justCup.py", line 63, in <module>
  5.     CupStartIndex = fdayhigh.index(max(fdayhigh))
  6. ValueError: max() arg is an empty sequence
  7. >>> 
thanks
Oct 19 '07 #1
2 2383
ilikepython
844 Expert 512MB
I've gotten this exact problem before and I was able to once figure it out. Since then i've apparently forgetten more of the basic.

Does anyone have any idea whats going on here, because fdayhigh is not an empty list...

Expand|Select|Wrap|Line Numbers
  1. >>> import justCup
  2. Traceback (most recent call last):
  3.   File "<interactive input>", line 1, in <module>
  4.   File "justCup.py", line 63, in <module>
  5.     CupStartIndex = fdayhigh.index(max(fdayhigh))
  6. ValueError: max() arg is an empty sequence
  7. >>> 
thanks
Did you try printing fdayhigh before calling max()?
Oct 19 '07 #2
bartonc
6,596 Expert 4TB
Did you try printing fdayhigh before calling max()?
That's exactly what I would have said.
Does anyone have any idea whats going on here, because fdayhigh is not an empty list...
You may post the relevant section of that module in order for us to be able to help.
Oct 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Shekhar Mahadevan | last post by:
When I try installing, I get this: root# rpm -i MySQL-Max-4.1.0-0.i386.rpm warning: MySQL-Max-4.1.0-0.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 error: Failed dependencies:...
0
by: Tom | last post by:
can anyone tell me whats wrong with the following from my.cnf? innodb_data_file_path =...
5
by: Bayla Frankl | last post by:
Hi all, I am a little stumped. I have a query I am trying to run to retrieve the last Progress Note record from the database for the current patient so that the therapists can see the last note...
5
by: kevinjouco | last post by:
Hello Have searched the group for a solution to the following problem without success: Table 1 has Ref No (No Duplicates) & Min Max Value Fields ie Ref No 1 Min 1 Max 10 Ref No 2 Min 11 Max...
2
by: Ike | last post by:
How can I select , for a given name, that record with the highest id for something like: id INTEGER(11) PRIMARY KEY NOT NULL AUTO_INCREMENT name VARCHAR(40) I want to select the highest id...
11
by: Angus | last post by:
Hello I am following the exercises in Accelerated C++ Practical Programming by Example and when use: using std::max; I get these compile errors in MS Visual C++ v6 error C2039: 'max' : is...
41
by: Gary Wessle | last post by:
Hi often I need to read numbers and only keep the highest or lowest. so I do something like int uLimit = 0; int lLimit = 999999999999; //hoping the compiler will not complain uLimit =...
10
by: james121285 | last post by:
I am having a problem with this program, I have been trying to do it all week and am stuck. I am writing a program that will take ten values from an input file, find the max and min then print them...
3
by: fperri | last post by:
I have a DB in Access 2002 that when it is ran on a few users computers in the company, they get the error that the file sharing lock count has been exceeded and to increase the max locks per file in...
6
by: rahulsengupta895 | last post by:
. #define MIN(a,b) (a<b?a:b) #define MAX(a,b) (a>b?a:b) #include "Video.h" #define NO_HUE -1
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.