- From: Dominique Hazaël-Massieux <dom@w3.org>
- Date: 16 Jan 2003 11:11:31 +0100
- To: www-archive+n3bugs@w3.org, timbl@w3.org, connolly@w3.org
- Message-Id: <1042711893.17315.230.camel@stratustier>
Hi,
As I was working on some rules for the Matrix maintenance, I noticed
that the latest version of CWM reacts differently from a previous
version, since it now requires a line return after the last predicate in
a file.
The attached file that only contains a trivial predicate triggers an
error when feed into cwm:
dom@stratustier:~/tmp$ python2.2 /var/tmp/WWW/2000/10/swap/cwm.py
toto.n3 
#Processed by Id: cwm.py,v 1.115 2003/01/10 17:13:13 timbl Exp 
        #    using base file:/home/dom/tmp/toto.n3
        Traceback (most recent call last):
  File "/var/tmp/WWW/2000/10/swap/cwm.py", line 707, in ?
    doCommand()
  File "/var/tmp/WWW/2000/10/swap/cwm.py", line 502, in doCommand
    p.load(_inputURI)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 190, in load
    return self.loadBuf(stream.read())    # self._formula
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 198, in loadBuf
    self.feed(buf)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 213, in feed
    i = self.directiveOrStatement(str,j)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 226, in
directiveOrStatement
    j = self.statement(str, i)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 314, in statement
    j = self.property_list(str, i, r[0])
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 571, in
property_list
    i = self.object_list(str, j, objs)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 589, in
object_list
    i = self.object(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 743, in object
    j = self.subject(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 320, in subject
    return self.item(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 393, in item
    return self.path(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 405, in path
    if ahead not in _namechars + "[{(":
TypeError: 'in <string>' requires character as left operand
This error disappear when you add a line return after the predicate. I
don't if it's a bug or an intended change of behavior (my current
day-to-day version uses .
llyn.py version 1.47
cwm.py version 1.109
notation3.py version 1.120
On a completely unrelated point, the latest version of cwm is *much*
slower than the above (like 3 times slower), which shows pretty badly in
my usual applications such as tr and matrix automations.
Hope this helps,
Dom
-- 
Dominique Hazaël-Massieux - http://www.w3.org/People/Dom/
W3C/ERCIM
mailto:dom@w3.org
Attachments
- text/plain attachment: toto.n3
Received on Thursday, 16 January 2003 05:16:44 UTC