Mailinglist Archive: opensuse-buildservice (207 mails)

< Previous Next >
[opensuse-buildservice] Re: [PATCH] Reverting Sascha's unicode attempt. This made 'osc submit' always fail with uncaught exception: Fatal error: Start tag expected, '&lt;' not found at :1.
On Mar 07, 11 18:39:29 +0100, Marcus Hüwe wrote:

On 2011-03-07 18:02:50 +0100, OBS osc wrote:
From: Juergen Weigert <jw@xxxxxxx>

osc/ | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/osc/ b/osc/
index ccc1a06..560a36e 100644
--- a/osc/
+++ b/osc/
@@ -3512,7 +3512,12 @@ def create_submit_request(apiurl,
orev or show_upstream_rev(apiurl, src_project, src_package),
- cgi.escape(unicode(message, "utf8")))
+ cgi.escape(message))
+ # Don't do cgi.escape(unicode(message, "utf8"))) above.
+ # Promoting the string to utf8, causes the post to explode with:
+ # uncaught exception: Fatal error: Start tag expected, '&lt;' not
found at :1.
+ # I guess, my original workaround was not that bad.

Hmm can you please provide the exact commandline of the failing osc
command? At the moment I fail to see what's wrong with a simple
"cgi.escape(message)" (without the unicode stuff).

I am sitting in a checkout directory of SUSE:Factory:Head collectl
(any package should do) and doing this:

$ osc -d -A submitpac --cleanup -m 'testing cgi unucode

The following happens, when I have 'cgi.escape(unicode(message, "utf8")))'
in the code. The output after the -------- comes from a print xml.__repr__().


u'<request type="submit">\n <submit>\n <source
project="home:jnweiger:ldig:branches:SUSE:Factory:Head" package="collectl"
rev="4"/>\n <target project="SUSE:Factory:Head" package="collectl"
/> \n <options><sourceupdate>cleanup</sourceupdate></options> \n
</submit>\n <state name="new"/>\n <description>testing cgi unucode
Server returned an error: HTTP Error 400: Bad Request
X-Opensuse-Apiversion: 2.1.0
X-Opensuse-Errorcode: unknown
Cache-Control: no-cache
Date: Mon, 07 Mar 2011 17:02:00 GMT
Server: lighttpd/1.5.0
Content-Type: application/xml; charset=utf-8
Connection: close
Content-Length: 193
Via: 1.1 ICS_SERVER (iChain 2.3.419)

<?xml version="1.0" encoding="UTF-8"?>
<status code="unknown">
<summary>uncaught exception: Fatal error: Start tag expected, '&lt;' not
found at :1.</summary>

uncaught exception: Fatal error: Start tag expected, '&lt;' not found at :1.

This was behind an ssh connection on a SLE11SP1 machine, where my login session
lives in latin1 world. Not sure if it works with a better environment.


o \ Juergen Weigert paint it green! __/ _=======.=======_
<V> | jw@xxxxxxx back to ascii! __/ _---|____________\/
\ | 0911 74053-508 __/ (____/ /\
(/) | _____________________________/ _/ \_ vim:set sw=2 wm=8
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)

SuSE. Supporting Linux since 1992.
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-buildservice+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups