ZSyncer error: "illegal data at start of file"
Any ideas what might be causing the following error in ZSyncer? We're running Zope 2.5.1 with ZSyncer 0.5.0-pre10 on Win2K. * Error * Syntax error at line 1: illegal data at start of file * Traceback (most recent call last): File "D:\PROGRA~1\MEDZOP~1\lib\python\DocumentTemplate\DT_Try.py", line 149, in render_try_except result = render_blocks(self.section, md) File "D:\PROGRA~1\MEDZOP~1\lib\python\DocumentTemplate\DT_Util.py", line 159, in eval return eval(code, d) File "", line 0, in ? File "D:\PROGRA~1\MEDZOP~1\lib\python\Products\ZSyncer\ZSyncer.py", line 205, in manage_compare File "D:\PROGRA~1\MEDZOP~1\lib\python\Products\ZSyncer\ZSyncer.py", line 467, in _manage_compare_path File "D:\PROGRA~1\MEDZOP~1\lib\python\Products\ZSyncer\ZSyncer.py", line 393, in _get_list File "D:\PROGRA~1\MEDZOP~1\lib\python\xmlrpclib.py", line 547, in __call__ return self.__send(self.__name, args) File "D:\PROGRA~1\MEDZOP~1\lib\python\xmlrpclib.py", line 630, in __request request File "D: \PROGRA~1\MEDZOP~1\lib\python\Products\ZSyncer\xmlrpclibBasicAuth.py", line 65, in request return self.parse_response(file) File "D:\PROGRA~1\MEDZOP~1\lib\python\xmlrpclib.py", line 596, in parse_response p.feed(response) File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 168, in feed self.goahead(0) File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 259, in goahead self.syntax_error('illegal data at start of file') File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 794, in syntax_error raise Error('Syntax error at line %d: %s' % (self.lineno, message)) Error: Syntax error at line 1: illegal data at start of file - Kamal
On Wed, Oct 29, 2003 at 03:27:52PM -0800, Kamal Gill wrote:
Any ideas what might be causing the following error in ZSyncer? We're running Zope 2.5.1 with ZSyncer 0.5.0-pre10 on Win2K.
* Error * Syntax error at line 1: illegal data at start of file * Traceback (most recent call last): (snip) "D: \PROGRA~1\MEDZOP~1\lib\python\Products\ZSyncer\xmlrpclibBasicAuth.py", line 65, in request return self.parse_response(file) File "D:\PROGRA~1\MEDZOP~1\lib\python\xmlrpclib.py", line 596, in parse_response p.feed(response) File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 168, in feed self.goahead(0) File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 259, in goahead self.syntax_error('illegal data at start of file') File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 794, in syntax_error raise Error('Syntax error at line %d: %s' % (self.lineno, message)) Error: Syntax error at line 1: illegal data at start of file
I haven't seen this before on linux. I wonder if the platform is relevant. hmm... ok, I see that I used os.path.normpath on URLs which is really a bad idea. I don't know if that's the cause of your problem but it's definitely bletcherous, so I've just fixed it and checked in to CVS. I'll mail you a patch privately so you don't have to wait forever for sourceforge anonymous CVS to catch up with my checkin... You can try anonymous cvs access at sourceforge, but be sure that ZSyncer/version.txt is at least 0.5.0-pre11. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's STYROFOAM PEANUT QUALITY INSPECTOR-FJUKER! (random hero from isometric.spaceninja.com)
Paul, Thanks for looking into this. The same error is returned after applying the patch you provided. Perhaps this problem is unrelated to ZSyncer since it appears to be platform-specific. - Kamal On Oct 29, 2003, at 10:17 PM, Paul Winkler wrote:
On Wed, Oct 29, 2003 at 03:27:52PM -0800, Kamal Gill wrote:
Any ideas what might be causing the following error in ZSyncer? We're running Zope 2.5.1 with ZSyncer 0.5.0-pre10 on Win2K.
* Error * Syntax error at line 1: illegal data at start of file * Traceback (most recent call last): (snip) "D: \PROGRA~1\MEDZOP~1\lib\python\Products\ZSyncer\xmlrpclibBasicAuth.py", line 65, in request return self.parse_response(file) File "D:\PROGRA~1\MEDZOP~1\lib\python\xmlrpclib.py", line 596, in parse_response p.feed(response) File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 168, in feed self.goahead(0) File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 259, in goahead self.syntax_error('illegal data at start of file') File "d:\Program Files\MedZopeDev/bin/lib\xmllib.py", line 794, in syntax_error raise Error('Syntax error at line %d: %s' % (self.lineno, message)) Error: Syntax error at line 1: illegal data at start of file
I haven't seen this before on linux. I wonder if the platform is relevant. hmm... ok, I see that I used os.path.normpath on URLs which is really a bad idea. I don't know if that's the cause of your problem but it's definitely bletcherous, so I've just fixed it and checked in to CVS. I'll mail you a patch privately so you don't have to wait forever for sourceforge anonymous CVS to catch up with my checkin...
You can try anonymous cvs access at sourceforge, but be sure that ZSyncer/version.txt is at least 0.5.0-pre11.
--
Paul Winkler http://www.slinkp.com Look! Up in the sky! It's STYROFOAM PEANUT QUALITY INSPECTOR-FJUKER! (random hero from isometric.spaceninja.com)
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Thu, Oct 30, 2003 at 09:50:14AM -0800, Kamal Gill wrote:
Paul, Thanks for looking into this. The same error is returned after applying the patch you provided. Perhaps this problem is unrelated to ZSyncer since it appears to be platform-specific.
That's possible. But can you do me a favor and try it with an older version of ZSyncer, e.g. 0.4.6 or even older? If that works then I know it's a problem in zsyncer. I believe Andy ran zsyncer on windows, so it used to work. I've updated the source forge page with all the old releases from Andy's page on zope.org, so they're all in the same place now... https://sourceforge.net/project/showfiles.php?group_id=28073 Also, please let me know a bit more about the objects you are trying to compare. What exactly were you doing? Does this error happen on all comparisons? Are both Zopes running on windows? -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's COOKIE MECHA NINJA! (random hero from isometric.spaceninja.com)
That's possible. But can you do me a favor and try it with an older version of ZSyncer, e.g. 0.4.6 or even older? If that works then I know it's a problem in zsyncer. I believe Andy ran zsyncer on windows, so it used to work.
The same error is returned with ZSyncer 0.4.6.
Also, please let me know a bit more about the objects you are trying to compare. What exactly were you doing? Does this error happen on all comparisons?
The error appears after clicking the sync tab in a given folder. The objects we're comparing are DTML Methods, DTML Documents, Images, Folders, Page Templates, and Scripts. In ZSyncer 0.4.6, the error is returned only when a folder on the source is not present on the destination. The comparison and sync operations work fine when the folder's id and tree location is identical on the source and destination. With ZSyncer 0.5.0-pre10, the "illegal data at start of file" error is returned if a folder on the source is not present on the destination. If a folder's id and tree location is identical between the source and destination, the following error is returned (using ZSyncer 0.5.0-pre10).. * Oh fooey. NameError * name 'mode' is not defined * Traceback (most recent call last): File "D:\PROGRA~1\MEDZOP~1\lib\python\DocumentTemplate\DT_Try.py", line 149, in render_try_except result = render_blocks(self.section, md) File "D:\PROGRA~1\MEDZOP~1\lib\python\DocumentTemplate\DT_In.py", line 695, in renderwob try: append(render(section, md)) File "D:\PROGRA~1\MEDZOP~1\lib\python\DocumentTemplate\DT_Let.py", line 76, in render return render_blocks(self.section, md) File "D:\PROGRA~1\MEDZOP~1\lib\python\DocumentTemplate\DT_Let.py", line 75, in render else: d[name]=expr(md) File "D:\PROGRA~1\MEDZOP~1\lib\python\DocumentTemplate\DT_Util.py", line 159, in eval return eval(code, d) File "", line 0, in ? NameError: name 'mode' is not defined * [{'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/08/22 17:09:57.658 GMT', 'id': 'backup', 'src_mod_time': '2003/09/19 23:45:36.778 GMT', 'src_best_modtime': '2003/09/19 23:45:36.778 GMT', 'last_modified_time': '2003/09/19 23:45:36.778 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'backup'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/08/22 17:09:57.658 GMT', 'status': 'out of date', 'size': '', 'dc_modtime': ''}, {'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/08/22 17:09:57.924 GMT', 'id': 'docs', 'src_mod_time': '2003/07/14 21:42:20.561 GMT', 'src_best_modtime': '2003/07/14 21:42:20.561 GMT', 'last_modified_time': '2003/07/14 21:42:20.561 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'docs'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/08/22 17:09:57.924 GMT', 'status': 'ok', 'size': '', 'dc_modtime': ''}, {'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/08/22 17:09:58.424 GMT', 'id': 'redesign', 'src_mod_time': '2003/06/03 18:33:24.812 GMT', 'src_best_modtime': '2003/06/03 18:33:24.812 GMT', 'last_modified_time': '2003/06/03 18:33:24.812 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'redesign'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/08/22 17:09:58.424 GMT', 'status': 'ok', 'size': '', 'dc_modtime': ''}, {'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/08/22 17:10:00.424 GMT', 'id': 'test', 'src_mod_time': '2003/10/06 20:41:03.718 GMT', 'src_best_modtime': '2003/10/06 20:41:03.718 GMT', 'last_modified_time': '2003/10/06 20:41:03.718 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'test'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/08/22 17:10:00.424 GMT', 'status': 'out of date', 'size': '', 'dc_modtime': ''}, {'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/08/22 17:09:57.846 GMT', 'id': 'db', 'src_mod_time': '2003/09/24 22:05:19.068 GMT', 'src_best_modtime': '2003/09/24 22:05:19.068 GMT', 'last_modified_time': '2003/09/24 22:05:19.068 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'db'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/08/22 17:09:57.846 GMT', 'status': 'out of date', 'size': '', 'dc_modtime': ''}, {'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/08/22 17:09:57.955 GMT', 'id': 'eval', 'src_mod_time': '2003/10/08 22:19:44.022 GMT', 'src_best_modtime': '2003/10/08 22:19:44.022 GMT', 'last_modified_time': '2003/10/08 22:19:44.022 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'eval'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/08/22 17:09:57.955 GMT', 'status': 'out of date', 'size': '', 'dc_modtime': ''}, {'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/10/07 16:16:16.762 GMT', 'id': 'somweb', 'src_mod_time': '2003/09/24 22:05:19.068 GMT', 'src_best_modtime': '2003/09/24 22:05:19.068 GMT', 'last_modified_time': '2003/09/24 22:05:19.068 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'somweb'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/10/07 16:16:16.762 GMT', 'status': 'ok', 'size': '', 'dc_modtime': ''}, {'icon': 'misc_/OFSP/Folder_icon.gif', 'dest_mod_time': '2003/08/22 17:10:00.455 GMT', 'id': 'zusers', 'src_mod_time': '2003/08/26 21:28:47.925 GMT', 'src_best_modtime': '2003/08/26 21:28:47.925 GMT', 'last_modified_time': '2003/08/26 21:28:47.925 GMT', 'path': ('', 'dev', 'Private', 'kamal', 'zusers'), 'is_folder': 1, 'meta_type': 'Folder', 'dest_best_modtime': '2003/08/22 17:10:00.455 GMT', 'status': 'out of date', 'size': '', 'dc_modtime': ''}]
Are both Zopes running on windows?
Yes. Both are running Win2K Server. I would love to switch to Linux or Mac OS X, but our sysadmins won't have it.
On Fri, Oct 31, 2003 at 11:45:21AM -0800, Kamal Gill wrote:
That's possible. But can you do me a favor and try it with an older version of ZSyncer, e.g. 0.4.6 or even older? If that works then I know it's a problem in zsyncer. I believe Andy ran zsyncer on windows, so it used to work.
The same error is returned with ZSyncer 0.4.6.
good to know.
Also, please let me know a bit more about the objects you are trying to compare. What exactly were you doing? Does this error happen on all comparisons?
The error appears after clicking the sync tab in a given folder. The objects we're comparing are DTML Methods, DTML Documents, Images, Folders, Page Templates, and Scripts. In ZSyncer 0.4.6, the error is returned only when a folder on the source is not present on the destination.
Hold on - that doesn't *ever* work. I've never seen the xml error you get, but if you're in a folder that doesn't exist on the destination, you'll always get *some* kind of error. I don't know why you get a different one.
The comparison and sync operations work fine when the folder's id and tree location is identical on the source and destination. With ZSyncer 0.5.0-pre10, the "illegal data at start of file" error is returned if a folder on the source is not present on the destination. If a folder's id and tree location is identical between the source and destination, the following error is returned (using ZSyncer 0.5.0-pre10)..
* Oh fooey. NameError * name 'mode' is not defined
Hmm. Do you have the same version of ZSyncer installed on both the source and destination? If so, I'll see if I can reproduce this.
Are both Zopes running on windows?
Yes. Both are running Win2K Server. I would love to switch to Linux or Mac OS X, but our sysadmins won't have it.
ok, i can get at a w2k box for testing. i'll see if I can reproduce. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's PICO-CAPTAIN X! (random hero from isometric.spaceninja.com)
I forgot to ask - you mentioned Zope 2.5.1 - but what version of Python? -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's NANO PANTS REPAIRMAN! (random hero from isometric.spaceninja.com)
participants (2)
-
Kamal Gill -
Paul Winkler