Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:sourceforge': 0.03; 'cpython': 0.05; 'debug': 0.05; 'error:': 0.05; 'filename:fname piece:py': 0.07; 'indices': 0.07; 'blocked': 0.09; 'ide': 0.09; 'imported': 0.09; 'instantiated': 0.09; 'cc:addr:python-list': 0.10; 'gui': 0.11; 'subject:error': 0.11; 'index': 0.13; 'ignore': 0.13; 'library': 0.15; '2.7.3': 0.16; 'i.e': 0.16; 'it..': 0.16; 'supplying': 0.16; 'two.': 0.16; 'using,': 0.16; 'wrote:': 0.17; 'variables': 0.17; '>>>': 0.18; 'windows': 0.19; 'email addr:gmail.com>': 0.20; 'skip:" 30': 0.20; 'skip:" 40': 0.20; 'trying': 0.21; 'import': 0.21; 'received:209.85.216.46': 0.21; 'statement': 0.23; "haven't": 0.23; 'to:2**1': 0.23; 'downloaded': 0.24; 'somewhere': 0.24; 'cc:2**1': 0.24; 'command': 0.24; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; '(most': 0.27; 'am,': 0.27; 'cc:addr:gmail.com': 0.27; 'message-id:@mail.gmail.com': 0.27; 'run': 0.28; '>>>>': 0.29; 'initialized': 0.29; 'statements': 0.29; 'skip:& 10': 0.29; 'probably': 0.29; 'fri,': 0.30; 'error': 0.30; 'figure': 0.30; 'code': 0.31; 'point': 0.31; 'file': 0.32; 'help,': 0.32; 'running': 0.32; 'print': 0.32; 'docs': 0.33; 'idle': 0.33; 'traceback': 0.33; 'zero': 0.33; 'skip:& 20': 0.33; 'version': 0.34; 'received:google.com': 0.34; 'wrong': 0.34; 'done': 0.34; 'nov': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'two': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'some': 0.38; 'url:docs': 0.38; 'where': 0.40; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'your': 0.60; 'range': 0.60; 'different': 0.63; 'here': 0.65; 'content-type:application/octet- stream': 0.67; 'presumably': 0.84; 'subscripts': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AonK2WPlOouycc3onidDA4CNm+To1YGhHHzhEEtveog=; b=LLWm/eVkgC64NjEDmbWzh7tIS9NBBSgy1szNflzZu7xCP4d6PHw6Yf3Nd8MjUZv4hJ gZ7czMpcXCLrGZtumDg/nsuIsx1vSBSp7T43qL2bO3CjGRkGgm3Jun66QlrDqMyMvCkf uuVMklldTRni5dJ2CcBFpiD9OeUYP20ffin8T2BywZo/5OKMpTlyRuoIoxLqhbXQJSK3 fWbdnVZmCSjuGtxVn+qaGCtOdCAfVj2/CLx5OEpA3Uknc4vegPDoeuc3S0GUsg5m/GIf XopkmaizgTUYO4Tcm+HKDzVCd6M4kXh1QhXSiA1rCFQyq6eVpTnLn9feYQ903u/yTdSc Zp/A== MIME-Version: 1.0 In-Reply-To: References: <78f26f00-2c91-47b3-aef0-3eaeb8ae6f91@u4g2000pbo.googlegroups.com> <509BDEF1.50706@davea.name> Date: Fri, 9 Nov 2012 15:08:28 +0100 Subject: Re: error From: inshu chauhan To: d@davea.name, Zero Piraeus Content-Type: multipart/mixed; boundary=001636c5be8a65bfcc04ce107c61 Cc: "python-list@python.org" , woooee X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 329 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352470116 news.xs4all.nl 6879 [2001:888:2000:d::a6]:50782 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33026 --001636c5be8a65bfcc04ce107c61 Content-Type: multipart/alternative; boundary=001636c5be8a65bfc604ce107c5f --001636c5be8a65bfc604ce107c5f Content-Type: text/plain; charset=ISO-8859-1 Actually this one.. and its the last.. On Fri, Nov 9, 2012 at 2:59 PM, inshu chauhan wrote: > Please Ignore the above two files attached,,, See this one > > > On Fri, Nov 9, 2012 at 12:47 PM, inshu chauhan wrote: > >> I attached a wrong file...Right file is attached here >> >> >> On Fri, Nov 9, 2012 at 11:53 AM, inshu chauhan wrote: >> >>> >>> >>> >>> >>> http://www.ymlgroup.com/obscurehiddenlocation/downloads site, and >>>> imported it using from notzanzibar import DataType. >>>> >>> >>> No i haven't downloaded it.. and this site is not opening... >>> >>>> >>>> Then you'd have instantiated it in some code like >>>> data = DataType(filename) >>>> >>>> and then the type of data would be notzanzibar.DataType and the docs >>>> would be probably available somewhere on www.invalid.com/docs >>>> >>> >>> This site is also blocked here. >>> >>>> >>>> The only new guess: >>>> >>>> A 3D image would presumably have 3 subscripts, and you're only supplying >>>> two. >>>> >>> >>> Yes a 3D image has 3 subscripts but m trying to access all three through >>> using only 2 subsscripts i.e X and Y >>> >>> >>>> >>>> If you want help, be explicit: >>>> >>>> 1) what version of CPython are you using, and on what OS? >>>> >>> >>> I am using 2.7.3 on windows 7 >>> >>> 2) what web site did you download some extra library from ? >>>> >>> >>> The only extra libary i am using is Opencv , downloaded from >>> http://sourceforge.net/projects/opencvlibrary/ >>> >>> >>> >>>> 3) what import statement did you use ? >>>> >>> >>> import cv >>> >>> 4) How are all those global variables initialized ? >>>> >>> see attached file >>> >>>> 5) What command did you use to start the script ? Did you run it from >>>> command.com, or from some IDE ? >>>> >>> >>> Yes I am running it through IDLE GUI >>> >>> >>>> 5) Exactly what error message did you get, including the traceback ? >>>> >>> >>> Traceback (most recent call last): >>> File "Z:\modules\Masking_an_image_dynamically.py", line 155, in >>> >>> AccessPixels(data) >>> File "Z:\modules\.py", line 147, in AccessPixels >>> CreateMask(data, x, y) >>> File "Z:\modules\new_classification.py", line 110, in CreateMask >>> point = data[iy, ix ] >>> >>> error: index is out of range >>> >>> The line numbers here and the file attached may be different because I >>> have removed a lot of print statements which I was using to debug the >>> error.. >>> >>> >>> >>>> 6) What have you done to try to figure out your own error? >>>> >>> >>> I have trying print out variables and Indices at each step.. >>> >>> >>> Zero Piraeus : Where are you ? >>> >>> >>> >> > --001636c5be8a65bfc604ce107c5f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Actually this one.. and its the last..

