W3C home > Mailing lists > Public > public-cwm-bugs@w3.org > August 2004

[closed] Re: "Bad Syntax" message instead of 404 file not found

From: Tim Berners-Lee <timbl@w3.org>
Date: Tue, 31 Aug 2004 17:15:59 -0400
Message-Id: <F4B0AE4B-FB92-11D8-B0F5-000A9580D8C0@w3.org>
Cc: public-cwm-bugs@w3.org, Henry Story <henry.story@bblfish.net>
To: Tim Berners-Lee <timbl@w3.org>

Yosi fixed this in webAccess.py, in the CVS as of 2004-06-08 according 
to the log.  We don't currently have a test harness for command line 
error conditions.

Tim BL


> revision 1.5
> date: 2004/06/08 14:09:19;  author: syosi;  state: Exp;  lines: +10 -6
>
> Fix for bug in handling of 404 errors.
> bug report was 2004-05-16T20:21:54Z raised: "Bad Syntax" message 
> instead of 404 file not found
>
>
> Yosi

On May 16, 2004, at 16:21, Tim Berners-Lee wrote:

>
> Henry,
>
> I'll fork this as a separate bug, as it is a problem with the way cwm 
> uses the python library that error 404 doesn't turn up as an 
> exception, but a parse error when attemting to parse the Error 404 
> message as RDF!
>
> Tim
>
>
> On May 7, 2004, at 13:54, Henry Story wrote:
>
>>
>> Sorry that was the wrong output I sent. Below is what I am getting. 
>> It looks like it is trying to get the file http://purl.org/atom/ns 
>> and croaking on trying to parse that. I'll see if I can point the 
>> name space to the right file.
>>
>> hjs@bblfish:0$ ./diff.py -v -f tmp/bloged1.rdf -t tmp/bloged2.rdf
>> Traceback (most recent call last):
>>   File "./diff.py", line 374, in ?
>>     main()
>>   File "./diff.py", line 357, in main
>>     graph = loadFiles(testFiles)
>>   File "./diff.py", line 318, in loadFiles
>>     graph = myStore.loadMany(files, openFormula=graph)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/myStore.py", line 
>> 159, in loadMany
>>     return _checkStore().loadMany(uris, openFormula)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/llyn.py", line 1150, 
>> in loadMany
>>     self.load(u, openFormula=F, remember=0)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/llyn.py", line 1131, 
>> in load
>>     return webAccess.load(store, uri, openFormula, asIfFrom, 
>> contentType, flags, why)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/webAccess.py", line 
>> 90, in load
>>     raise DocumentAccessError(addr, sys.exc_info() )
>> webAccess.DocumentAccessError: Unable to access document 
>> <file:/Users/hjs/Programming/w3c/2000/10/swap/tmp/bloged1.rdf>, 
>> because:
>>     [Errno 2] No such file or directory: 
>> '/Users/hjs/Programming/w3c/2000/10/swap/tmp/bloged1.rdf'
>>
>> 19:44:54 - ~/Work/Programming/w3c/2000/10/swap
>> hjs@bblfish:0$ ./diff.py -v -f tmp/blog1.rdf -t tmp/blog2.rdf
>>     Loaded _g2 llyn.IndexedFormula
>>     Loaded _g12 llyn.IndexedFormula
>>      Fixed node: Feed
>>      Fixed node: "http://b"
>>      Blank node: _L11C8
>>      Fixed node: "Atom 0.3"
>>      Blank node: _L56C8
>>      Fixed node: Entry
>>      Fixed node: "Henry St"
>>      Fixed node: "7 May 20"
>>      Fixed node: "xml"
>>      Blank node: _L13C8
>>      Fixed node: "James To"
>>      Fixed node: "not quit"
>>      Fixed node: "Learning"
>>      Fixed node: Content
>>      Fixed node: "BlogEd v"
>>      Fixed node: Person
>>      Fixed node: "<h1>My <"
>>      Blank node: _L43C8
>>      Fixed node: "<span>Th"
>>      Fixed node: "Create C"
>>      Fixed node: _g4
>>      Fixed node: "de"
>>      Blank node: _L25C8
>>      Blank node: _L50C8
>>      Fixed node: "en"
>>      Blank node: _L40C4
>>      Fixed node: "todd@sun"
>>      Fixed node: "henry.st"
>>      Fixed node: "http://b"
>>      Fixed node: "http://b"
>>      Fixed node: Link
>>      Blank node: _L9C4
>>      Fixed node: "text/htm"
>>      Fixed node: "<span>It"
>>      Fixed node: "service."
>>      Fixed node: "text/xht"
>>      Blank node: _L19C8
>>      Fixed node: "http://b"
>>       Predicate: rdf:type
>>       Predicate: generator
>>       Predicate: email
>>       Predicate: mode
>>       Predicate: copyright
>>       Predicate: hasLink
>>       Predicate: type
>>       Predicate: hasTitle
>>       Predicate: author
>>       Predicate: data
>>       Predicate: rel
>>       Predicate: tagline
>>       Predicate: contributor
>>       Predicate: url
>>       Predicate: created
>>       Predicate: version
>>       Predicate: href
>>       Predicate: lang
>>       Predicate: id
>>       Predicate: name
>>       Predicate: hasContent
>>       Predicate: info
>>       Schema:  http://purl.org/atom/ns
>>       Schema:  http://www.w3.org/1999/02/22-rdf-syntax-ns
>> Traceback (most recent call last):
>>   File "./diff.py", line 374, in ?
>>     main()
>>   File "./diff.py", line 366, in main
>>     delta = differences(graph, graph2)
>>   File "./diff.py", line 235, in differences
>>     g_bnodes, g_definitions = nailFormula(g)
>>   File "./diff.py", line 85, in nailFormula
>>     meta = lookUp(predicates)
>>   File "./diff.py", line 65, in lookUp
>>     return loadMany([(x) for x in schemas])
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/myStore.py", line 
>> 159, in loadMany
>>     return _checkStore().loadMany(uris, openFormula)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/llyn.py", line 1150, 
>> in loadMany
>>     self.load(u, openFormula=F, remember=0)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/llyn.py", line 1131, 
>> in load
>>     return webAccess.load(store, uri, openFormula, asIfFrom, 
>> contentType, flags, why)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/webAccess.py", line 
>> 109, in load
>>     p.feed(buffer)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/notation3.py", line 
>> 251, in feed
>>     i = self.directiveOrStatement(str,j)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/notation3.py", line 
>> 265, in directiveOrStatement
>>     if j>=0: return self.checkDot(str,j)
>>   File "/Users/hjs/Programming/w3c/2000/10/swap/notation3.py", line 
>> 708, in checkDot
>>     raise BadSyntax(self._thisDoc, self.lines, str, j, "expected '.' 
>> or '}' or ']' at end of statement")
>> notation3.BadSyntax: Line 3 of <http://purl.org/atom/ns>: Bad syntax 
>> (expected '.' or '}' or ']' at end of statement) at ^ in:
>> "...CTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>> <HTML><HEAD>
>> ^<TITLE>404 Not Found</TITLE>
>> </HEAD><BODY>
>> <H1>Not Found</H1..."
Received on Tuesday, 31 August 2004 21:16:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:52:00 UTC