473,320 Members | 1,858 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,320 software developers and data experts.

Re: Weird bug with an integer

En Thu, 08 May 2008 22:47:59 -0300, David Anderson <ze*********@gmail.com>
escribió:
Ps:
When I go to shell and type:rowN = int(0)
Why int(0)? Why not just 0???
>Look this slice of code:

rowN = int(0)
for row in rows:
success = self.resultGrid.AppendRows();
colN = int(0)
for col in row:
self.resultGrid.SetReadOnly(self.resultGrid.GetNum berRows()
- 1,colN,isReadOnly = True)
print rowN
self.resultGrid.SetCellValue(int(rowN),int(colN),c ol)

I am getting this output:
0
0
0
0
0
0
0
(1,)
Traceback (most recent call last):
in populateGrid
self.resultGrid.SetCellValue(int(rowN),int(colN),c ol)
TypeError: int() argument must be a string or a number, not 'tuple'
Your piece of code doesn't show when and how rowN is changed, it's set as
0 at the start. Try to see what happens with rowN elsewhere...

--
Gabriel Genellina

Jun 27 '08 #1
0 626

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ruben Antonio Macias Doporto | last post by:
I have a ASP.NET app, and something weird is happening I have a xmldocument that has more than 10 nodes, I create an instance of a XMLNode and assign one node to it from the xmldocument. One line...
3
by: Holger (David) Wagner | last post by:
Hi all, we're currently developing an application in the .NET environment that needs to access a DLL implemented in Fortran. There is one procedure with about 17 parameters, most of them arrays....
1
by: Gas | last post by:
I am new to C#, I want to perfoem a calculation and I have a weird out come from the app. Here is the code double percentage = 0; percentage = ctrl1.Height / (ctrl1.Height+ ctrl2.Height) ...
4
by: nick | last post by:
I'm having a really weird problem. Take a look at this screenshot. http://users.aber.ac.uk/njb4/dotnetproblem1.jpg Notice the 4 watches at the bottom, _totalRecords, MyDataGrid.PageSize and...
4
by: Sahil Malik [MVP] | last post by:
Okay so lets say I have a valuetype - lets say DateTime. Look at this code . List<DateTime> dt = new List<DateTime>() ; dt.Add(new dateTime(1999,12,1)) dt.AddDays(1) ; <--- This statement...
7
by: scorpion53061 | last post by:
This exception occured while running in the development environment. The debugger didnt catch it though it appeared as a message box prompt........does anyone have insight on this? ...
2
by: Jethro | last post by:
Having upgraded my VB6 project .... This doesn't work dim i as integer For i = 0 to 8 MyRecordset.Fields(i).Value = "Test" <---------- Error thrown here "item or variable not found in...
14
by: Nak | last post by:
Hi there, It's probably me being weird more than the function but I'm having problems with it doing as it should. I have a C++ application with 2 resources of custom types, RT_INIFILE @...
1
by: lists | last post by:
When using the (tbl).field notation for selecting a specific field from a composite field then the query returning the field is executed once per field. An example is giving below. The runtime is...
13
by: guitarromantic | last post by:
Hey everyone. I'm editing some stuff I did last summer, trying to bugfix and improve stuff. One improvement (or an oversight of the original design) is adding dynamic <title> tags to my pages....
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.