Thread: [Rest2web-develop] 3 problems using 0.5.0 alpha
Brought to you by:
mjfoord
From: Andrew I. <and...@us...> - 2006-05-18 03:58:16
|
3 problems, the first major: if my local svn checkout directory is named "rest2web", running make_dist.py will WIPE IT OUT. Complete deletion, no warning. Double-plus-ungood. I suggest a warning, both in the README and when make_dist.py is run. The second problem (once I checked out the code to rest2webtrunk/) occurs when I run "python r2w.py" to build the defaults. It zips through a bunch, and then blows up with this: Processing "reference" directory. Reading "reference/changelog.txt". Guessing encoding. We guessed: ISO8859-1 Traceback (most recent call last): [err] File "r2w.py", line 186, in ? [err] count = main(options, config) [err] File "r2w.py", line 108, in main [err] return processor.walk() [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line 382, in walk [err] subdir=subdir) [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line 837, in process [err] content = render_well(content, orig_uservalues, uservalues=True) [err] File "/home/aji/code/dev/rest2web/rest2web/embedded_code.py", line 87, in render_well [err] template = render(template, namespace, uservalues) [err] File "/home/aji/code/dev/rest2web/rest2web/embedded_code.py", line 72, in render [err] value = fun(occ, namespace) [err] File "/home/aji/code/dev/rest2web/rest2web/embedded_code.py", line 99, in render_value_eval [err] value = eval(code, namespace) [err] File "<string>", line 1 [err] ... [err] ^ [err] SyntaxError: invalid syntax [err] Hit return to continue >>> This hangs on line 69 in reference/changelog.txt, where it explains the new uservalue syntax: is ``<* ... *>``. For multiple lines of code it is ``<$ ... $>``. It also hangs in reference/todo.txt, which contains the <$ ... syntax. Looks like we need a way to escape that syntax. Final problem, running my own site (python r2w.py my.ini -w): rest2web version 0.5.0 alpha Running rest2web the Site Builder. Wed May 17 20:33:06 2006 Traceback (most recent call last): [err] File "/home/aji/code/dev/rest2web/r2w.py", line 186, in ? [err] count = main(options, config) [err] File "/home/aji/code/dev/rest2web/r2w.py", line 108, in main [err] return processor.walk() [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line 392, in walk [err] self.buildsection() [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line 1304, in buildsection [err] self.macros['_set_uservalues'](namespace, uservalues) [err] KeyError: '_set_uservalues' [err] It fails on a standard file (vendors.txt), and I don't see any obvious problem. No idea on this one. Andrew Ittner mailto:and...@us... |
From: Michael F. <fuz...@vo...> - 2006-05-18 06:04:44
|
Quick reply, fixes to follow. Andrew Ittner wrote: > 3 problems, the first major: if my local svn checkout directory is named > "rest2web", running make_dist.py will WIPE IT OUT. Complete deletion, no > warning. > > Double-plus-ungood. I suggest a warning, both in the README and when > make_dist.py is run. > > LOL. Oops, sorry about that. :-) > The second problem (once I checked out the code to rest2webtrunk/) occurs > when I run "python r2w.py" to build the defaults. It zips through a bunch, > and then blows up with this: > > Processing "reference" directory. > Reading "reference/changelog.txt". > Guessing encoding. We guessed: ISO8859-1 > Traceback (most recent call last): > [err] File "r2w.py", line 186, in ? > [err] count = main(options, config) > [err] File "r2w.py", line 108, in main > [err] return processor.walk() > [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line > 382, in walk > [err] subdir=subdir) > [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line > 837, in process > [err] content = render_well(content, orig_uservalues, uservalues=True) > [err] File "/home/aji/code/dev/rest2web/rest2web/embedded_code.py", line > 87, in render_well > [err] template = render(template, namespace, uservalues) > [err] File "/home/aji/code/dev/rest2web/rest2web/embedded_code.py", line > 72, in render > [err] value = fun(occ, namespace) > [err] File "/home/aji/code/dev/rest2web/rest2web/embedded_code.py", line > 99, in render_value_eval > [err] value = eval(code, namespace) > [err] File "<string>", line 1 > [err] ... > [err] ^ > [err] SyntaxError: invalid syntax > [err] > Hit return to continue >>> > > This hangs on line 69 in reference/changelog.txt, where it explains the new > uservalue syntax: > is ``<* ... *>``. For multiple lines of code it is ``<$ ... $>``. > > It also hangs in reference/todo.txt, which contains the <$ ... syntax. > > Looks like we need a way to escape that syntax. > > Ok. > Final problem, running my own site (python r2w.py my.ini -w): > > rest2web version 0.5.0 alpha > Running rest2web the Site Builder. > Wed May 17 20:33:06 2006 > > Traceback (most recent call last): > [err] File "/home/aji/code/dev/rest2web/r2w.py", line 186, in ? > [err] count = main(options, config) > [err] File "/home/aji/code/dev/rest2web/r2w.py", line 108, in main > [err] return processor.walk() > [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line > 392, in walk > [err] self.buildsection() > [err] File "/home/aji/code/dev/rest2web/rest2web/restprocessor.py", line > 1304, in buildsection > [err] self.macros['_set_uservalues'](namespace, uservalues) > [err] KeyError: '_set_uservalues' > [err] > > It fails on a standard file (vendors.txt), and I don't see any obvious > problem. No idea on this one. > > Looks like your macro file doesn't have a '_set_uservalues' function; which is entirely reasonable. I'll fix that. You could add the function to your macros file and make it a no-op in the meantime. Thanks for the report. Fuzzyman http://www.voidspace.org.uk/python/sahreware.shtml > Andrew Ittner > mailto:and...@us... > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > > |