Forwarding to the list. ~Josh.
Begin forwarded message:
> From: pytables-users-boun...@lists.sourceforge.net
> Date: November 5, 2011 1:20:30 PM GMT+01:00
> To: pytables-users-ow...@lists.sourceforge.net
> Subject: Auto-discard notification
>
> The attached message has been automatically discarded.
> From: "Edward C. Jones" <edcjo...@comcast.net>
> Date: November 5, 2011 1:18:12 PM GMT+01:00
> To: pytables-users@lists.sourceforge.net
> Subject: Context dependent problem with strings in table.where
>
>
> My computer has an up-to-date Debian stable distribution installed. It comes
> with Python 2.6.6. I have compiled and installed PyTables 2.3.
>
> I have the following lines in my code:
>
> for row in \
> self.h5.root.imdata.where("""hashcode == new_hashcode"""):
> row['deleted'] == False
> row.update()
>
> "hashcode" and "deleted" are columns of imdata. "hashcode" is a string of
> length 16. "new_hashcode" is a local variable containing the string:
>
> '\xe1\xe1\xabP6\xef\xa3R@\xaf,\xed\xf4\x99\x0eJ'
>
> The error message is (wrapped by my editor):
>
> ...
> File "tableExtension.pyx", line 862, in tables.tableExtension.Row.__next__
> (tables/tableExtension.c:7820)
> File "tableExtension.pyx", line 1058, in
> tables.tableExtension.Row.__next__inKernel (tables/tableExtension.c:9440)
> File "tableExtension.pyx", line 1106, in
> tables.tableExtension.Row._finish_riterator (tables/tableExtension.c:9827)
> File "tableExtension.pyx", line 1291, in
> tables.tableExtension.Row._flushModRows (tables/tableExtension.c:11007)
> File "/usr/local/lib/python2.6/dist-packages/tables/table.py", line 2512,
> in _markColumnsAsDirty
> assert len(colnames) > 0
> AssertionError
>
> I tried, in the above code, other single strings from the list below and
> got the same message. But the string 'abcdabcdabcdabcd' did not cause the
> error.
>
> But if I modify the code to the following, there is no error message:
>
> biglist = \
> ['\xa8\xa1\x99\x88\xd6\xb7:\x01\xd4A&\x17M\xe8\x1d\x8c',
> '\xe1\xe1\xabP6\xef\xa3R@\xaf,\xed\xf4\x99\x0eJ',
> 'a\xac\xbcSbc\xca\x84\x06Q\xb4/h^\x03\xa4',
> '\x188\xac\xd8\x94GK\xfb\xedt\xa7vp\xd8|\x95',
> 'q\xf8\xe9\xf5F\xc9\xc1\xc0P\x98O\x15 \xe0\xbbY',
> '\xf5}\n\xbcuc\\\xe3\xdfv(\xf0\xb0\xb4\xbc\xc4',
> '\x953\xb6@O\x9b\x8e\x95\x00b\x9b\xb2\xd6\x17f\xe2',
> '\x86\xf39zk\xfaE\xb0\xe6o\xe8\xb2\x85\x14mP',
> '\xed\x0c\x97I\x9e\x8b\xde|F\x82\x19\x87e\x92\xed\x1d',
> '\xae~\xc3\xe5Fs1\x8b:|\x14@\x99\xf3\xce\xec',
> '"\x87\x9b\x99\x8cF\x9f\xc5\xbf\'\xc0\xf6Un\xdb\xd7',
> '\xc4\xc5.\x8f\xba\xccbu3\x04J\xa6\x7f\x9c\xba&',
> '\xbex\xd5i\xc7\xc6\x0f\xcc\xe8j%{\xcb\x80\x15o']
>
> for new_hashcode in biglist:
> try:
> for row in \
> self.h5.root.imdata.where("""hashcode == new_hashcode"""):
> row['deleted'] == False
> row.update()
> except StandardError:
> pass
> sys.exit('exiting')
>
> The error depends on what is in new_hashcode and on the surrounding lines of
> the program. This type of error is strange for Python but very common in C
> where it often indicates that some array is being written outside its
> bounds.
>
> What is the problem?
>
>
>
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users