[Buildbot-devel] chinese in shell

Mo Jia life.130815 at gmail.com
Wed Apr 23 02:46:49 UTC 2014


Hi everyone :

    I am using not asscii in master.cfg
   1 ShellCommand descripton

rebuild_cmd = ShellCommand(command=["make"],
                             timeout = None,
                             workdir="build",
                             description = "编译",
                             haltOnFailure=True)

waterflow will show error lile :

web.Server Traceback (most recent call last):
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode
byte 0xe7 in position 0: ordinal not in range(128)

/usr/lib/python2.7/dist-packages/twisted/internet/defer.py, line 551
in _runCallbacks
549          current._runningCallbacks = True
550          try:
551            current.result = callback(current.result, *args, **kw)
552          finally:
/usr/local/lib/python2.7/dist-packages/buildbot/status/web/waterfall.py,
line 426 in call_content
424    def call_content(_):
425      return self.content_with_db_data(results['changes'],
426          brcounts, request, ctx)
427    d.addCallback(call_content)
/usr/local/lib/python2.7/dist-packages/buildbot/status/web/waterfall.py,
line 490 in content_with_db_data
488
489    ctx.update(self.phase2(request, changeNames + builderNames,
timestamps, eventGrid,
490         sourceEvents))
491
/usr/local/lib/python2.7/dist-packages/buildbot/status/web/waterfall.py,
line 743 in phase2
741        for i in range(len(block)):
742          # so the events are bottom-justified
743          b = IBox(block[i]).getBox(request)
744          b.parms['valign'] = "top"
/usr/local/lib/python2.7/dist-packages/buildbot/status/web/waterfall.py,
line 190 in getBox
188
189    template =
req.site.buildbot_service.templates.get_template("box_macros.html")
190    text = template.module.step_box(**cxt)
191
/usr/lib/python2.7/dist-packages/jinja2/runtime.py, line 405 in __call__
403      raise TypeError('macro %r takes not more than %d argument(s)' %
404              (self.name, len(self.arguments)))
405    return self._func(*arguments)
406
/usr/local/lib/python2.7/dist-packages/buildbot/status/web/templates/box_macros.html,
line 85 in macro
83

/usr/lib/python2.7/dist-packages/jinja2/filters.py, line 286 in do_join
284  # no automatic escaping? joining is a lot eaiser then
285  if not eval_ctx.autoescape:
286    return unicode(d).join(imap(unicode, value))
287
<type 'exceptions.UnicodeDecodeError'>: 'ascii' codec can't decode
byte 0xe7 in position 0: ordinal not in range(128)

  2  When try to use chinnese in buildername like

c['builders'].append(
    BuilderConfig(name="测试",
      slavenames=["test"],
      factory=test))

The error  when start the master :

014-04-23 10:17:04+0800 [-] prioritizing builders; order unspecified
Traceback (most recent call last):
Failure: twisted.internet.defer.FirstError: FirstError[#6, [Failure
instance: Traceback: <class 'sqlalchemy.exc.ProgrammingError'>:
(ProgrammingError) You must not use 8-bit bytestrings unless you use a
text_factory that can interpret 8-bit bytestrings (like text_factory =
str). It is highly recommended that you instead just switch your
application to Unicode strings. u'SELECT buildrequests.id,
buildrequests.buildsetid, buildrequests.buildername,
buildrequests.priority, buildrequests.complete, buildrequests.results,
buildrequests.submitted_at, buildrequests.complete_at,
buildrequest_claims.brid, buildrequest_claims.objectid,
buildrequest_claims.claimed_at \nFROM buildrequests LEFT OUTER JOIN
buildrequest_claims ON buildrequests.id = buildrequest_claims.brid
\nWHERE buildrequest_claims.claimed_at IS NULL AND
buildrequests.complete = ? AND buildrequests.buildername = ?' (0,
'\xe4\xb8\xad\xe6\x96\x87\xe6\xb5\x8b\xe8\xaf\x95')
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:397:errback
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:464:_startRunCallbacks
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:551:_runCallbacks
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:1101:gotResult
--- <exception caught here> ---
/usr/lib/python2.7/dist-packages/twisted/internet/defer.py:1043:_inlineCallbacks
/usr/lib/python2.7/dist-packages/twisted/python/failure.py:382:throwExceptionIntoGenerator
/usr/local/lib/python2.7/dist-packages/buildbot/process/builder.py:124:getOldestRequestTime
/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py:167:_worker
/usr/lib/python2.7/dist-packages/twisted/python/context.py:118:callWithContext
/usr/lib/python2.7/dist-packages/twisted/python/context.py:81:callWithContext
/usr/local/lib/python2.7/dist-packages/buildbot/db/pool.py:184:__thd
/usr/local/lib/python2.7/dist-packages/buildbot/db/buildrequests.py:112:thd
/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py:1449:execute
/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py:1584:_execute_clauseelement
/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py:1698:_execute_context
/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py:1691:_execute_context
/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py:331:do_execute
]]
2014-04-23 10:17:04+0800 [-] Unhandled error in Deferred:
2014-04-23 10:17:04+0800 [-] Unhandled Error
Traceback (most recent call last):
 File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py",
line 397, in errback
   self._startRunCallbacks(fail)
 File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py",
line 464, in _startRunCallbacks
   self._runCallbacks()
 File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py",
line 551, in _runCallbacks
   current.result = callback(current.result, *args, **kw)
 File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py",
line 1101, in gotResult
   _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
 File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py",
line 1043, in _inlineCallbacks
   result = result.throwExceptionIntoGenerator(g)
 File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py",
line 382, in throwExceptionIntoGenerator
   return g.throw(self.type, self.value, self.tb)
 File "/usr/local/lib/python2.7/dist-packages/buildbot/process/builder.py",
line 124, in getOldestRequestTime
   buildername=self.name, claimed=False)
 File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py",
line 167, in _worker
   result = context.call(ctx, function, *args, **kwargs)
 File "/usr/lib/python2.7/dist-packages/twisted/python/context.py",
line 118, in callWithContext
   return self.currentContext().callWithContext(ctx, func, *args, **kw)
 File "/usr/lib/python2.7/dist-packages/twisted/python/context.py",
line 81, in callWithContext
   return func(*args,**kw)
 File "/usr/local/lib/python2.7/dist-packages/buildbot/db/pool.py",
line 184, in __thd
   rv = callable(arg, *args, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/buildbot/db/buildrequests.py",
line 112, in thd
   res = conn.execute(q)
 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1449, in execute
   params)
 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1584, in _execute_clauseelement
   compiled_sql, distilled_params
 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1698, in _execute_context
   context)
 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1691, in _execute_context
   context)
 File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py",
line 331, in do_execute
   cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (ProgrammingError) You must not use
8-bit bytestrings unless you use a text_factory that can interpret
8-bit bytestrings (like text_factory = str). It is highly recommended
that you instead just switch your application to Unicode strings.
u'SELECT buildrequests.id, buildrequests.buildsetid,
buildrequests.buildername, buildrequests.priority,
buildrequests.complete, buildrequests.results,
buildrequests.submitted_at, buildrequests.complete_at,
buildrequest_claims.brid, buildrequest_claims.objectid,
buildrequest_claims.claimed_at \nFROM buildrequests LEFT OUTER JOIN
buildrequest_claims ON buildrequests.id = buildrequest_claims.brid
\nWHERE buildrequest_claims.claimed_at IS NULL AND
buildrequests.complete = ? AND buildrequests.buildername = ?' (0,
'\xe4\xb8\xad\xe6\x96\x87\xe6\xb5\x8b\xe8\xaf\x95')

So doesn't buldbot support chinnese or utf-8 ? or there is another
configure action should be noticed when i do this in master.cfg?




More information about the devel mailing list