On Fri, Nov 9, 2012 at 2:59 PM, inshu chauhan = <insideshoes@gmail.com> wrote:
Please Ignore the above two files attached,,= , See this one


On Fri, Nov 9, 2012 at 12:47 PM, inshu c= hauhan <insideshoes@gmail.com> wrote:
I attached a wrong file...Right file is atta= ched here


On Fri, Nov 9, 2012 at 11:53 AM, inshu c= hauhan <insideshoes@gmail.com> wrote:




http://www.ymlgroup.com/obscurehiddenlocation/downloads sit= e, and
imported =A0it using =A0from notzanzibar import DataType.
<= /div>

No i haven't downloaded it.. and this site is not opening= ...=A0

Then you'd have instantiated it in some code like
=A0 data =3D DataType(filename)

and then the type of data would be notzanzibar.DataType =A0and the docs
would be probably available somewhere on www.invalid.com/docs

This site is also blocked here.

The only new guess:

A 3D image would presumably have 3 subscripts, and you're only supplyin= g
two.

Yes a 3D image has 3 subscripts but m t= rying to access all three through using only=A0 2 subsscripts i.e X and Y=A0

If you want help, be explicit:

1) what version of CPython are you using, and on what OS?
<= /div>

I am using 2.7.3 on windows 7=A0

2) what web site did you download some extra library from ?

The only extra libary i am using is Opencv , downloaded fro= m http://sourceforge.net/projects/opencvlibrary/

=A0
3) what import statement did you use ?
=A0
=
import cv=A0

4) How are all those global variables initialized ?
<= div>see attached file=A0
5) What command did you use to start the script ? =A0Did you run it from command.com, or from s= ome IDE ?

Yes I am running it through IDLE G= UI
=A0
5) Exactly what error message did you get, including the traceback ?
=A0
=A0Traceback (most recent call last):=A0 File "Z:\modules\Masking_an_image_dynamically.py", line 155,= in <module>
=A0=A0=A0 AccessPixels(data)
=A0 File "Z:\modules\.py", line 1= 47, in AccessPixels
=A0=A0=A0 CreateMask(data, x, y)
=A0 File "= Z:\modules\new_classification.py", line 110, in CreateMask
=A0=A0= =A0 point =3D data[iy, ix ]

error: index is out of range

The line numbers here and the fil= e attached may be different because I have removed a lot of print statement= s which I was using to debug the error..

=A0
6) What have you done to try to figure out your own error?
=

I have trying print out variables and Indices at each step..=


Zero Piraeus : Where are you ?





