473,811 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

max() error

54 New Member
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 2396
ilikepython
844 Recognized Expert Contributor
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 Recognized Expert Expert
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
2150
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: libcrypto.so.0.9.6 is needed by MySQL-Max-4.1.0-0 libssl.so.0.9.6 is needed by MySQL-Max-4.1.0-0 RH9 has openssl-0.9.7a installed.
0
1891
by: Tom | last post by:
can anyone tell me whats wrong with the following from my.cnf? innodb_data_file_path = ibdata1:10M:autoextend:max:1G;ibdata2:10M:autoextend:max:1G;ibdata3:10M:autoextend:max:1G;ibdata4:10M:autoextend:max:1G;ibdata5:10M:autoextend:max:1G;ibdata6:10M:autoextend:max:1G;ibdata7:10M:autoextend:max:1G;ibdata8:10M:autoextend:max:1G;ibdata9:10M:autoextend When i try and start MySQL it errors with 050719 10:49:29 InnoDB: syntax error in...
5
8591
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 while typing the current note. This seemed to be simple to me, since I figured, you take the max(TxDate) that exists before my current date and all should be fine. I tried that and got all the records that exist for this patient before that date.
5
2339
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 20 etc Table 2 is linked by Ref No (Allows Duplicates) & Recorded Value
2
1750
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 where name='something'. I've tried along the lines of: select MAX(id) as id where name='something'
11
14331
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 not a member of 'std' error C2873: 'max' : symbol cannot be used in a using-declaration
41
2794
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 = val_read uLimit ? val_read : uLimit; lLimit = val_read < lLimit ? val_read : lLimit;
10
2775
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 to an output file. I have managed to open and input the values, as well as print them out, I have wrote a program that will find the max and min of ten values, but this is in the program. I need to turn the 10 values at the int line, and change them...
3
6589
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 the registry. I have had them both increase the max locks per file in their registry to well above the amount of records in the DB. Actually, I had them set it to the same as my computer as I have never recieved the error. I have also had them...
6
6803
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
9727
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10386
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10133
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6889
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.