--001636c5be8a65bfc604ce107c5f-- --001636c5be8a65bfcc04ce107c61 Content-Type: application/octet-stream; name="Masking_an_image_dynamically.py" Content-Disposition: attachment; filename="Masking_an_image_dynamically.py" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h9bdruie1 aW1wb3J0IGN2DQpmcm9tIG1hdGggaW1wb3J0IGZsb29yLCBzcXJ0LCBjZWlsDQpmcm9tIG51bXB5 IGltcG9ydCBhcnJheSwgZG90LCBzdWJ0cmFjdCwgYWRkLCBsaW5hbGcgYXMgbGluDQoNCm1hc2tf c2l6ZSA9IDkgIyB0byBoYXZlIGEgOSBYIDkgd2luZG93IGZvciBtYXNraW5nIHRoZSBpbWFnZSAN Cm1hc2tfc2l6ZTIgPSBtYXNrX3NpemUgLyAyDQoNCg0KZGVmIGRpc3RhbmNlKGNlbnRyZSwgcG9p bnQpOiAjIHRvIGZpbmQgdGhlIGRpc3RhbmNlIGJldHdlZW4gdGhlIGNlbnRyZSBvZiBtYXNrDQog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICNhbmQgbGFzdCBwb2ludCBvZiB0aGUgbWFz ayANCiAgICBkaXN0ID0gc3FydCgNCiAgICAgICAgICAgICgoY2VudHJlWzBdLXBvaW50WzBdKSoq MikgKw0K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IDAgPCBpeSA8IGRhdGEu aGVpZ2h0Og0KICAgICAgICBwb2ludCA9IGRhdGFbaXksIGl4XQ0KICAgICAgICBpZiBwb2ludCAh PSAoMC4wLCAwLjAsIDAuMCk6DQogICAgICAgICAgICBwcmludCBpeSwgaXggDQogICAgICAgICAg ICBwcmludCBwb2ludA0KICAgICAgICAgICAgcG9pbnRzLmFwcGVuZChwb2ludCkNCiAgICByZXR1 cm4gcG9pbnRzDQoNCmRlZiBDcmVhdGVNYXNrKGRhdGEsIHgsIHkpOg0KICAgIHJhZGl1cyA9IDAu Mw0KICAgIHBvaW50cyA9IFtdDQogICAgZm9yIGR5IGluIHhyYW5nZSgtbWFza19zaXplMiwgbWFz a19zaXplMiArIDEpOg0KICAgICAgICBmb3IgZHggaW4geHJhbmdlKC1tYXNrX3NpemUyLCBtYXNr X3NpemUyICsgMSk6DQogICAgICAgICAgICBpeCwgaXkgPSB4ICsgZHgsIHkgKyBkeQ0KICAgICAg ICAgICAgcG9pbnRzID0gIGFkZHBvaW50cyhkYXRhLCBwb2ludHMsIGl5ICwgaXggKQ0KICAgICAg ICAgICAgDQojIEhlcmUgSSBhbSB0cnlpbmcgdG8gY3JlYXRlIHRoYXQgbWFzayBmb3IgZXZlcnkg OVg5IHdpbmRvdyBpLmUuDQojIDgxIHBvaW50cyBidXQgZm9yIGZpbmRpbmcgdGhlIGNlbnRyZSBJ IGFtIHRha2luZyBvbmx5IHBvaW50IHdoaWNoIGFyZSBub3QgKDAsIDAsIDApDQojIGFuZCBtYWtp bmcgYSBsaXN0IG9mIHRoZXNlIHBvaW50cyB1c2luZyBhZGRwb2ludHMgbWV0aG9kIA0KICAgICAg ICAgICAgDQogICAgaWYgbGVuKHBvaW50cykgPiAzOg0KICAgICAgICBjZW50cmUgPSBDYWxjQ2Vu dHJlKHBvaW50cykNCiAgICAgICAgZGlzdGFuY2VzID0gW10NCiAgICAgICAgZm9yIHBvaW50IGlu IHBvaW50czoNCiAgICAgICAgICAgIGRpc3QgP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jcmVhdGVkIA0K ICAgIA0KZGVmIEFjY2Vzc1BpeGVscyhkYXRhKToNCiAgICBmb3IgeSBpbiByYW5nZSgwLCBkYXRh LmhlaWdodCk6ICMgaGVpZ2h0IG9mIGltYWdlIGlzIDMwMDANCiAgICAgICAgZm9yIHggaW4gcmFu Z2UoMCwgZGF0YS53aWR0aCk6ICMgd2lkdGggb2YgaW1hZ2UgaXMgMzAwDQogICAgICAgICAgICBD cmVhdGVNYXNrKGRhdGEsIHgsIHkpDQogICAgICAgICAgICAgICAgICAgICAgIA0KaWYgX19uYW1l X18gPT0gIl9fbWFpbl9fIjoNCiAgICBkYXRhID0gY3YuTG9hZCgiWjovZGF0YS94eXpfMDAwMDBf MzAwLnltbCIpICMgWW91IGNhbiBpbWFnaW5lIGRhdGEgYXMgYSBtYXRyaXggd2l0aCAzMDAgY29s dW1ucyBhbmQgMzAwMCByb3dzDQogICAgcHJpbnQgImRhdGEgbG9hZGVkIiAgICAgICAgICAgICAg ICAgICAgICAgICAjIHdoaWNoIGNvbnRhaW5zIHgseSx6IHZhbHVlcyBvZiBhbiBpbWFnZSANCiAg ICBBY2Nlc3NQaXhlbHMoZGF0YSkNCiAgICANCg== --001636c5be8a65bfcc04ce107c61--